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
View keybase.md

Keybase proof

I hereby claim:

  • I am peasead on github.
  • I am variable (https://keybase.io/variable) on keybase.
  • I have a public key ASB24PAieecv2Kzl2W9jTJFFT7kgmjKOL7qL5QWGERc59go

To claim this, I am signing this object:

View nginx Proxy Redirect
#/etc/nginx/conf.d/webapp.conf
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
peasead / cuckoo_centos.md
Last active Mar 15, 2017
CentOS 7's Cuckoo modifications.
View cuckoo_centos.md
  1. $ sudo vi /etc/yum.repos.d/mongo.repo

     [mongodb-org-3.4]
     name=MongoDB Repository
     baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/
     gpgcheck=1
     enabled=1
     gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc
    
  2. $ sudo yum install epel-release

@peasead
peasead / gitupdater.sh
Created Jan 30, 2017
Update the local repositories.
View gitupdater.sh
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 199.7.50.74'
alias usbtoserial=/dev/cu.usbserial
# Transfer.sh Profile Additions
transfer() { if [ $# -eq 0 ]; then echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md"; 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" "https://transfer.sh/$basefile" >> $tmpfile; else curl --progress-bar --upload-file "-" "https://transfer.sh/$1" >> $tmpfile ; fi; cat $tmpfile; rm -f $tmpfile; }
View speedtest-cli-down-up-only
# Requires the speedtest-cli Python script available from https://github.com/sivel/speedtest-cli
# 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'
View virustotal_check_dir.sh
#!/bin/bash
# variable (peasead@gmail.com)
# This is a script to run many files in a directory against VirusTotal using TekDefense's Automater (https://github.com/1aN0rmus/TekDefense-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"
View wildfire_api_submissions.sh
#!/bin/bash
# Contributors
# variable (peasead@gmail.com)
# johnnymr (johnnyrobey@gmail.com)
# 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
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
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.