corrected some logic

This commit is contained in:
byt3bl33d3r 2014-07-22 22:25:17 +02:00
parent 07a15922f2
commit 44f0d1ae6d

View file

@ -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()