This file contains hidden or 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
colima start -p x64 -a x86_64 -c 1 -m 2 -d 32 --vm-type qemu | |
alias start_pwn1804="DOCKER_HOST=unix:///Users/luv/.colima/x64/docker.sock docker run --security-opt seccomp=unconfined --privileged --cap-add=SYS_PTRACE -v ./:/pwn -it pwn:ubuntu1804 bash" | |
alias start_pwn2004="DOCKER_HOST=unix:///Users/luv/.colima/x64/docker.sock docker run --security-opt seccomp=unconfined --privileged --cap-add=SYS_PTRACE -v ./:/pwn -it pwn:ubuntu2004 bash" | |
alias start_pwn2204="DOCKER_HOST=unix:///Users/luv/.colima/x64/docker.sock docker run --security-opt seccomp=unconfined --privileged --cap-add=SYS_PTRACE -v ./:/pwn -it pwn:ubuntu2204 bash"" |
This file contains hidden or 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 rlp | |
import secp256k1 | |
from Crypto.Hash import keccak | |
import requests | |
GWEI = 1000000000 | |
PRIV_KEY = bytes.fromhex( | |
"" | |
) |
This file contains hidden or 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 <openssl/ec.h> | |
#include <openssl/obj_mac.h> | |
#include <openssl/objects.h> | |
#include <openssl/evp.h> | |
#include <openssl/pem.h> | |
#include <openssl/core_names.h> | |
void print_hex(const unsigned char *buf, size_t buf_len) | |
{ | |
for (size_t i = 0; i < buf_len; i++) |
This file contains hidden or 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
gst-launch-1.0 rtpbin name=rtpbin \ | |
udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp,media=audio,clock-rate=48000,encoding-name=OPUS,payload=111" ! rtpbin.recv_rtp_sink_0 \ | |
udpsrc address=127.0.0.1 port=5001 caps="application/x-rtp,media=video,clock-rate=90000,encoding-name=VP8,payload=96" ! rtpbin.recv_rtp_sink_1 \ | |
rtpbin. ! rtpopusdepay ! opusparse ! mux. \ | |
rtpbin. ! rtpvp8depay ! mux. \ | |
webmmux name=mux ! filesink location=out.webm |
This file contains hidden or 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 BitStream: | |
def __init__(self, data: bytes): | |
self.data = data | |
self.bitOffset = 0 | |
def read_bits(self, bits: int): | |
if (bits + self.bitOffset) // 8 > len(self.data): | |
raise EOFError() | |
res = 0 |
This file contains hidden or 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 "pch.h" | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#include <shlwapi.h> | |
#pragma comment(lib, "shlwapi") | |
DWORD run(LPVOID lpThreadParameter); |
This file contains hidden or 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
#!/bin/bash | |
if [ $# -ne 3 ]; then | |
echo "Usage: $0 {pack|unpack} cpio.gz-file dest" | |
exit -1 | |
fi | |
if [ $1 = "pack" ]; then | |
(cd $3 && find . -print0 | cpio -o -H newc --null) | gzip -9 > $2 | |
fi |
This file contains hidden or 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 | |
from ctypes import c_int, c_uint | |
# http://www.mscs.dal.ca/~selinger/random/ | |
def srand(seed): | |
srand.r = [0 for _ in range(34)] | |
srand.r[0] = c_int(seed).value | |
for i in range(1, 31): |
This file contains hidden or 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
def printAsTable(d: list, index=False): | |
headers = list(d[0].keys()) | |
body = [] | |
for row in d: | |
body.append(list(map(lambda v: row.get(v, ""), headers))) | |
if index: | |
headers = [""] + headers | |
body = list(map(lambda v: [v[0]] + v[1], enumerate(body))) |
This file contains hidden or 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
def printTree(tree, parentIdx=None, depth=0): | |
nodes = filter(lambda t: t["parentIdx"] == parentIdx, tree) | |
for node in nodes: | |
print("\t" * depth, node["name"], sep="") | |
printTree(tree, node["idx"], depth + 1) |
NewerOlder