From 43fe067d23f536f19c69bfa8bd7a0ede922f368f Mon Sep 17 00:00:00 2001 From: DanMcInerney Date: Sun, 17 Nov 2013 12:42:19 -0700 Subject: [PATCH] cleaned up -n nmap arg --- 192.168.207.224.nmap.txt | 1 + LANs.py | 7 ++++--- LANspy.log.txt | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 192.168.207.224.nmap.txt create mode 100644 LANspy.log.txt diff --git a/192.168.207.224.nmap.txt b/192.168.207.224.nmap.txt new file mode 100644 index 0000000..7d6c1af --- /dev/null +++ b/192.168.207.224.nmap.txt @@ -0,0 +1 @@ +# Nmap 6.40 scan initiated Sun Nov 17 12:36:53 2013 as: nmap -e wlan0 -T4 -A -v -Pn -oN 192.168.207.224.nmap.txt 192.168.207.224 diff --git a/LANs.py b/LANs.py index 8abde6b..f16c6fe 100755 --- a/LANs.py +++ b/LANs.py @@ -864,9 +864,9 @@ def threads(): print '[-] Could not open SEToolkit, is it installed? Continuing as normal without it.' if args.nmapaggressive: - print '[*] Starting '+R+'aggressive scan [nmap -T4 -A -v -Pn -oN '+victimIP+']'+W+' in background; results will be in a file '+victimIP+'.nmap.txt' + print '[*] Starting '+R+'aggressive scan [nmap -e '+interface+' -T4 -A -v -Pn -oN '+victimIP+']'+W+' in background; results will be in a file '+victimIP+'.nmap.txt' try: - n = Thread(target=os.system, args=('nmap -T4 -A -v -Pn -oN '+victimIP+'.nmap.txt '+victimIP+' >/dev/null 2>&1',)) + n = Thread(target=os.system, args=('nmap -e '+interface+' -T4 -A -v -Pn -oN '+victimIP+'.nmap.txt '+victimIP+' >/dev/null 2>&1',)) n.daemon = True n.start() except: @@ -1023,9 +1023,10 @@ def main(): threads() if args.nmap: - print "\n[*] Running [nmap -T4 -O "+victimIP+"]" + print "\n[*] Running [nmap -T4 -O "+victimIP+"] this may take several minutes..." try: nmap = Popen(['/usr/bin/nmap', '-T4', '-O', '-e', interface, victimIP], stdout=PIPE, stderr=DN) + nmap.wait() nmap = nmap.communicate()[0].splitlines() for x in nmap: if x != '': diff --git a/LANspy.log.txt b/LANspy.log.txt new file mode 100644 index 0000000..dc82220 --- /dev/null +++ b/LANspy.log.txt @@ -0,0 +1,19 @@ +[*] Router IP: 192.168.207.1 +[*] victim IP: 192.168.207.224 +[*] Router MAC: c0:ea:e4:22:d3:74 +[*] Victim MAC: ec:35:86:b5:96:fe +[+] Starting Nmap 6.40 ( http://nmap.org ) at 2013-11-17 12:38 MST +[+] Warning: 192.168.207.224 giving up on port because retransmission cap hit (6). +[+] Nmap scan report for 192.168.207.224 +[+] Host is up (0.0091s latency). +[+] Not shown: 870 closed ports, 129 filtered ports +[+] PORT STATE SERVICE +[+] 62078/tcp open iphone-sync +[+] MAC Address: EC:35:86:B5:96:FE (Apple`) +[+] Device type: media device|phone +[+] Running: Apple iOS 4.X|5.X|6.X +[+] OS CPE: cpe:/o:apple:iphone_os:4 cpe:/a:apple:apple_tv:4 cpe:/o:apple:iphone_os:5 cpe:/o:apple:iphone_os:6 +[+] OS details: Apple Mac OS X 10.8.0 - 10.8.3 (Mountain Lion) or iOS 4.4.2 - 6.1.3 (Darwin 11.0.0 - 12.3.0) +[+] Network Distance: 1 hop +[+] OS detection performed. Please report any incorrect results at http://nmap.org/submit/ . +[+] Nmap done: 1 IP address (1 host up) scanned in 135.87 seconds