diff --git a/LANs.py b/LANs.py index 3b647ea..fe39ae9 100755 --- a/LANs.py +++ b/LANs.py @@ -37,28 +37,21 @@ def module_check(module): exit('[-] Exiting due to missing dependency') import os - try: import nfqueue except Exception: + raise module_check('nfqueue') import nfqueue import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) -try: - from scapy.all import * -except Exception: - module_check('scapy') - from scapy.all import * +from scapy.all import * conf.verb = 0 # Below is necessary to receive a response to the DHCP packets because we're sending to 255.255.255.255 but receiving from the IP of the DHCP server conf.checkIPaddr = 0 -try: - from twisted.internet import reactor -except Exception: - module_check('twisted') - from twisted.internet import reactor +from twisted.internet import reactor +from twisted.internet import reactor from twisted.internet.interfaces import IReadDescriptor from twisted.internet.protocol import Protocol, Factory from sys import exit diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ea0b7f5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +scapy +twisted +requests