-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathburp_update.sh
More file actions
executable file
·54 lines (50 loc) · 3.74 KB
/
burp_update.sh
File metadata and controls
executable file
·54 lines (50 loc) · 3.74 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/bin/bash
#
# burp_update.sh
#
# Automate some of the steps of updating Burp Suite. Assumes you downloaded the installer
# into ~/Downloads.
#
# check whether burp is running
if [[ ! -z $(pgrep --full BurpSuite) ]]; then
echo 'BurpSuite is running.'
echo -n 'Kill? [y/N] '
read answer
if [[ "${answer,,}" == 'y' ]]; then
echo 'Killing.'
pkill --full -2 BurpSuite
else
echo 'Exiting. Please kill Burp manually and re-run.'
exit 1
fi
else
echo 'BurpSuite does not appear to be running.'
fi
# find and confirm install file
install_file=$(ls -t ~/Downloads/burpsuite_pro_linux_v202*_*.sh | head -1)
if [[ ! -z "$install_file" ]]; then
echo "Install file found: $install_file"
echo -n 'Use this one? [Y/n] '
read answer
if [[ "${answer,,}" == 'n' ]]; then
echo 'Please download the correct file, remove others, and re-run.'
exit 2
else
echo 'Launching installer.'
fi
else
echo 'No install file found in Downloads.'
echo 'Please download and re-run.'
exit 3
fi
# launch update
sudo bash "$install_file"
# confirm whether to remove installer
echo -n 'Remove install file? [Y/n] '
read answer
if [[ "${answer,,}" == 'n' ]]; then
echo 'Not removing.'
else
echo 'Removing.'
rm -v "$install_file"
fi