Created
January 31, 2016 15:39
-
-
Save plaguna/439d08d8a437136c06ed to your computer and use it in GitHub Desktop.
Runs Burp while keeping the number of old version under 3 plus creating a proxy with an external testing machine
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 | |
echo "Checking for older versions of Burp Suite" | |
files=$(find . -name 'burpsuite_*' | sort | wc -l) | |
if [ "$files" -gt 3 ]; | |
then | |
echo "Deleting old file(s)..." | |
todelete=$(find . -name 'burpsuite_*' | sort | head -n 1) | |
rm "$todelete" | |
echo "$todelete has been deleted!" | |
else | |
echo "Nothing to delete!" | |
fi | |
echo "Running SOCKS proxy on the background" | |
autossh -f -D <port> -N <remote_server> | |
ip=$(hostname -I) | |
echo "And finally running Burp! ($ip: 8080)" | |
latest=$(find . -name 'burpsuite_*' | sort | tail -n 1) | |
java -jar -Xmx2048m "$latest" | |
echo "Cleaning up the mess..." | |
echo "Killing all instances of autossh" | |
killall -s KILL autossh | |
echo "Done. Have a nice day!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment