Skip to content

Instantly share code, notes, and snippets.

View alxrogan's full-sized avatar

Aaron B alxrogan

  • 21:17 (UTC -05:00)
View GitHub Profile
@alxrogan
alxrogan / Dockerfile
Last active April 13, 2023 20:13
Dockerfile for genmon
# syntax=docker/dockerfile:1.2
FROM ubuntu:focal
WORKDIR /tmp
RUN apt update \
&& apt -y upgrade \
&& DEBIAN_FRONTEND="noninteractive" TZ="America/Chicago" apt install -yq sudo cron curl nano git \
build-essential libssl-dev libffi-dev \
python3-dev tzdata python3-pip cmake apt-utils \
&& apt-get autoremove -y \
&& apt-get clean
@alxrogan
alxrogan / restart-ha.sh
Created March 25, 2023 15:50
Scripts to restart HA Supervisor running in Docker compose with unsupported apps
#!/bin/bash
docker stop plex librenms_dispatcher librenms_syslogng librenms_snmptrapd librenms librenms_msmtpd librenms_db librenms_redis ntop-redis-1 ntop-ntopng-1
docker stop homeassistant
docker ps | grep " addon_" | cut -f 1 -d ' ' | xargs docker stop
docker ps | grep " hassio_" | cut -f 1 -d ' ' | xargs docker stop
docker compose -f /mnt/nfs-data/volumes/hassio-compose/docker-compose.yaml down
docker compose -f /mnt/nfs-data/volumes/hassio-compose/docker-compose.yaml pull
docker compose -f /mnt/nfs-data/volumes/hassio-compose/docker-compose.yaml up -d
sleep 30
docker start plex librenms_dispatcher librenms_syslogng librenms_snmptrapd librenms librenms_msmtpd librenms_db librenms_redis ntop-redis-1 ntop-ntopng-1
@alxrogan
alxrogan / .screenrc
Last active August 29, 2017 13:41 — forked from kaptain/.screenrc
Simple GNU Screen .screenrc file
#Defaults
startup_message off
vbell on
vbell_msg " Blue. Blue. "
#Setup hardstatus complete with formatting
hardstatus on
hardstatus alwayslastline
hardstatus string "%{= kg}[ %{G}%H %{g}] %{=}%-w%{+b w}%n %t%{-b w}%+w %{= kG}%-=%D %m/%d/%y | %C:%s %A | %1`%{-}"
How to make custom Hak5 LAN Turtle firmware images for mass deployment/etc
Aaron, @alxrogan
All testing done on Kali 2.X Rolling, with various things already installed. Make sure you have binwalk installed as well as liblzma-dev
1) Download the latest Turtle firmware from https://downloads.lanturtle.com/
2) Download the firmware-mod-kit from https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/firmware-mod-kit/fmk_099.tar.gz
3) cd to extracted fmk/src, ./configure and make
Get turtle online.
opkg update
opkg install ntpdate
ntpdate pool.ntp.org
Make sure that you change your hostname before you deploy the turtle to a target network, along with the MAC address. You can do this with the rc.local files as well as the if-pre.up scripts. You can also edit /etc/config/system file to change hostname and timezone (https://wiki.openwrt.org/doc/uci/system#time_zones)
You can also directly modify the /etc/config/network file
Install brew
pip install pyusb libusb1
git clone https://github.com/travisgoodspeed/md380tools
brew cask install gcc-arm-embedded
brew install md5sha1sum
@alxrogan
alxrogan / auto_update.sh
Created October 4, 2011 15:10
ubuntu auto-update script to keep systems up to date on patches/etc
#!/bin/bash
# Script Name: auto_update.sh
# Original Author Name: Keith Bawden
# Modified by : Aaron
# Date: Wed May 17 15:40:32 JST 2006
# Updated: Thur Feb 01, 2007
# Description: This script will:
# Clean up the local apt repository of retrieved packages (apt-get clean)
# Resync the package index (apt-get update)
# If called with AUTOUPDATE set to yes then updates will be downloaded and
@alxrogan
alxrogan / email_spoof.sh
Created October 4, 2011 15:07
simple nc script to spoof smtp
#!/bin/bash
#pass the SMTP server as the only argument, modify the port below if needed
( echo HELO foo.bar
sleep 2
echo MAIL FROM: \<[email protected]\>
sleep 2
echo RCPT TO: \<[email protected]\>
sleep 2
echo RCPT TO: \<[email protected]\>
sleep 2
@alxrogan
alxrogan / cd_backup.sh
Created October 4, 2011 15:00
Create an .iso file from .zip files, then burn those files to a CDROM using multi-session
#!/bin/bash
# Created by Aaron, 12-29-2003
# This script is meant to create an .iso file from .zip files, then burn those files to a CDROM using multi-session
# Future upgrades: Research the use of a try/catch style function call so that a bad program can't hang the script indefinitely.
# Updated on 01-05-2004 to include support for multi-session CDROM burning
TRACK=`cdrecord -msinfo dev=ATAPI:0,1,0`
if ! [ $TRACK ]
then
# Track is null, therefore new CD, create standard ISO.
@alxrogan
alxrogan / tunnel-refresh.sh
Created October 4, 2011 14:54
Script to automate creation of SSH tunnels, with init style invocation
#!/bin/sh
# chkconfig: 235 99 00
# description: Start, Stop, and Restart the SSH Tunnel
case "$1" in
'start')
ssh -Nf proxy
ps aexf | grep "ssh -Nf proxy" | awk '{print $1}' > $HOME/tmp/tunnel.pid
# pgrep -f proxy > $HOME/tmp/tunnel.pid
;;