diff --git a/mitmf.py b/mitmf.py index 1e0abdb..a41e0b0 100755 --- a/mitmf.py +++ b/mitmf.py @@ -28,6 +28,7 @@ if __name__ == "__main__": slogopts.add_argument("-p", "--post", action="store_true",help="Log only SSL POSTs. (default)") slogopts.add_argument("-s", "--ssl", action="store_true", help="Log all SSL traffic to and from server.") slogopts.add_argument("-a", "--all", action="store_true", help="Log all SSL and HTTP traffic to and from server.") + #slogopts.add_argument("-c", "--clients", action='store_true', default=False, help='Log each clients data in a seperate file') sgroup.add_argument("-l", "--listen", type=int, metavar="port", default=10000, help="Port to listen on (default 10000)") sgroup.add_argument("-f", "--favicon", action="store_true", help="Substitute a lock favicon on secure requests.") sgroup.add_argument("-k", "--killsessions", action="store_true", help="Kill sessions in progress.") diff --git a/plugins/Spoof.py b/plugins/Spoof.py index 5aa52a9..cd6e09b 100644 --- a/plugins/Spoof.py +++ b/plugins/Spoof.py @@ -65,9 +65,17 @@ class Spoof(Plugin): if not self.manualiptables: os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X') - if self.arp: + try: self.mac = get_if_hwaddr(self.interface) + except Exception, e: + sys.exit('[-] Error retrieving interfaces MAC address: %s' % e) + + if self.arp: + if not self.gateway: + sys.exit("[-] --arp argument requires --gateway") + self.routermac = getmacbyip(self.gateway) + print "[*] ARP Spoofing enabled" if self.arpmode == 'req': pkt = self.build_arp_req() @@ -77,8 +85,11 @@ class Spoof(Plugin): thread_args = (pkt, self.interface, self.debug,) elif self.icmp: - self.mac = get_if_hwaddr(self.interface) + if not self.gateway: + sys.exit("[-] --icmp argument requires --gateway") + self.routermac = getmacbyip(self.gateway) + print "[*] ICMP Redirection enabled" pkt = self.build_icmp() thread_target = self.send_packets @@ -249,7 +260,7 @@ class Spoof(Plugin): except Exception: logging.debug("Error resolving " + domain) - def nfqueue_callback(self, i, payload): + def nfqueue_callback(self, payload, *kargs): data = payload.get_data() pkt = IP(data) if not pkt.haslayer(DNSQR): diff --git a/sslstrip/ClientRequest.py b/sslstrip/ClientRequest.py index b29c31c..091ef0d 100644 --- a/sslstrip/ClientRequest.py +++ b/sslstrip/ClientRequest.py @@ -48,7 +48,7 @@ class ClientRequest(Request): self.urlMonitor = URLMonitor.getInstance() self.cookieCleaner = CookieCleaner.getInstance() self.dnsCache = DnsCache.getInstance() -# self.uniqueId = random.randint(0, 10000) + #self.uniqueId = random.randint(0, 10000) def cleanHeaders(self): headers = self.getAllHeaders().copy()