From cf27da06cc5a07308a6f6987b6c1a9c97566e3b2 Mon Sep 17 00:00:00 2001 From: Dan McInerney Date: Fri, 2 Jan 2015 17:07:09 -0700 Subject: [PATCH] added requirements.txt --- LANs.py | 15 ++++----------- requirements.txt | 3 +++ 2 files changed, 7 insertions(+), 11 deletions(-) create mode 100644 requirements.txt 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