summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorroot <root@krebs>2011-05-10 12:31:54 +0200
committerroot <root@krebs>2011-05-10 12:31:54 +0200
commit82135f42e4c13318bdaddb832877b7376883e67c (patch)
tree2346ca6f5eb038134a83ac8fdd6a210e2351e0c5 /modules
parent9e22c8b62b449af8391e28477d9d8ff4b50e86d8 (diff)
arping.py now usable as dedicated arping scanner
Diffstat (limited to 'modules')
-rwxr-xr-x[-rw-r--r--]modules/people/src/arping.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/people/src/arping.py b/modules/people/src/arping.py
index 11fb81a9..6c040969 100644..100755
--- a/modules/people/src/arping.py
+++ b/modules/people/src/arping.py
@@ -1,8 +1,8 @@
-#!/usr/bin/python2
+#!/usr/bin/python
import logging
log = logging.getLogger('arpingy')
-import os
+import os,sys
try:
if (os.geteuid() != 0):
raise Exception('no root permissions')
@@ -13,7 +13,7 @@ try:
"""Arping function takes IP Address or Network, returns nested mac/ip list"""
try:
conf.verb=0
- ans,unans=arping(iprange,iface=iface,timeout=1)
+ ans,unans=arping(iprange,iface=iface,timeout=1,retry=3)
collection = []
for snd, rcv in ans:
@@ -28,3 +28,8 @@ except Exception as e:
log.error("Cannot load arping functions!" + str(e))
def arpingy(iprange='',iface=''):
raise Exception ('arping not available')
+
+
+if __name__ =='__main__':
+ logging.basicConfig(level=logging.DEBUG)
+ arpingy(sys.argv[1],sys.argv[2])