Skip to content

Instantly share code, notes, and snippets.

Working from home

Andrew Pease peasead

Working from home
Block or report user

Report or block peasead

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am peasead on github.
  • I am variable ( on keybase.
  • I have a public key ASB24PAieecv2Kzl2W9jTJFFT7kgmjKOL7qL5QWGERc59go

To claim this, I am signing this object:

View nginx Proxy Redirect
server {
listen 80;
server_tokens off;
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains";
add_header X-Frame-Options DENY;
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options nosniff;
peasead /
Last active Mar 15, 2017
CentOS 7's Cuckoo modifications.
  1. $ sudo vi /etc/yum.repos.d/mongo.repo

     name=MongoDB Repository
  2. $ sudo yum install epel-release

peasead /
Created Jan 30, 2017
Update the local repositories.
find . -type d -depth 2 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
View Bash Profile
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=exFxBxDxCxegedabagacad
alias ls='ls -lGFh'
alias whois='whois -h'
alias usbtoserial=/dev/cu.usbserial
# Profile Additions
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/\ncat /tmp/ | transfer"; return 1; fi
tmpfile=$( mktemp -t transferXXX ); if tty -s; then basefile=$(basename "$1" | sed -e 's/[^a-zA-Z0-9._-]/-/g'); curl --progress-bar --upload-file "$1" "$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
View speedtest-cli-down-up-only
# Requires the speedtest-cli Python script available from
# The idea is that you can exclude all the other data returned by the Python script, and just the up/down speeds
# python speedtest-cli | grep -E 'Download: [^d]{1,6} Mbit\/s|Upload: [^d]{1,6} Mbit\/s' <- without your IP address
python speedtest-cli | grep -E '([0-9]{1,3}\.){3}[0-9]{1,3}|Download: [^d]{1,6} Mbit\/s|Upload: [^d]{1,6} Mbit\/s'
# variable (
# This is a script to run many files in a directory against VirusTotal using TekDefense's Automater (
# If you need a test MD5 for this, use this one: 4831523792d2758368af543d9dca748e
# Set the framework for the for loop, ideally you'd have just the malware in the folder, but you may need to adjust to "*.exe" or "*.pdf" or whatever if you have more than just badness in the folder
for i in $( /bin/ls /path/to/malware/folder/ ); do
# Set the variable as "hash" for the MD5 hash of the malware you're going to check, the "md5" command returns 4 rows, the 4th row has the hash, we're selecting that with "awk"
# Contributors
# variable (
# johnnymr (
# the "/bin/ls /path/to/malware/folder/" should reflect the directory that the malware is in
for i in $( /bin/ls /path/to/malware/folder/ ); do
# asigns the variable "malware" as the MD5 hash of the file that was just uploaded, this is needed if you want to auto-collect the malware report
# we're also going to sleep for 1 second - I assume it's some poor coding on my part, but without the sleep, it was only submittig the 1st file
peasead / monitor_interface_bw
Created Apr 2, 2016
Monitor the bandwidth speed on an interface.
View monitor_interface_bw
ETHIFACE=<interface>; while true; do cat /proc/net/dev; sleep 1; done | awk -v dc="date \"+%T\"" '/'${ETHIFACE}'/{i = $2 - oi; o = $10 - oo; oi = $2; oo = $10; dc|getline d; close(dc); if (a++) printf "%s %8.2f KiB/s in %8.2f KiB/s out\n", d, i/1024, o/1024}'
peasead / clean_tcpdump_output
Created Oct 28, 2015
This will take a pcap file and output it cleanly, with IP, hex, and ASCII, via tcpdump
View clean_tcpdump_output
tcpdump -qns 0 -X -r <pcap>.pcap
You can’t perform that action at this time.