Skip to content

Instantly share code, notes, and snippets.

View hericah's full-sized avatar
🎯
Focusing

Heri hericah

🎯
Focusing
View GitHub Profile
@hericah
hericah / docker-shell.sh
Created June 7, 2022 03:16 — forked from Hypnosphi/docker-shell.sh
Run docker container, mount current working directory and get interactive shell
docker run -ti -v $(pwd):/tmp -w /tmp DOCKER_IMAGE /bin/bash
@hericah
hericah / generate_key.sh
Created September 28, 2021 01:41 — forked from cevaris/generate_key.sh
Sign and Verify using Python pycrypto
#!/usr/bin/env bash
# Generate RSA private key
openssl genrsa -out private_key.pem 1024
@hericah
hericah / parse_pbzx.py
Created September 27, 2021 04:34 — forked from pudquick/parse_pbzx.py
Pure python reimplementation of .cpio.xz content extraction from pbzx file payload for OS X packages
# Pure python reimplementation of .cpio.xz content extraction from pbzx file payload originally here:
# http://www.tonymacx86.com/general-help/135458-pbzx-stream-parser.html
#
# Cleaned up C version (as the basis for my code) here, thanks to Pepijn Bruienne / @bruienne
# https://gist.github.com/bruienne/029494bbcfb358098b41
# Example usage:
# parse_pbzx('PayloadJava', 'PayloadJava.cpio.xz')
# Updated for speeeeeeeeeeeeed
@hericah
hericah / dbus-send-modem-command.sh
Last active September 18, 2021 23:13 — forked from parrotmac/dbus-send-modem-command.sh
Send serial command to modem using ModemManager via DBus
#!/bin/sh
# Sends command 'ATI' to modem #3
# Get a list of modems by running `mmcli -L`
# Timeout is (probably) 2 seconds
# Also see https://www.freedesktop.org/software/ModemManager/api/latest/gdbus-org.freedesktop.ModemManager1.Modem.html#gdbus-method-org-freedesktop-ModemManager1-Modem.Command
dbus-send --system --dest=org.freedesktop.ModemManager1 --print-reply /org/freedesktop/ModemManager1/Modem/3 org.freedesktop.ModemManager1.Modem.Command string:'ATI' uint32:2000
@hericah
hericah / main.cpp
Created April 17, 2019 12:58
CPP Code
static void main(int argc, char[] *argv){
}