mirror of
https://github.com/DanMcInerney/LANs.py.git
synced 2025-07-07 05:22:11 -07:00
minor changes? don't remember
This commit is contained in:
parent
5272b48576
commit
117f39ba16
1 changed files with 11 additions and 9 deletions
20
arpspoof.py
20
arpspoof.py
|
@ -57,6 +57,7 @@ routerIP = routerRE.group(1)
|
||||||
IPprefix = routerRE.group(2)
|
IPprefix = routerRE.group(2)
|
||||||
interface = routerRE.group(3)
|
interface = routerRE.group(3)
|
||||||
localIP = [x[4] for x in scapy.all.conf.route.routes if x[2] != '0.0.0.0'][0]
|
localIP = [x[4] for x in scapy.all.conf.route.routes if x[2] != '0.0.0.0'][0]
|
||||||
|
localMAC = get_if_hwaddr(interface)
|
||||||
|
|
||||||
print "Checking the DHCP and DNS server addresses...\n"
|
print "Checking the DHCP and DNS server addresses...\n"
|
||||||
dhcp = (Ether(dst='ff:ff:ff:ff:ff:ff')/
|
dhcp = (Ether(dst='ff:ff:ff:ff:ff:ff')/
|
||||||
|
@ -93,13 +94,14 @@ else:
|
||||||
print ips
|
print ips
|
||||||
victimIP = raw_input('\nType victim\'s IP: ')
|
victimIP = raw_input('\nType victim\'s IP: ')
|
||||||
|
|
||||||
print "Active interface: " + interface
|
print "\n[+] Active interface: " + interface
|
||||||
print "Router IP: " + routerIP
|
print "[+] Local IP: " + localIP
|
||||||
print "Client IP: " + victimIP
|
print "[+] Interface MAC: " + localMAC
|
||||||
print "Local IP: " + localIP
|
print "[+] DHCP server: " + DHCPsrvr
|
||||||
print "DHCP server: " + DHCPsrvr
|
print "[+] DNS server: " + DNSsrvr
|
||||||
print "DNS server: " + DNSsrvr
|
print "[+] Local domain: " + localDomain
|
||||||
print "Local domain: " + localDomain
|
print "[+] Router IP: " + routerIP
|
||||||
|
print "[+] Client IP: " + victimIP
|
||||||
|
|
||||||
def originalMAC(ip):
|
def originalMAC(ip):
|
||||||
# srp is for layer 2 packets with Ether layer, sr is for layer 3 packets like ARP and IP
|
# srp is for layer 2 packets with Ether layer, sr is for layer 3 packets like ARP and IP
|
||||||
|
@ -237,9 +239,9 @@ class driftnet(threading.Thread):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
routerMAC = originalMAC(routerIP)
|
routerMAC = originalMAC(routerIP)
|
||||||
print "Router MAC: " + routerMAC
|
print "[+] Router MAC: " + routerMAC
|
||||||
victimMAC = originalMAC(victimIP)
|
victimMAC = originalMAC(victimIP)
|
||||||
print "Victim MAC: " + victimMAC + "\n"
|
print "[+] Victim MAC: " + victimMAC + "\n"
|
||||||
except:
|
except:
|
||||||
sys.exit("Could not get MAC addresses")
|
sys.exit("Could not get MAC addresses")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue