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 ctypes | |
import enum | |
import os | |
SYS_landlock_create_ruleset = 444 | |
SYS_landlock_add_rule = 445 | |
SYS_landlock_restrict_self = 446 | |
PR_SET_NO_NEW_PRIVS = 38 |
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 collections | |
import os | |
import multiprocessing | |
import socket | |
import signal | |
import subprocess | |
import pathlib | |
import tempfile | |
import time | |
import shutil |
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 |
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"); |
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") |
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"]} |
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)); | |
} |
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 |