Skip to content

Instantly share code, notes, and snippets.

Henry Wang theKidOfArcrania

View GitHub Profile
View dangling_detector.js
const asyncHooks = require('async_hooks');
const active = new Map();
const chained = new Set();
let callingThen = false;
let danglingSet = undefined;
const hook = asyncHooks.createHook({
init: (asyncId, type, trigger, resource) => {
if (type !== 'PROMISE') return;
const err = new Error('Potential dangling promise detected!');
View example.vm.c
// Here's an example source code using the VM compiler.
BEGIN_VM
MOVI(R_SP, 0)
MOVI(R_SYS, SYS_LS)
DEBUG()
SYSCALL()
MOVI(R_SYS, SYS_RANDOM)
SYSCALL()
View hook.asm
BITS 32
_printf: equ 0x0043C3E0
_WriteProcessMemory: equ 0x0043C400
_base:
hook_WriteProcessMemory:
push ebp
mov ebp, esp
View brop.py
from pwn import *
import threading, sys, struct
prefix = 'A' * 0x10 + p64(0x7fff262c0500)
crash_probe = 0xffffffff
hang_probe = 0x4009aa
TEST_PASS = 0
View brute.py
from pwn import *
import threading, sys
context.log_level = 'warning'
def printconn(msg):
p = remote('penguins.cool', 1337)
p.send(msg)
p.shutdown('send')
data = p.recvall()
View vmbuild.sh
#/bin/bash
set -eu
cd /tmp
_pushd() {
builtin pushd "$@" > /dev/null
}
alias pushd=_pushd
_popd() {
View decodehuffman.c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
typedef struct file {
char buff[0x1000];
int bitind;
View light_fence_patch.asm
BITS 64
%define REL_LOC 0x1CB0
%define REL_HUFF 0x18a0
%define REL_NSG 0x14a0
%macro xcall 1
db 0xe8
dd %1 - (REL_LOC + $ - $$ + 4)
%endmacro
View pwnadventure_lab3.asm
_start:
; greet user
mov edx, msg1end - msg1 ; arg2: message length
mov ecx, msg1 ; arg1: message
mov ebx, 1 ; arg0: stdout
mov eax, SYS_WRITE
int 0x80
; read in the input, expect "XXXXXXXX-XXXXXXXX"
mov edi, inbuf
View pwnadventure_lab1.asm
TERMINAL_INPUT = 0
TERMINAL_OUTPUT = 1
DOOR_CONTROL = 2
main:
.correct_pin = 0
.main_loop:
call ask_and_verify_code
test al, al
You can’t perform that action at this time.