zsh
python3
tmux
cloudflared
mitmproxy
- javascript:alert(origin)
- @maple3142
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
rpc-secret=maple3142 | |
enable-rpc=true | |
rpc-allow-origin-all=true | |
rpc-listen-all=true | |
max-concurrent-downloads=5 | |
continue=true | |
max-connection-per-server=16 | |
min-split-size=10M | |
split=10 | |
max-overall-download-limit=0 |
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
from lll_cvp import * | |
from functools import partial | |
def example1(): | |
# copied from https://github.com/rkm0959/Inequality_Solving_with_CVP/blob/main/Example%20Challenge%204%20-%20HITCON%20CTF%202019%20Quals%20-%20not%20so%20hard%20RSA/solve_challenge_4.sage | |
## Example 4 : HITCON CTF 2019 Quals not so hard RSA | |
## d is 465 bits |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <dlfcn.h> | |
__attribute__((constructor)) void init() { | |
putenv("LD_PRELOAD="); | |
system("sh"); | |
exit(0); | |
} | |
// gcc -shared -fPIC hook.c -o hook.so -ldl -Os -s -Wall |
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 mem = new Uint8Array(Module.asm.memory.buffer) | |
function encode(str) { | |
return new TextEncoder().encode(str) | |
} | |
function decode(arr) { | |
return new TextDecoder().decode(arr) | |
} |
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
from tqdm import tqdm, trange | |
from Crypto.Util.number import getPrime | |
ps = [getPrime(128) for _ in trange(600, desc="Generate primes")] | |
P = prod(ps) | |
T = [(P // p) * inverse_mod(P // p, p) for p in tqdm(ps, desc="Fast CRT coefficients")] | |
Tslow = [ | |
crt([0] * i + [1] + [0] * (len(ps) - i - 1), ps) | |
for i in trange(len(ps), desc="Slow CRT coefficients") |
conda create --name ctf sage=10.2 -c conda-forge
pip install web3 pwntools numpy z3-solver==4.11.2.0 httpx fastecdsa pytesseract pyshark flask-unsign flask-unsign[wordlist] binteger websockets pycryptodome ecdsa black gunicorn websockets waitress git-dumper ptrlib gunicorn[gevent] ropper tqdm flask r2pipe PyExifTool python-docx pillow numpy pycurl galois networkx pyshark gradient-free-optimizers bottle playwright
with more ml stuffs:
conda create --name ctf sage=10.2 -c conda-forge scikit-learn pandas pytorch matplotlib torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
# not supported by Python 3.11
# pip install cvc5
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
while true; do mkfifo pipe; stdbuf -o0 cat pipe | nc -lv 7777 | ( read line; reqpath="$(echo "$line" | sed -nE 's/GET ([^ ]*) HTTP.*/\1/p')"; echoparam="$(echo "$reqpath" | cut -d '?' -f2 | awk 'BEGIN { RS="&"; FS="=" } { if ($1 == "echo") print $2 }')"; response=$echoparam; if [[ $reqpath == '/' ]]; then response='<form><input name="echo"><button>Echo</button></form>'; fi; printf 'HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n'; printf '%s' "$response" ) > pipe; rm pipe; done |
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
[Interface] | |
PrivateKey = REDACTED | |
Address = 172.16.0.2/32 | |
MTU = 1280 | |
[Peer] | |
PublicKey = REDACTED | |
# 0.0.0.0/0 - (0.0.0.0/8, 10.0.0.0/8, 127.0.0.0/8, 169.254.0.0/16, 172.16.0.0/12, 192.168.0.0/16, 240.0.0.0/4, 162.159.192.1/32, 1.1.1.1/32) + 172.16.0.0/24 | |
# 162.159.192.1 is for engage.cloudflareclient.com | |
# reference: https://github.com/ViRb3/wgcf/issues/42, https://www.procustodibus.com/blog/2021/03/wireguard-allowedips-calculator/ |
Download static tailscaled binary here
TAILSCALED_SOCKET="/tmp2/$USER/tailscaled.sock"
TAILSCALED_STATE="tailscaled.state"
./tailscaled --tun=userspace-networking --state="$TAILSCALED_STATE" --socket "$TAILSCALED_SOCKET"
NewerOlder