Skip to content

Instantly share code, notes, and snippets.

View djeraseit's full-sized avatar
🎯
Focusing

Theodis Butler djeraseit

🎯
Focusing
View GitHub Profile
@djeraseit
djeraseit / RPIwithQEMU.md
Created November 3, 2021 17:30 — forked from plembo/RPIwithQEMU.md
Emulating a Raspberry Pi with QEMU

Emulating a Raspberry Pi with QEMU

Goal: Emulate a Raspberry Pi with QEMU in order to run the Raspbian O/S (based on Debian Linux).

The current setup is not ideal. For one thing, the maximum RAM allowed using the "versatile-pb" firmware is 256 Mb. In addition, only the most basic peripherals, a keyboard and mouse, are supported.

A number of articles have been written on this topic. Most are outdated, and the few recent ones are missing key information.

@djeraseit
djeraseit / qemu-system-raspberry.sh
Created November 3, 2021 17:29 — forked from FrankSpierings/qemu-system-raspberry.sh
Run Raspberry Pi in qemu-system-arm using versatilepb 'hardware'
#!/bin/sh
#https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.13-jessie
KERNEL=kernel-qemu-4.4.13-jessie
#https://downloads.raspberrypi.org/raspbian_lite_latest + https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
IMAGE=2016-05-27-raspbian-jessie-lite.img
export QEMU_AUDIO_DRV="none"
qemu-system-arm -kernel ${KERNEL} \
-cpu arm1176 \
-m 256 \
-M versatilepb \
@djeraseit
djeraseit / gist:8a738fced58bb9c2696916b3bbbdc70b
Created October 7, 2021 00:44 — forked from msmuenchen/gist:9318327
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)
@djeraseit
djeraseit / SolidWorks_Spoof.sh
Created August 28, 2021 22:35 — forked from W-Floyd/SolidWorks_Spoof.sh
Simple script to make a Virtualbox VM hidden enough to install SolidWorks
#!/bin/bash
__get_random_string () {
openssl rand -hex "${1}" | cut -c "1-${1}"
}
__my_vm='W10'
@djeraseit
djeraseit / tunnelbroker-net.sh
Created August 28, 2021 22:34 — forked from W-Floyd/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Linux)
#!/bin/bash
# This script is published by Philipp Klaus <[email protected]>
# on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
# It is originally by freese60 and modified by limemonkey.
# Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
# Further modified by pklaus, at <https://gist.github.com/pklaus/960672>
# Forked and mostly replaced by W-Floyd, <https://gist.github.com/W-Floyd/20a4c16ceb1e008cb995b7ff7dcc0a2a>
###############################################################################
@djeraseit
djeraseit / zero_strip.sh
Created August 28, 2021 22:33 — forked from W-Floyd/zero_strip.sh
A one-liner sed expression to nicely strip leading and trailing 0's from each line of piped input
################################################################################
# ... | __zero_strip
################################################################################
#
# Zero Strip
#
# A one-liner sed expression to nicely strip leading and trailing 0's from each
# line of piped input.
#
# For example:
@djeraseit
djeraseit / torrc
Created August 20, 2021 18:17 — forked from mort3za/torrc
Using tor with bridges, torrc example config (bit.ly/m3torrc)
# sudo apt-get install obfs4proxy obfsproxy tor
# sudo vi /etc/tor/torrc
UseBridges 1
ClientTransportPlugin obfs3 exec /usr/bin/obfsproxy managed
ClientTransportPlugin obfs4 exec /usr/bin/obfs4proxy managed
# send email to [email protected] with body `get transport obfs4` you can get new bridges.
bridge obfs4 195.154.49.15:44705 BACD07DACE996093DC7635F33A98C49... cert=xc/wtKNWADfJQf232xSXT0WpzsaINw6fgPvZBy5Rkw4.../ypaZPDug9L... iat-mode=0
@djeraseit
djeraseit / export existing ssh private key to opengpg card.md
Created August 20, 2021 06:21 — forked from artizirk/export existing ssh private key to opengpg card.md
Export existing private ssh key to OpenPGP card or Yubikey

Export existing private ssh key to OpenPGP card or Yubikey

Before you begin

This will only work with OpenPGP v2.0 or newer or with PIV cards. Your existing ssh key has to be in a format that is supported by your opengpg card. For example my the OpenPGP V2.1 Card from FLOSS Shop supports only 2048 bit RSA keys. RSA exponent should be 65537, Putty and old OpenSSH releases use different expnent that for example Yubikey does not support.

Required software

@djeraseit
djeraseit / gnupg_scdaemon.md
Created August 20, 2021 05:12 — forked from artizirk/gnupg_scdaemon.md
OpenPGP SSH access with Yubikey and GnuPG

OpenPGP SSH access with Yubikey and GnuPG

Yubikey, Smart Cards, OpenSC and GnuPG are pain in the ass to get working. Those snippets here sould help alleviate pain.

Yubikey Config under Ubuntu

To reset and disable not used modes on Yubikey you need the ykman program

You can install it using those commands

@djeraseit
djeraseit / gpg_test.py
Created August 17, 2021 19:28 — forked from ryantuck/gpg_test.py
working example of using gnupg in python
# install:
# pip3 install python-gnupg
# note - gpg needs to be installed first:
# brew install gpg
# apt install gpg
# you may need to also:
# export GPG_TTY=$(tty)