Skip to content
This repository has been archived by the owner on Aug 28, 2018. It is now read-only.

Commit

Permalink
added better error handling on missing arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
byt3bl33d3r committed Oct 9, 2014
1 parent 885d464 commit 5be41cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 2 additions & 5 deletions plugins/AppCachePoison.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ class AppCachePlugin(Plugin):
def initialize(self, options):
'''Called if plugin is enabled, passed the options namespace'''
self.options = options
self.config_file = options.tampercfg

if self.config_file is None:
self.config_file = "./config_files/app_cache_poison.cfg"

self.config_file = options.tampercfg or "./config_files/app_cache_poison.cfg"

print "[*] App Cache Poison plugin online"
ResponseTampererFactory.buildTamperer(self.config_file)

Expand Down
4 changes: 3 additions & 1 deletion plugins/Spoof.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def initialize(self, options):
self.dhcpcfg = ConfigObj(self.dhcpcfg)
thread_target = self.dhcp_sniff
thread_args = ()
else:
sys.exit("[-] Spoof plugin requires --arp, --icmp or --dhcp")

if self.dns:
print "[*] DNS Tampering enabled"
Expand Down Expand Up @@ -280,7 +282,7 @@ def add_options(self,options):
options.add_argument('--target', dest='target', help='Specify a host to poison [default: subnet]')
options.add_argument('--arpmode', dest='arpmode', default='req', help=' ARP Spoofing mode: requests (req) or replies (rep) [default: req]')
#options.add_argument('--summary', action='store_true', dest='summary', default=False, help='Show packet summary and ask for confirmation before poisoning')
options.add_argument('--manualiptables', dest='manualiptables', action='store_true', default=False, help='Do not setup iptables or flush them automatically')
options.add_argument('--manual-iptables', dest='manualiptables', action='store_true', default=False, help='Do not setup iptables or flush them automatically')

def finish(self):
self.send = False
Expand Down

0 comments on commit 5be41cf

Please sign in to comment.