Skip to content

Instantly share code, notes, and snippets.

@commiebstrd
commiebstrd / keybase.md
Created October 7, 2014 15:51
Keybase authentication

Keybase proof

I hereby claim:

  • I am commiebstrd on github.
  • I am commiebstrd (https://keybase.io/commiebstrd) on keybase.
  • I have a public key whose fingerprint is CB35 C786 56F1 71B7 7CEB 8D24 6E2F 7CA1 6E1C 8F68

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am 40byteCTF on github.
  • I am 40bytectf (https://keybase.io/40bytectf) on keybase.
  • I have a public key whose fingerprint is 425B B1C1 1FCD D272 C54C 526A 6AB5 74BA 68A8 2A54

To claim this, I am signing this object:

import socket
class my_sock():
def __init__(self):
self.host = "" # hostname\IP
self.port = 0 # port
self.af_inet = socket.AF_INET # sock type
self.proto = socket.SOCK_STREAM # sock proto
@commiebstrd
commiebstrd / rust_wasm_osx.md
Created November 26, 2017 18:53
Targetting WASM from Rust on OSX

Rust stable (nightly) wasm on osx

Basic setup taken from The Path to Rust on the Web

  • Installing managed tools src src2
    • rustup target add wasm32-unknown-emscripten
    • brew install emscripten
    • brew install clang nodejs git - for llvm
  • Running cargo build --target=wasm32-unknown-emscripten claims to work but no wasm or js are created
    • emcc -v complains about system llvm not having wasm target
@commiebstrd
commiebstrd / multi-line_asm.rs
Last active January 5, 2018 04:50
execute multiple inline assembly instructions with a single asm!{} invocation!
#![feature(asm)]
fn calc() -> usize {
let mut a: usize = 0;
unsafe {
asm!(/* Instructions: for(i=10; 0<i; i--){ a+=i } */
"mov rcx, 10\n\t" /* rcx = 10 - i - counter */
"xor rax, rax\n\t" /* rax = 0 - a - storage */
"loop:\n\t" /* label */
"add rax, rcx\n\t" /* rax+=rcx */
@commiebstrd
commiebstrd / Makefile
Last active February 9, 2022 17:05
c include thing
build:
gcc -o bin main.c pipe.c patch.c
clean:
rm -f bin
@commiebstrd
commiebstrd / encode.py
Last active March 23, 2022 21:03
encode shellcode from a sentence or byte array
#!env python3
# -*- coding: utf-8 -*-
import sys
import string
import logging
from random import randint
from pprint import pprint
def get_random(val, max):
@commiebstrd
commiebstrd / archinstall.md
Last active March 25, 2024 16:16
archlinux EFI + TPM