mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-08 05:51:48 -07:00
added better error handling on missing arguments
This commit is contained in:
parent
885d464a26
commit
5be41cfd37
2 changed files with 5 additions and 6 deletions
|
@ -12,10 +12,7 @@ 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)
|
||||
|
|
|
@ -88,6 +88,8 @@ class Spoof(Plugin):
|
|||
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"
|
||||
|
@ -280,7 +282,7 @@ class Spoof(Plugin):
|
|||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue