| 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. 172. 173. 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. 218. 219. 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. 251. 252. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. | #!/usr/bin/perl
#,, ,
#|| || _
#|| /'\\ _-_, =||= -_-_ < \, _-_, _-_,
#|| || || ||_. || || \\ /-|| ||_. ||_.
#|| || || ~ || || || || (( || ~ || ~ ||
#\\ \\,/ ,-_- \\, ||-' \/\\ ,-_- ,-_-
# |/
# Lo$tpass bot
# By: Lo$er
#For http://security-sh3ll.com/ #
#shouts to everyone at security-shell, friends #
#and everyone who I got ideas, code, and inspiration from#
#beta verison 0.9 (i guess?) simple? yes #
#I suggest you append to a log file and run in background#
#ie: perl bot.pl >> botlog.txt & #
##########################################################
use warnings; #comment out if you dont want to see a bunch of extra text in the terminal
use IO::Socket;
use LWP::UserAgent;
use Digest::MD5 qw(md5_hex);
use Crypt::PasswdMD5 qw(unix_md5_crypt);
##################################################
# !CONFIG! #
##################################################
$Host = "irc.dal.net"; #server
$Nick = "bot212121"; #nick
$Login = "bot21221"; #login
$Pass = "pass"; #nickserv password
$Realname = "bot3"; #realname
$Channel = "#crackhouse"; #channel
$Port = 6667; #port
$Owner = "[Loser]"; #owner's nick
$passfile = "passes.txt"; #plaintext wordlist for md5 cracking
##################################################
# !END CONFIG! #
##################################################
$sock = IO::Socket::INET->new(
PeerAddr => $Host,
PeerPort => $Port,
Proto => 'tcp' ) or die "could not make connection: $!\n";
while($line = <$sock>){
print $line;
if($line =~ /(NOTICE AUTH).*(checking ident)/i){
print $sock "NICK $Nick\nUSER $Login 0 0 :$Realname\n";
last;
}
}
while($line = <$sock>){
print $line;
#use next line if the server asks for a ping
if($line =~ /^PING/){
print $sock "PONG :" . (split(/ :/, $line))[1];
}
if($line =~ /(376|422)/i){
print $sock "NICKSERV :identify $Pass\n";
last;
}
}
sleep 5;
print $sock "JOIN $Channel\n";
while(defined($input=<$sock>)){
#pm a text file to user on join (commented out by default)
#if($input=~/^:(.+)\!.+ JOIN\b/){open (WEL,"ascii9.txt") or print "error \n";
#foreach (<WEL>){
#sleep 1;print $sock "PRIVMSG $1 :$_";}}
if($input=~/PING(.*)/){print $sock "PONG :$1\n";}
print "$input\n";
##################################################
# !COMMANDS! #
##################################################
# ____________
#| HELP |
#|____________|
sub help{
if($input=~/!help/){
print $sock "PRIVMSG $Channel :15,1 !print <text> \n";
print $sock "PRIVMSG $Channel :5,1 !owner \n";
print $sock "PRIVMSG $Channel :15,1 !md5lookup <hash> \n";
print $sock "PRIVMSG $Channel :5,1 !md5crack <hash> \n";
print $sock "PRIVMSG $Channel :15,1 !md5encrypt <text> \n";
print $sock "PRIVMSG $Channel :5,1 !desencrypt <text> \n";
print $sock "PRIVMSG $Channel :15,1 !help (you're doing it) \n";
}
}
&help;
# ____________
#| END HELP |
#|____________|
# ____________
#| PRINT |
#|____________|
sub print{ #for testing
if($input=~/!print /){print $sock "PRIVMSG $Channel :15,1 $'\n";}
}
&print;
# ____________
#| END PRINT |
#|____________|
# ____________
#| OWNER |
#|____________|
sub owner{
if($input=~/!owner/){print $sock "PRIVMSG $Channel : 15,1 $Owner is the owner of $Nick\n";}
}
&owner;
# ____________
#| END OWNER |
#|____________|
# ____________
#| MD5LOOKUP |
#|____________|
sub md5lookup{
if($input=~/!md5lookup /){
$hash = $';
chomp $hash;
if(length($hash) < 32)
{print $sock "PRIVMSG $Channel :5,1!This is not a MD5 hash!\n";}
elsif ($hash !~ /\d|[a-f]{32}/g)
{print $sock "PRIVMSG $Channel :5,1!This is not a MD5 hash!\n";}
else {
$www = new LWP::UserAgent;
$site = "http://md5.rednoize.com/?q=$hash/*";
$res = $www -> get($site) ;
$res -> content() =~ /"result" >(.*)</ ;
print $sock "PRIVMSG $Channel :15,1 http://md5.rednoize.com:5 $1 \n";
$site = "http://gdataonline.com/qkhash.php?mode=txt&hash=$hash/*";
$res = $www -> get($site) ;
$res -> content() =~ /<b>(.*)</ ;
print $sock "PRIVMSG $Channel :15,1 http://gdataonline.com:5 $1 \n";
}
}
}
&md5lookup;
# _____________
#|END MD5LOOKUP|
#|_____________|
# ____________
#| MD5CRACK |
#|____________|
sub md5crack{
if($input=~/!md5crack /){
$hash = $';
chomp $hash;
open(PLAIN,$passfile) || print "Could not open wordlist!\n";
while(<PLAIN>){
chomp($_);
chomp($md5=md5_hex($_));
if($md5 == $hash){
print $sock "PRIVMSG $Channel :15,1 cracked successfully: 5 $_ \n";
}
}
close(PLAIN);
}
}
&md5crack;
# ____________
#|END MD5CRACK|
#|____________|
# ____________
#| MD5ENCRYPT |
#|____________|
sub md5encrypt{
if($input=~/!md5encrypt /){
$plain = $';
$md5 = md5_hex($plain);
print $sock "PRIVMSG $Channel :15,1 $md5 5 [MD5] \n";
}
}
&md5encrypt;
# ________________
#| END MD5ENCRYPT |
#|________________|
# ____________
#| DESENCRYPT |
#|____________|
sub desencrypt{
if($input=~/!desencrypt /){
$password = $';
chomp $password;
@salt = ( '.', '/', 0 .. 9, 'A' .. 'Z', 'a' .. 'z' );
$des = crypt( $password, gensalt(2) );
print $sock "PRIVMSG $Channel :15,1 $des 5 [DES] \n";
sub gensalt {
$count = shift;
$salt;
for (1..$count) {
$salt .= (@salt)[rand @salt];
}
return $salt;
}
}
}
&desencrypt;
# ________________
#| END DESENCRYPT |
#|________________|
##################################################
# !END COMMANDS! #
##################################################
}
#,, ,
#|| || _
#|| /'\\ _-_, =||= -_-_ < \, _-_, _-_,
#|| || || ||_. || || \\ /-|| ||_. ||_.
#|| || || ~ || || || || (( || ~ || ~ ||
#\\ \\,/ ,-_- \\, ||-' \/\\ ,-_- ,-_-
# |/
# ' |