debug/cleanup

This commit is contained in:
Raunak Roy 2013-11-09 02:40:07 -08:00
parent 0cc4171454
commit abfff7ce05
2 changed files with 10 additions and 3 deletions

13
LANs.py
View file

@ -742,24 +742,30 @@ class active_users():
iplist = []
maclist = []
try:
nmap = Popen(['/usr/bin/nmap', '-sn', IPprefix], stdout=PIPE, stderr=DN)
nmap = Popen(['/usr/bin/nmap', '-sn', '192.168.1.*'], stdout=PIPE, stderr=DN)
nmap = nmap.communicate()[0]
nmap = nmap.splitlines()[2:-1]
except:
print '[-] Nmap ARP scan failed, is it nmap installed?'
for x in nmap:
#print x;
if 'Nmap' in x:
nmapip = x.split()[4]
pieces = x.split()
nmapip = pieces[len(pieces)-1]
nmapip = nmapip.replace('(','').replace(')','')
print "adding nmapip:" + nmapip
iplist.append(nmapip)
if 'MAC' in x:
nmapmac = x.split()[2]
maclist.append(nmapmac)
zipped = zip(iplist, maclist)
self.IPandMAC = [list(item) for item in zipped]
print routerIP;
# Make sure router is caught in the arp ping
r = 0
for i in self.IPandMAC:
print i;
i.append(0)
if r == 0:
if routerIP == i[0]:
@ -793,6 +799,7 @@ class active_users():
# Start monitor mode
print '[*] Enabling monitor mode'
try:
print '/usr/sbin/airmon-ng ' + 'start ' + '%s ' + interface
promiscSearch = Popen(['/usr/sbin/airmon-ng', 'start', '%s' % interface], stdout=PIPE, stderr=DN)
promisc = promiscSearch.communicate()[0]
monmodeSearch = re.search('monitor mode enabled on (.+)\)', promisc)

0
LANspy.log.txt Normal file
View file