Skip to content

Instantly share code, notes, and snippets.

@kkrypt0nn
Created April 3, 2022 18:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkrypt0nn/aa1b77498c73f841c9e7ddcb25f15a9b to your computer and use it in GitHub Desktop.
Save kkrypt0nn/aa1b77498c73f841c9e7ddcb25f15a9b to your computer and use it in GitHub Desktop.
Solution for challenge Netflix and CTF at the Space Heroes 2022 CTF
import pyshark
import urllib.parse
capture = pyshark.FileCapture("netflix-and-ctf.pcap")
data = []
show_data = ""
for packet in capture:
try:
if "browse" in packet.layers[3]._all_fields["http.response_for.uri"]:
data.append(show_data)
show_data = ""
continue
show_data += urllib.parse.unquote(packet.layers[3]._all_fields["http.response_for.uri"].replace("http://10.10.100.124:8060/keypress/Lit_", ""))
except:
pass
for show in data:
if "shctf" in show:
print(f"Special show found: {show}")
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment