summaryrefslogtreecommitdiffstats
path: root/modules/people/src/arping_users.py
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-22 02:17:33 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-22 02:17:33 +0200
commitfaf725402cd589173b16152c42e5e48965e3999e (patch)
tree134babeef7fe1c8f1445fef2804e459d7ffab25d /modules/people/src/arping_users.py
parent4f3b31fd611de21d75b0a465b438577632f47ee0 (diff)
parent951d398e20fdb778289e7dff2350594503dc300f (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'modules/people/src/arping_users.py')
-rwxr-xr-xmodules/people/src/arping_users.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/modules/people/src/arping_users.py b/modules/people/src/arping_users.py
deleted file mode 100755
index 1f936eba..00000000
--- a/modules/people/src/arping_users.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/python
-from arping import arpingy
-import subprocess,re,logging
-from multiprocessing import Pool
-
-logging.basicConfig(level=logging.ERROR)
-DEV='eth0'
-MAC_NAMES='mac_names.lst'
-data = []
-ret = {}
-names = load_names(FNAME)
-
-def get_own_addr():
- data = subprocess.Popen(['/sbin/ifconfig',DEV],
- stdout=subprocess.PIPE).communicate()[0].replace('\n','')
- return re.sub(r'.*HWaddr ([0-9A-Fa-f:]*).*inet addr:([0-9.]*).*' ,
- r'\1 \2',data).split()
-
-def load_names(MAC_NAMES):
- names = {}
- f = open(MAC_NAMES)
- for l in f:
- print l
- mac,name = l.split()
- names[mac] = name
- f.close()
- return names
-
-def arping_helper(dic):
- return arpingy(**dic)
-
-for first in range(3):
- for second in range(255):
- data.append({'iprange':'10.42.'+str(first)+'.'+str(second),'iface':DEV})
-
-try:
- p = Pool(20)
- ret = filter(lambda x:x , p.map(arping_helper, data))
- myip,mymac = get_own_addr()
- ret.append([mymac,myip])
- p.terminate()
-except:
- print 'you fail'
-
-
-
-for p in ret:
- if p[1] in names:
- print name + " is online"