Guest User

Arpon Arpwatch Tester

a guest
Nov 1st, 2010
649
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 1.31 KB | None | 0 0
  1. #!/usr/bin/perl
  2. #MadSt3in
  3. #arpwatch arpon sendmail Tester
  4. #free software
  5. #licençe GPL
  6. use Net::ARP ;
  7. use Term::ANSIColor;
  8.  
  9. print color ("red"), "[+]",color ("reset"), "Interface to Use Ex: eth1 | wlan0 | eth0 \n" ;
  10. $iface = <STDIN>;
  11. print color ("red"), "[+]",color ("reset"), "Insert IP to check ROUTER or Machine with Arpon Activated \n" ;
  12. $target = <STDIN> ;
  13. chop ( $target,$iface ) ;
  14.  
  15. $getmac = Net::ARP::arp_lookup($dev,$target);
  16. print " $macget \n";
  17. if ($getmac =~ unknow ) {
  18.     print "Something went Wrong The Target Retrieved an unknow Mac addr\n";
  19.     print "Maybe $target Machine as Arpon Acivated \n";
  20.     print "If So Congrats\n";
  21.     goto finish ;
  22. }
  23. else {
  24. my $src = join ".", map int rand 255, 1 .. 4;
  25. my $spoofedmac = join ":", map int rand 99, 1 .. 6, ;
  26. Net::ARP::send_packet($iface,                   # Device
  27.                         $src,              # Source IP
  28.                         $target,                  # Destination IP
  29.                         $spoofedmac,              # Source MAC
  30.                         $getmac,                  # Destinaton MAC
  31.                         'reply');                 # ARP operation
  32.                        
  33. print "Packeth Sent Tru $iface to $target using $src as ip \n";
  34. print "with this spoofed mac $spoofedmac \n";                        
  35.                     }
  36. finish:
Add Comment
Please, Sign In to add comment