2024-02-15 00:26:10 +02:00
|
|
|
#!/usr/bin/env python3
|
2024-01-07 02:02:52 +02:00
|
|
|
#replay the "trigger" packet.
|
|
|
|
#this packets will start the source broadcasting its packets.
|
|
|
|
|
|
|
|
import base64
|
|
|
|
from scapy.all import *
|
2024-02-17 15:43:20 +02:00
|
|
|
from dotenv import load_dotenv
|
|
|
|
import os
|
|
|
|
|
|
|
|
load_dotenv()
|
2024-01-07 02:02:52 +02:00
|
|
|
|
|
|
|
# Base64 encoded packet data
|
|
|
|
encoded_packet = "////////AAFsWfAKCABFAAA4KB0AAIARkEfAqAABwKgA/x+bH5wA2QAAASABgBtAACAAAAAAAAAADwAAAAEAAAEAACArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//////////////////////////////////////////AAAAAAAAAAIBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
|
|
|
|
|
|
|
|
|
|
|
|
# Decode the Base64 encoded packet
|
|
|
|
decoded_packet = base64.b64decode(encoded_packet)
|
|
|
|
|
|
|
|
# Load packet with Scapy
|
|
|
|
packet = Ether(decoded_packet)
|
|
|
|
#print(packet.show(dump=True))
|
|
|
|
|
2024-02-17 15:43:20 +02:00
|
|
|
iface = os.environ.get('THERMALCAM_IFACE', 'enp1s0f0')
|
|
|
|
print(f'using interface {iface}')
|
|
|
|
|
2024-01-07 02:02:52 +02:00
|
|
|
# (packet)
|
2024-02-17 15:43:20 +02:00
|
|
|
sendp(packet, iface=iface)
|