forensics/ph4nt0m_1ntrud3r
This commit is contained in:
Binary file not shown.
Executable
+20
@@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i python3 -p "python3.withPackages (ppkgs: with ppkgs; [ scapy ])"
|
||||
|
||||
from scapy.all import *
|
||||
from pathlib import Path
|
||||
from base64 import b64decode
|
||||
|
||||
def main():
|
||||
cap = rdpcap(str(Path(__file__).parent / 'myNetworkTraffic.pcap'))
|
||||
|
||||
sorted_packets = sorted(cap, key = lambda p: p.time)
|
||||
packet_data = [packet.load.decode() for packet in sorted_packets]
|
||||
decoded_data = [b64decode(chunk) for chunk in packet_data]
|
||||
concat_data = b''.join(decoded_data)
|
||||
flag = concat_data[concat_data.find(b'picoCTF'):].decode()
|
||||
print(flag)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user