summaryrefslogtreecommitdiffstats
path: root/modules/people/src/arping.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.py
parent4f3b31fd611de21d75b0a465b438577632f47ee0 (diff)
parent951d398e20fdb778289e7dff2350594503dc300f (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'modules/people/src/arping.py')
-rwxr-xr-xmodules/people/src/arping.py35
1 files changed, 0 insertions, 35 deletions
diff --git a/modules/people/src/arping.py b/modules/people/src/arping.py
deleted file mode 100755
index 6c040969..00000000
--- a/modules/people/src/arping.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/python
-
-import logging
-log = logging.getLogger('arpingy')
-import os,sys
-try:
- if (os.geteuid() != 0):
- raise Exception('no root permissions')
- from scapy.all import * #might throws "no such module"
-
- def arpingy(iprange="10.42.1.0/24",iface='eth0'):
- log.debug("pinging "+ str(iprange))
- """Arping function takes IP Address or Network, returns nested mac/ip list"""
- try:
- conf.verb=0
- ans,unans=arping(iprange,iface=iface,timeout=1,retry=3)
-
- collection = []
- for snd, rcv in ans:
- result = rcv.sprintf(r"%ARP.psrc% %Ether.src%").split()
- log.debug(result)
- return result # take just the first arp reply
- except Exception as e:
- print ("something went wrong while arpinging " + str(e))
- return []
-
-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])