Sample Header Ad - 728x90

how to modify pcap file for Additional Information in packet

1 vote
1 answer
1346 views
I have one Pcap File which consist of Some Information. ------------------------------------------------------- I need to modify the data in the file. Example: wireshark details As you can see There are details of packets and in **Additional Record** section I have TXT value
=Room 110
Now please help me to change the TXT value > Example: from
: fn=Room 110
to
: fn=Room 1234
Example End ## Things I have Done So Far ## ### 1. Used Scapy and Hex Editor To change the Metadata. ### with Scapy I have done changes like Changing Destination address or mac address and ports. But unable to change the TXT records with scapy. With Hex I am able to change TXT value by converting the String to hex, but I face challenge in different length. > Example: I can Chnage
: fn=Room 110
to
: fn=Room 123
> But Can't Change from
: fn=Room 110
to
: fn=Room 1234
In this case, the generated pcap gets invalid. #### Here is a sample working Screenshot Using Python #### Python Program This code Changes The Destination Mac, Source IP and TXT=Room And That TXT value is being modified by Checking the HEX Value before and after the "TXT: fn=Room" of the packet. ### Any help regarding this Issue is very very appreciated ### Thank you.
Asked by Amogh Saxena - REXTER (226 rep)
Jan 28, 2022, 12:31 PM
Last activity: Jan 28, 2022, 04:36 PM