Skip to content

Instantly share code, notes, and snippets.

@spipm
spipm / handy.txt
Created February 16, 2024 19:40
A handy guide for our project
IMPORTANT HANDY TIPS:
@spipm
spipm / handy.txt
Created February 12, 2024 20:42
A handy guide for our project
IMPORTANT HANDY TIPS:
@spipm
spipm / extract_dockerimage.sh
Created June 23, 2023 17:24
Extract docker container image to folder
#!/bin/bash
docker create --name extract_test repo.foo.bar/some_image:v1337
mkdir container
docker export extract_test | tar xvf - -C container
@spipm
spipm / pxe-boot.sh
Last active July 7, 2024 17:25
Create (UEFI/Secureboot) PXE boot server on interface
#!/bin/bash
# Run PXE boot server on interface
# Seems to work with UEFI and Secureboot
# Spip, 2023
#
# Most stuff from https://www.youtube.com/watch?v=E_OlsA1hF4k
#
# Check args
@spipm
spipm / hackrf_read.c
Created March 17, 2019 20:09
libHackRF API example
/*
Simple HackRF programming exercise
Sipke '19
This program receives raw data from a certain frequency until the user pressed ctrl+c.
Code is mostly taken from hackrf_sweep.c (hackrf toolbox) and converted to the bare minimum.
It's created to learn about how the HackRF behaves and to do something with it via custom code that doesn't involve GnuRadio.
Note that you can directly use the command line tools hackrf_sweep, hackrf_transfer and rtl_sdr for the same thing and more.
@spipm
spipm / getModulus.py
Created November 7, 2017 18:43
Get an RSA modulus from a server
import ssl
from Crypto.Util import asn1
from OpenSSL.crypto import FILETYPE_PEM, FILETYPE_ASN1, load_certificate, dump_privatekey
def getModulusFromServer(host, port=443):
try:
# get cert from server
cert = ssl.get_server_certificate((host,port))
# load certificate