mirror of
https://github.com/byt3bl33d3r/MITMf.git
synced 2025-07-07 05:22:15 -07:00
corrected some logic
This commit is contained in:
parent
07a15922f2
commit
44f0d1ae6d
1 changed files with 6 additions and 6 deletions
|
@ -46,13 +46,7 @@ class Spoof(Plugin):
|
|||
self.debug = True
|
||||
|
||||
print "[*] Spoof plugin online"
|
||||
|
||||
print '[*] Setting up ip_forward and iptables'
|
||||
file = open('/proc/sys/net/ipv4/ip_forward', 'w')
|
||||
file.write('1')
|
||||
file.close()
|
||||
os.system('iptables -F && iptables -X && iptables -t nat -F && iptables -t nat -X')
|
||||
os.system('iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port %s' % self.port)
|
||||
|
||||
if self.arp == True:
|
||||
if self.icmp == True:
|
||||
|
@ -93,6 +87,12 @@ class Spoof(Plugin):
|
|||
print "[*] DNS Spoofing enabled"
|
||||
self.start_dns_queue()
|
||||
|
||||
print '[*] Setting up ip_forward and iptables'
|
||||
file = open('/proc/sys/net/ipv4/ip_forward', 'w')
|
||||
file.write('1')
|
||||
file.close()
|
||||
os.system('iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port %s' % self.port)
|
||||
|
||||
t = threading.Thread(name='send_packets', target=self.send_packets, args=(pkt,self.interface,self.debug,))
|
||||
t.setDaemon(True)
|
||||
t.start()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue