2018-09-26 12:47:32 +00:00
|
|
|
#!/bin/bash
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
# Update PoshC2
|
|
|
|
echo ""
|
|
|
|
|
2018-12-31 18:01:08 +00:00
|
|
|
echo """__________ .__. _________ ________
|
|
|
|
\_______ \____ _____| |__ \_ ___ \ \_____ \
|
|
|
|
| ___/ _ \/ ___/ | \ / \ \/ / ____/
|
2019-03-12 20:33:45 +00:00
|
|
|
| | ( <_>)___ \| Y \ \ \____/ \
|
2018-12-31 18:01:08 +00:00
|
|
|
|____| \____/____ >___| / \______ /\_______ \
|
2018-07-23 08:55:15 +00:00
|
|
|
\/ \/ \/ \/
|
2018-12-31 18:01:08 +00:00
|
|
|
================= www.PoshC2.co.uk ================="""
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "[+] Updating PoshC2_Python"
|
|
|
|
echo ""
|
|
|
|
|
2018-09-26 12:47:32 +00:00
|
|
|
ROOTDIR=`dirname "$0"`
|
|
|
|
if [ ! -d "$ROOTDIR" ]; then
|
|
|
|
ROOTDIR="/opt/PoshC2_Python/"
|
|
|
|
fi
|
|
|
|
pushd "$ROOTDIR" > /dev/null
|
|
|
|
|
2018-07-23 08:55:15 +00:00
|
|
|
# Backup config
|
2018-09-26 12:47:32 +00:00
|
|
|
echo "[+] Backup Config"
|
|
|
|
git stash > /dev/null
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
# Install requirements for PoshC2_Python
|
|
|
|
echo ""
|
2018-09-26 12:47:32 +00:00
|
|
|
echo "[+] Performing git pull on $ROOTDIR"
|
2018-12-31 18:01:08 +00:00
|
|
|
git pull
|
2018-07-23 08:55:15 +00:00
|
|
|
|
|
|
|
# Restore config
|
2018-09-26 12:47:32 +00:00
|
|
|
echo "[+] Restore Config"
|
|
|
|
git stash pop > /dev/null
|
2018-07-23 08:55:15 +00:00
|
|
|
echo ""
|
|
|
|
echo "[+] Update complete"
|
|
|
|
echo ""
|
2018-09-26 12:47:32 +00:00
|
|
|
|
|
|
|
popd > /dev/null
|