Python Scapy + C question

0xdeadbeef

n00b
Joined
May 24, 2022
Messages
1
Hi there
I‘m trying to investigate the next task: I created a DNS template packet with Scapy, and save it into pkt.bin file. „template“ means here that I have fields filled with „bbbbb“ „aaaaa“ etc

Now I want to send packets with C code, just to make the process faster than it would be with python scapy. To do this I plan to read the packet template with C code, and edit it, e.g change „bbbbb“ to real IP address in cycle, and then send.


Does anyone could help me how can I read the template packet with Tracking the required „bbbbb“ positions?
hexdump -C displays the packet without some strings, and it seems that I did not write the proper fields.. but they were, of course, scapy opens the template packet in the right way, and displays its content.
 

Eulogy

2[H]4U
Joined
Nov 9, 2005
Messages
2,896
Hm. New poster asking about things that could be nefarious. Going to tread lightly here.
Why did you choose C for the next part of this "project"? Why do you think it'll be faster than python? What is your project and actual end goals?
 

GoldenTiger

Fully [H]
Joined
Dec 2, 2004
Messages
26,511
Hm. New poster asking about things that could be nefarious. Going to tread lightly here.
Why did you choose C for the next part of this "project"? Why do you think it'll be faster than python? What is your project and actual end goals?
Heh, no shocker he never showed back.
 
Top