Open TIMBER2024 opened 1 month ago
from scapy.all import *
def spoof_ip_packet(source_ip, destination_ip, data="Hello, this is a spoofed packet"):
packet = IP(src=source_ip, dst=destination_ip) / ICMP() / data
# Send the packet
send(packet, verbose=0) # verbose=0 to not print each packet sent
if name == "main":
source_ip = "192.168.1.100" # Spoofed source IP
destination_ip = "192.168.1.255" # Broadcast or specific IP within your network
spoof_ip_packet(source_ip, destination_ip)
print("A spoofed packet has been sent.")
Proposal