View sandbox.py
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
import os | |
import socket | |
import subprocess | |
import signal | |
import ctypes | |
def sandbox(target, *, privileged=True): | |
CLONE_NEWNS = 0x00020000 # New mount namespace group | |
CLONE_NEWCGROUP = 0x02000000 # New cgroup namespace |
View printmaps.js
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
const width = "8.5in"; | |
const height = "11in"; | |
function sleep(s) { | |
var sleepTime = 1000; | |
return new Promise(resolve => setTimeout(resolve, sleepTime)); | |
} | |
var body = document.querySelector("body"); | |
var content = document.querySelector("#content-container"); |
View debug.py
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
if __name__ == "__main__": | |
try: | |
main() | |
except Exception as e: | |
import sys, os, traceback | |
traceback.print_exc() | |
os.system("pip install remote-pdb") |
View ropshipai_plot.py
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
import requests | |
import matplotlib.pyplot as plt | |
response = requests.get("https://oooverflow.io/dc-ctf-2020-finals/final_tick.json") | |
data = response.json() | |
teams = {e["id"]: e["name"] for e in data["teams"]} | |
services = {e["id"]: e["name"] for e in data["services"]} |
View signup_for_class.js
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
// google-chrome --headless --disable-gpu --remote-debugging-port=9222 <website> | |
// ssh -L localhost:1337:localhost:9222 <server> | |
// document.querySelector("#username").value = "<username>"; | |
var attempts = 0; | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} |
View hack_the_planet.py
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 python2 | |
# This code was written 10 hours before the competition, yikes | |
# Any bugs are your problem | |
import socks # pip install PySocks | |
import socket | |
socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', 4444) | |
socket.socket = socks.socksocket |