Jump to content
Gabriel87

Proxy bot

Recommended Posts

#!/usr/bin/perl

use Socket;
use IO::Socket::INET;
use MIME::Base64;
use LWP::UserAgent;
use LWP::Simple;
use URI::URL;



print("Site à visiter :\n");

chomp($site = <STDIN>);


print("Tentative de connexion .....");


if($content = get($site))
{
print("réussi\n\n");

}else{
print("fail\n\n");
exit;
}
#-------------------------------------#
#-- Envoi des requetes aux Webproxy --#
#-------------------------------------#


print("------------------------\n");
print("- Visite par webproxy -\n");
print("------------------------\n\n");



# Je code l'adresse du site en base64
$base64 = encode_base64($site);



#Je récupère le contenu du fichier où sont afficher les webproxy
if( -z "proxy" )
{
print "Le fichier webproxy est vide\n";
exit;
}

open WEBPROXY,"webproxy"
or die "E/S : $!\n";

while(<WEBPROXY>){

chomp($proxy= $_);

print("Visite via http://$proxy .....");
$content = get("http://$proxy/index.php?q=$base64");
print("Done\n");

}




#------------------------------------#
#-- J'envoie des sockets aux proxy --#
#------------------------------------#

print("\n\n");
print("---------------------\n");
print("- Visite par proxy -\n");
print("---------------------\n\n");


if( -z "proxy" )
{
print "Le fichier proxy est vide\n";
exit;
}




open PROXY,"proxy"
or die "E/S : $!\n";

while(<PROXY>){

chomp($proxy = $_);

print("Visite via http://$proxy .....");

$ua = LWP::UserAgent->new;
$ENV{HTTP_proxy} = "http://$proxy";
$ua->env_proxy;
my $req = HTTP::Request->new(GET => "http://$site");
$print = $ua->request($req)->as_string;

delete $ENV{HTTP_PROXY};

print("Done\n");


}

print("\n\nAll hit done.\n\n");

Sursa : Hackhound

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...