CrashBandicot

Tor (Test Tor Connexion)

Feb 1st, 2015
26,428
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.72 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # Test Tor Connexion ,  Run Tor before
  3. #            /CrashBandicot/
  4.  
  5. use strict;
  6. use LWP::Protocol::socks;
  7. use LWP::UserAgent;
  8.  
  9. system(($^O eq 'MSWin32') ? 'cls' : 'clear');
  10.  
  11. my $ua = LWP::UserAgent->new(
  12.   agent => q{Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36},
  13. );
  14.  
  15. print "\n  ~ Tor Connection Work !\n\n";
  16.  
  17. for (;;) {  
  18. $ua->proxy([qw/ http https /] => 'socks://127.0.0.1:9150'); # Tor browser socks
  19. my $rsp = $ua->get('http://mon-ip.fr/')->content;
  20. if($rsp =~ m/<h1 style=\"font-size:38px;font-family:Arial;color:white;margin:0px;margin-left:57px\">(.*?)<\/h1>/g) {
  21.  
  22.  
  23.         print "  [+] Your IP now is : ".$1."\n";
  24. }
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment