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 / cnxsoft.md
Created November 6, 2021 21:54 — forked from stefanozanella/cnxsoft.md
Emulate a Raspberry Pi with Qemu+ KVM

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
@djeraseit
djeraseit / firewall.user
Created November 6, 2021 18:53
OpenWRT Bridge Firewall Rules
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
# Comma seperated list of blocked tcp ports. These can be anything,
@djeraseit
djeraseit / ip6tables_setup.bash
Created November 6, 2021 18:26 — forked from velizarn/ip6tables_setup.bash
Basic setup for ip6tables - drop all traffic except local, ICMP and DHCPv6 traffic.
#!/bin/bash
# http://serverfault.com/questions/410321/debian-ip6tables-rules-setup-for-ipv6/410327#410327
# http://ipset.netfilter.org/iptables.man.html
# https://www.sixxs.net/wiki/IPv6_Firewalling
# https://www.cyberciti.biz/faq/ip6tables-ipv6-firewall-for-linux/
# https://gist.github.com/thomasfr/9712418
# https://gist.github.com/SnakeDrak/f4150f6e517e5a1d525f
# http://www.thegeekstuff.com/2011/06/iptables-rules-examples
# http://www.thegeekstuff.com/scripts/iptables-rules
@djeraseit
djeraseit / etc_firewall.ipv6net.sh
Created November 4, 2021 18:57 — forked from pklaus/etc_firewall.ipv6net.sh
Firewall Rules for IPv6 on OpenWrt via Tunnels
#!/bin/ash
# Found on https://forum.openwrt.org/viewtopic.php?pid=135197
#
# Some important definitions used by this script.
# Only edit these in case something has changed and if you know
# what you are doing.
#
# IPT6: path to the ip6tables binary
@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 / openwrt-integrity.sh
Last active October 10, 2021 07:39
OpenWRT Integrity Checker
#/bin/sh
# Check integrity of all files
SCRIPTNAME=$(basename $0) # name of this script
PCKGLIST=/etc/config/opkg.installed # location to save package list
KERNEL_VER=$(uname -r)
# Define base firmware model
MODEL=glinet_gl-mt300n-v2
SOC=mipsel_24kc
@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 <philipp.l.klaus@web.de>
# 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>
###############################################################################