summaryrefslogtreecommitdiffstats
path: root/arping.py
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-01-30 22:19:57 +0100
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-01-30 22:19:57 +0100
commit0a4dc6e293738b5bff1e94f0f36dcf4da706b34d (patch)
tree849534e5ec39426693920de2ce5c07e272aadb16 /arping.py
parent5fb4705362ab694eb84b21f1389c6ca6bc5e4d8a (diff)
cleaned up repository
Diffstat (limited to 'arping.py')
-rw-r--r--arping.py31
1 files changed, 0 insertions, 31 deletions
diff --git a/arping.py b/arping.py
deleted file mode 100644
index 816a3f46..00000000
--- a/arping.py
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/usr/bin/python2
-
-import logging
-log = logging.getLogger('arpingy')
-import os
-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='wlan0'):
- log.debug("pinging"+ 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)
-
- collection = []
- for snd, rcv in ans:
- result = rcv.sprintf(r"%ARP.psrc% %Ether.src%").split()
- log.debug(result)
- collection.append(result)
- return collection
- 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):
- return True