summaryrefslogtreecommitdiffstats
path: root/modules/people/src
diff options
context:
space:
mode:
Diffstat (limited to 'modules/people/src')
-rwxr-xr-xmodules/people/src/arping.py2
-rwxr-xr-xmodules/people/src/arping_users.py12
2 files changed, 9 insertions, 5 deletions
diff --git a/modules/people/src/arping.py b/modules/people/src/arping.py
index eea176e0..1b51ab1b 100755
--- a/modules/people/src/arping.py
+++ b/modules/people/src/arping.py
@@ -14,7 +14,7 @@ try:
log.debug("pinging "+ str(iprange))
"""Arping function takes IP Address or Network, returns nested mac/ip list"""
try:
- conf.verb=1
+ conf.verb=0
ans,unans=arping(iprange,iface=iface,timeout=1,retry=3)
collection = []
diff --git a/modules/people/src/arping_users.py b/modules/people/src/arping_users.py
index d6f6826e..9dd95749 100755
--- a/modules/people/src/arping_users.py
+++ b/modules/people/src/arping_users.py
@@ -1,14 +1,16 @@
#!/usr/bin/python
-import subprocess,re,logging
+import subprocess,re,logging,sys
from arping import arpingy
from multiprocessing import Pool
-
DEV='eth0'
MAC_NAMES='mac_names.lst'
data = []
ret = {}
-exit (0)
+verb = False
+
+if len(sys.argv) > 1 and sys.argv[1] == 'v':
+ verb = True
def get_own_addr():
data = subprocess.Popen(['/sbin/ifconfig',DEV],
stdout=subprocess.PIPE).communicate()[0].replace('\n','')
@@ -27,7 +29,7 @@ def load_names(MAC_NAMES):
def arping_helper(dic):
return arpingy(**dic)
-for first in range(3):
+for first in range(4):
for second in range(255):
data.append({'iprange':'10.42.'+str(first)+'.'+str(second),'iface':DEV})
@@ -44,5 +46,7 @@ except:
for p in ret:
+ if verb:
+ print p[0] + " => " + p[1]
if p[1] in names:
print names[p[1]]+ " is online"