Skip to content

Instantly share code, notes, and snippets.

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
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
@blluv
blluv / DLL_COPY.cpp
Last active January 27, 2024 16:47
#include "pch.h"
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <shlwapi.h>
#pragma comment(lib, "shlwapi")
DWORD run(LPVOID lpThreadParameter);
#!/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
@blluv
blluv / s-rand.py
Created September 24, 2023 14:09 — forked from integeruser/s-rand.py
Python port of the GLIBC rng
#!/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):
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)))
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)
export LD_LIBRARY_PATH=/data/data/com.termux/files/usr/lib
export PATH=${PATH}:/data/data/com.termux/files/usr/bin
export HOME=/sdcard/HOME
@blluv
blluv / Dockerfile
Last active May 25, 2023 02:36
pwn docker
FROM --platform=amd64 ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ Asia/Seoul
ENV PYTHONIOENCODING UTF-8
ENV LC_CTYPE C.UTF-8
WORKDIR /root
f"{get_func_name(get_screen_ea())}+{get_screen_ea() - get_name_ea_simple(get_func_name(get_screen_ea()))}"