728x90 ๐จ๐ผ๐ป๊ฐ๋ฐ/Scapy3 Scapy - ํ์ด์ฌ Scapy๋ก ์์ดํผ ์คํธํ from scapy.all import * A = "192.168.1.254" # spoofed source IP address B = "192.168.1.105" # destination IP address C = RandShort() # source port D = 80 # destination port payload = "yada yada yada" # packet payload while True: spoofed_packet = IP(src=A, dst=B) / TCP(sport=C, dport=D) / payload send(spoofed_packet) ์ถ์ฒ: https://stackoverflow.com/questions/38956401/ip-spoofing-in-python-3 IP Spoo.. 2022. 7. 27. Scapy - Scapy๋ก ftp ๊ณ์ ์ ๋ณด ์์๋ด๊ธฐ #!/usr/bin/python from scapy.all import* protocols = {1:'ICMP', 6:'TCP', 17:'UDP'} def showPacket(packet): src_ip = packet[0][1].src dst_ip = packet[0][1].dst proto = packet[0][1].proto if proto in protocols: print( "protocol: %s: %s -> %s" %(protocols[proto], src_ip, dst_ip) ) print( "data: ", packet[0][1].payload ) if proto == 1: print( "TYPE: [%d], CODE[%d]" %(packet[0][2].type, packet[0][2]... 2021. 12. 5. Scapy - Scapy๋ก ์ง๋๊ฐ๋ ํจํท ํ์ธํ๊ธฐ #!/usr/bin/python from scapy.all import* protocols = {1:'ICMP', 6:'TCP', 17:'UDP'} def showPacket(packet): src_ip = packet[0][1].src dst_ip = packet[0][1].dst proto = packet[0][1].proto if proto in protocols: print( "protocol: %s: %s -> %s" %(protocols[proto], src_ip, dst_ip) ) if proto == 1: print( "TYPE: [%d], CODE[%d]" %(packet[0][2].type, packet[0][2].code) ) def sniffing(filter): sniff(filt.. 2021. 12. 5. ์ด์ 1 ๋ค์ 728x90