forked from nettitude/PoshC2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUpdate.sh
executable file
·38 lines (32 loc) · 875 Bytes
/
Update.sh
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
#!/bin/bash
# Update PoshC2
echo ""
echo """ __________ .__. _________ ________
\_______ \____ _____| |__ \_ ___ \ \_____ \\
| ___/ _ \/ ___/ | \ / \ \/ / ____/
| | ( <_>)___ \| Y \ \ \____/ \\
|____| \____/____ >___| / \______ /\_______ \\
\/ \/ \/ \/
================= www.PoshC2.co.uk ================"""
echo ""
echo "[+] Updating PoshC2_Python"
echo ""
ROOTDIR=`dirname "$0"`
if [ ! -d "$ROOTDIR" ]; then
ROOTDIR="/opt/PoshC2_Python/"
fi
pushd "$ROOTDIR" > /dev/null
# Backup config
echo "[+] Backup Config"
git stash
# Install requirements for PoshC2_Python
echo ""
echo "[+] Performing git pull on $ROOTDIR"
git pull
# Restore config
echo "[+] Restore Config"
git stash pop
echo ""
echo "[+] Update complete"
echo ""
popd > /dev/null