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
# Shellcode (linux, 32-bit, little-endian) | |
# --------- | |
# execve("/bin/sh", { "/bin/sh", "-p" }, NULL) | |
start: | |
# Calculate and store "-p" | |
mov $0x0101712E, %eax | |
sub $0x01010101, %eax | |
push %eax | |
mov %esp, %ecx |
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
class PromiseHandle<T> { | |
private _resolve!: (value: T | PromiseLike<T>) => void; | |
private _reject!: (reason?: unknown) => void; | |
private _promise: Promise<T>; | |
private _resolved: boolean = false; | |
private _rejected: boolean = false; | |
public constructor() { | |
this._promise = new Promise<T>((resolve, reject) => { | |
this._resolve = resolve; |
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 crypto from "crypto"; | |
const UUIDPattern = | |
/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i; | |
export class InvalidUUIDError extends Error { | |
public get name() { | |
return this.constructor.name; | |
} |
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
/* | |
* Copyright (C) 2021-2022 John Hunter Kohler <[email protected]> | |
*/ | |
#include <stdlib.h> | |
#include <stdatomic.h> | |
#include <errno.h> | |
#include "threads.h" | |
union thrd_routine_info { | |
int ret; |
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
/* | |
* Copyright (C) 2021 Hunter Kohler <[email protected]> | |
*/ | |
import fs from "fs"; | |
import path from "path"; | |
interface WalkdirOptions { | |
withFileTypes?: boolean; | |
followlinks?: boolean; | |
files?: boolean; |
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
Show hidden characters
{ | |
"$schema": "https://json.schemastore.org/eslintrc", | |
"env": { | |
"es6": true, | |
"node": true | |
}, | |
"plugins": [], | |
"extends": [], | |
"globals": {}, | |
"ignorePatterns": [], |
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
/* | |
* Copyright (C) 2021 Hunter Kohler <[email protected]> | |
*/ | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/mman.h> | |
#include "reljump.h" | |
size_t page_size() | |
{ |
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 python3 | |
import pathlib | |
import subprocess | |
import tempfile | |
def main(): | |
result = subprocess.run( | |
["pip3", "freeze"], text=True, capture_output=True, check=True) |
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
# System Files | |
.DS_Store | |
# Editor Files | |
.vscode/ | |
# Build Directories | |
bin/ | |
build/ | |
dist/ |
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
/* | |
* Wraps the template parameter without changing any semantics. Good | |
* for wrapping pointers. | |
*/ | |
template <typename Iterator> | |
class normal_iterator { | |
public: | |
using difference_type = typename std::iterator_traits<Iterator>::difference_type; | |
using value_type = typename std::iterator_traits<Iterator>::value_type; | |
using pointer = typename std::iterator_traits<Iterator>::pointer; |
NewerOlder