Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-22-2013, 12:42 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › Perl v
« Previous 1 2

simple tcp proxy

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
simple tcp proxy
08-11-2011, 03:08 AM
Post: #1
mywisdom Offline
Administrator
*******
Administrators
Posts: 921
Joined: Dec 2009
Reputation: 44
simple tcp proxy
filename:intsecproxy.pl
usage: perl intsecproxy.pl nomor_port
ex: perl intsecproxy.pl 1500
Code:
#!/usr/bin/perl -U
#Int-Sec TCP Proxy
#c0d3r: mywisdom
#special thanks to : flyff666, gunslinger, peneter, superman, chaer newbie,wendy182,aurel
#whitehat, wenkhairu, fadli,cybermutaqqin, blackn0te, ade yonatan,cakill
# Danzel, x-hack,r0073r,Sid3^effects,r4dc0re,KedAns-Dz,indoushka,7, jackhaxor,root4o
#zetra, exidous, snakedeyes and all d7 members
eval "use IO::Socket::INET";
eval "use HTTP::Request;use LWP::UserAgent;use HTTP::Response";
if ($@) {
print "\n[-] please install perl socket\n";
}


sub banner()
{
if(!defined($port))    
     {
      print "\nInt-Sec Botnet TCP Proxy Module \n";    
        print "\nMade by: Ev1lut10n \n";    
      print "\n[-] Please supply port num!\n";
      exit();
      }
}

sub paksa_fork()
{
    defined(my $pid = fork);
         if ($pid)
         {
             exit;
         }
         else
         {
                      for($i=1;$i<15;$i++)
               {
              defined(my $pid = fork);
                if ($pid)
                   {
                exit;
                last;
                   }
                }
         }
}

sub handle()
{
while(1)
{
$client_socket = $server->accept();
$data = <$client_socket>;
if (defined($data))
  {
                $data=~ s/^\s+//;
                                   $data=~ s/\s+$//;
  print "Received from Client : |$data|\n";
      defined(my $pidx = fork);
         if ($pidx)
         {
             @pecahan = split(" ", $data);
             our $url=$pecahan[1];
             print "\n[+] requesting url:$url\n";
            
             @pecahan2 = split("/", $url);
             our $host=$pecahan2[2];
             print "\nconnecting to $host\n";
             $sampah="http://".$host;
            
             our $fucktard=str_replace($sampah,'',$url);
            
             do_konek();
             print $client_socket $isi_halaman."\n";
            
         }
   close($client_socket);
   }

}
}

sub do_konek()
{
print "\nhere i got host: |$host|\n";
my $sock = IO::Socket::INET->new(Proto => 'tcp',PeerAddr => $host,PeerPort => 80) or die $!;
if($sock)
{
$data="GET $fucktard HTTP/1.1
Host: $host
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cache-Control: max-age=0\n";    
print $data;
print $sock $data;


while(<$sock>)
{
   $answer=<$sock>;
   our $isi_halaman=$isi_halaman. $answer;
  
}

}
close($sock);
}

sub bind_and_the_fooking_listen
{
    $host="0.0.0.0";
    our $server = IO::Socket::INET->new(
        LocalAddr => $host,
        LocalPort => $port,
        ReuseAddr => 1,
        Listen    => 100
    ) || die "\nUnable to listen on $host:$port: $!\n";;

}

sub str_replace {
eval
{
my $replace_this = shift;
    my $with_this  = shift;
    my $string   = shift;
    
    my $length = length($string);
    my $target = length($replace_this);
    
    for(my $i=0; $i<$length - $target + 1; $i++) {
        if(substr($string,$i,$target) eq $replace_this) {
            $string = substr($string,0,$i) . $with_this . substr($string,$i+$target);
            return $string; #Comment this if you what a global replace
        }
    }
    return $string;
}
}



our $port=$ARGV[0];
banner();
paksa_fork();
bind_and_the_fooking_listen();
handle();
Find all posts by this user
Quote this message in a reply
08-11-2011, 03:11 AM
Post: #2
note Offline
DC Security terganteng
*****
DC Security Grup
Posts: 1,279
Joined: Feb 2010
Reputation: 13
RE: simple tcp proxy
wow pertamax dulu ijin coba om dom2,mantap dah
Visit this user's website Find all posts by this user
Quote this message in a reply
08-11-2011, 03:24 AM
Post: #3
civo Offline
./Panah Nanggala\.
**
Moderators
Posts: 2,075
Joined: Jan 2011
Reputation: 65
RE: simple tcp proxy
ijin belajar omz doms..sekalian ane arsipin buat belajar
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Simple load balancing detector ev1lut10n 5 1,108 09-29-2011 09:54 PM
Last Post: Mr.ping
  intsec http proxy mywisdom 3 709 08-11-2011 09:06 AM
Last Post: wendyaja
  Simple Port Scaner dengan PERL wenkhairu 4 1,427 06-13-2011 11:18 PM
Last Post: selfdefense

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-22-2013, 12:42 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE