Skip to content

Instantly share code, notes, and snippets.

View oxagast's full-sized avatar
🔨
Probably breaking your code.

Marshall Whittaker oxagast

🔨
Probably breaking your code.
View GitHub Profile
@oxagast
oxagast / openvpn-reconnect.sh
Last active January 7, 2026 00:39
Stabilizes openvpn connection
#!/bin/bash
if [[ $(id -u) -ne 0 ]]; then
echo "[!] You should run this as root!"
exit 1
fi
echo "[*] Testing to find VPNs gateway..."
VPNGW=$(ip route show dev tun0 | grep $(ip addr show dev tun0 | grep "inet " | awk '{print $2}' | cut -d . -f 3).1 | cut -d ' ' -f 3 | head -n 1)
echo "[*] Calling systemctl to check status..."
systemctl status openvpn-client@drift-oxasploits.com.service 2>&1 >/dev/null
STATUS=$?
@oxagast
oxagast / vm@.service
Last active December 30, 2025 17:53
Systemd service that starts and stops VirtualBox VMs gracefully.
##
# Place this file in
# /usr/lib/systemd/system/vbox@.service
##
[Unit]
Description= Guest VM %I
After=network.target vboxdrv.service
Before=runlevel2.target shutdown.target
[Service]
@oxagast
oxagast / useful-one-liners.sh
Last active December 22, 2025 07:02 — forked from johnnypea/useful-one-liners.sh
Useful one liners
# Run the last command as root
sudo !!
# Serve current directory tree at http://$HOSTNAME:8000/
python -m SimpleHTTPServer
# Save a file you edited in vim without the needed permissions
:w !sudo tee %
# change to the previous working directory
cd -
# Runs previous command but replacing
^foo^bar
@oxagast
oxagast / bad_mcp_srv.rb
Created November 16, 2025 19:30
Metasploit module for CVE-2025-6514
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
require 'webrick'
require 'thread'
class Metasploit3 < Msf::Exploit::Remote
Rank = ExcellentRanking
@oxagast
oxagast / sudo_lib_hook.md
Last active November 8, 2025 17:23
Sudo read() call library hooking utilizing /etc/ld.so.preload
@oxagast
oxagast / powerlock.sh
Last active October 27, 2025 11:56
Shuts down a terminal after 3 failed i3lock login attempts
#!/bin/bash
#
# Powerlock
#
# -- Copyright: oxasploits.com / Marshall Whittaker --
#
# Dependancies: i3lock, LUKS, sudo or systemd, expect
#
# Configuration: Use something like 'xidle' to invoke this script after
# the mouse has not been moved for a certain amount of time by adding
@oxagast
oxagast / video_downsample.sh
Last active October 25, 2025 16:43
Video Downsampler in Bash
#!/usr/local/bin/bash
# oxagast / marshall@oxasploits.com
#
#
maxres="480p" ## Target Resolution
audiochs=2 ## Max Audio Channels
maxsize=600 ## Max filesize in megabytes
#
cleanup()
@oxagast
oxagast / strip_color.pl
Created October 24, 2025 22:32
Strips IRC colors from outbound messages (irssi)
#!/usr/bin/perl
use strict;
use vars qw($VERSION %IRSSI);
$VERSION = '1.0';
%IRSSI = (
authors => 'oxagast',
contact => 'oxagast@oxasploits.com',
name => 'StripColor',
description => 'Strips IRC special codes from outgoing messages.',
@oxagast
oxagast / growmon.sh
Last active October 17, 2025 01:14
File Growth Watcher
#!/usr/bin/bash
# oxagast / marshall@oxasploits.com
if [[ $# -eq 1 ]] || [[ $# -eq 2 ]]; then
if [[ $# -eq 1 ]]; then
ESIZE=1000000000000000000;
fi
if [[ $# -eq 2 ]]; then
ESIZE=$2;
fi
while test -s $1 && [[ $ESIZE -ge $(stat --printf "%s" $1) ]]; do
#!/bin/bash
#
# ./makeitrain.sh bitcoin-qt.crashdump.core
# __ _ _ __ ___ __ ____ ____
# / ( \/ )/ _\ / __)/ _\/ ___(_ )
# ( O ) (/ ( (_ / \___ \ )(
# \__(_/\_\_/\_/\___\_/\_(____/(__)
#
# Donations:
# btc: 34fDhMUkvGVr1s2jQvhwmBfw1xqjstrLed