-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdater_software.cheat
30 lines (26 loc) · 1.55 KB
/
updater_software.cheat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
% update cheatsheet
$ burpversion: echo 'community pro'
# default one
apt update && apt upgrade
# update burp
gron 'https://portswigger.net/burp/releases/data?previousLastId=-1&lastId=-1&t='$(date +%s)'&pageSize=10' > /tmp/gronned_portswigger.net
grep -i version /tmp/gronned_portswigger.net | grep -iv content | cut -d '"' -f 2 | sort -V | tail -n1 | tee /tmp/latest_version.burp
echo "[+] checking if burp is uptodate:"
version=$(burpsuite --version | cut -d '-' -f 1)
if ! [ -z ${version+x} ]; then version=unknownversion1.1.1.1.1.1; fi
if grep -xq $(echo version) /tmp/latest_version.burp
then
echo "burp is up to date."
else
portswiggers_update_mirror=https://portswigger-cdn.net/burp/releases/download
filename=$(curl -IsS "$portswiggers_update_mirror?product=community&version=$(cat /tmp/latest_version.burp)&type=Linux" | grep -oP 'filename\=(.*?);' | cut -d '=' -f 2 | cut -d ';' -f 1 | sed 's|/|_|g')
echo "downloading burpsuite to /tmp/$filename"
wget "$portswiggers_update_mirror?product=community&version=$(cat /tmp/latest_version.burp)&type=Linux" -O /tmp/$filename
if grep $(sha256sum /tmp/$filename ) /tmp/gronned_portswigger.net
then
chmod +x /tmp/$filename
/tmp/$filename
echo -e "remove the old burpsuite if you want with:\nrm -r $(cat $(which burpsuite) | grep -oP "\S*[a-z].jar" | sed 's![^/]*$!!')\nrm /bin/burpsuite"
echo -e "depending on the version you've installed, use:\nln -s /opt/BurpSuiteCommunity/BurpSuiteCommunity /bin/burpsuite\nln -s /opt/BurpSuite/BurpSuite /bin/burpsuite"
fi
fi