-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathxsslab.sh
More file actions
56 lines (46 loc) · 1.3 KB
/
xsslab.sh
File metadata and controls
56 lines (46 loc) · 1.3 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
55
#!/bin/bash
#XSSLAB
#This Project is created and maintained by System00 Security under MIT License.
#Copying this project without permission is illegal.
#Contact: project@system00sec.org
echo '''
_ __ __ __
| |/_/__ ___ / / ___ _/ /
_> <(_-<(_-</ /__/ _ `/ _ \
/_/|_/___/___/____/\_,_/_.__/
[System00 Security]
'''
backup_dir=".xsslab_backup"
if [[ "$1" == "start" ]]; then
if [[ ! -d "$backup_dir" ]]; then
mkdir "$backup_dir"
echo "[+] Enviroment ready"
else
echo "[!] Enviroment already ready"
fi
for file in *.php *.json; do
if [[ -f "$file" ]]; then
cp "$file" "$backup_dir/.$file" &> /dev/null
fi
done
echo "[+] Starting server"
php -S localhost:8080
elif [[ "$1" == "reset" ]]; then
if [[ -d "$backup_dir" ]]; then
#replace all files with backup
for file in *.php *.json; do
if [[ -f "$file" ]]; then
cp "$backup_dir/.$file" "$file" &> /dev/null
fi
done
rm -rf "$backup_dir"
echo "[+] Reset complete"
else
echo "[!] Enviroment not ready"
fi
elif [[ "$1" == "stop" ]]; then
echo "[+] Stopping server"
pkill php
else
echo "Usage: ./xsslab.sh [start|stop|reset]"
fi