Last active
April 2, 2022 10:26
-
-
Save fatihsnsy/424b5bc93967661856ad26616e233b85 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from scapy.all import * | |
mapping = {0x04 :"a", | |
0x05 :"b", | |
0x06 :"c", | |
0x07 :"d", | |
0x08 :"e", | |
0x09 :"f", | |
0x0A :"g", | |
0x0B :"h", | |
0x0C :"i", | |
0x0D :"j", | |
0x0E :"k", | |
0x0F :"l", | |
0x10 :"m", | |
0x11 :"n", | |
0x12 :"o", | |
0x13 :"p", | |
0x14 :"q", | |
0x15 :"r", | |
0x16 :"s", | |
0x17 :"t", | |
0x18 :"u", | |
0x19 :"v", | |
0x1A :"w", | |
0x1B :"x", | |
0x1C :"y", | |
0x1D :"z", | |
0x1E :"1", | |
0x1F :"2", | |
0x20 :"3", | |
0x21 :"4", | |
0x22 :"5", | |
0x23 :"6", | |
0x24 :"7", | |
0x25 :"8", | |
0x26 :"9", | |
0x27 :"0", | |
0x2C :"Spacebar", | |
0x2D :"-", | |
0x2E :"=", | |
0x2F :"[", | |
0x30 :"]", | |
0x31 :"\", | |
0x33 :";", | |
0x34 :"‘", | |
0x37 :".", | |
0x38 :"/", | |
0x39 :"Caps", | |
0x55 :"*", | |
0x56 :"-", | |
0x57 :"+", | |
0x59 :"1", | |
0x5A :"2", | |
0x5B :"3", | |
0x5C :"4", | |
0x5D :"5", | |
0x5E :"6", | |
0x5F :"7", | |
0x60 :"8"} | |
flag = [] | |
packets = rdpcap('data.pcap') | |
for each_packet in packets : | |
special_byte = each_packet[0].load[-6] | |
flag.append(mapping[special_byte]) | |
print("".join.(flag)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment