This repository was archived by the owner on Nov 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathpayload.sh
More file actions
52 lines (49 loc) · 1.27 KB
/
payload.sh
File metadata and controls
52 lines (49 loc) · 1.27 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
#!/bin/bash
clear
if [ -f /etc/os-release ]; then
source /etc/os-release
distribution_name=$NAME
echo "You are running: $distribution_name"
else
echo "Could not determine distribution name."
fi
echo "BETA unshackle payload"
passwd_method() {
echo "========== Users ==========="
while IFS=: read -r username password uid gid full_name home_directory shell; do
if [ $uid -ge 1000 ] || [ $uid -eq 0 ]; then
echo "Username: $username"
echo "Home Directory: $home_directory"
echo "Shell: $shell"
echo "============================"
fi
done < /etc/passwd
read -p "Enter username to reset the password: " choice
passwd $choice
}
show_menu() {
echo "========= unshackle ========="
echo "1. passwd bin method"
echo "2. Exit"
echo "============================"
read -p "Enter your choice: " choice
case $choice in
1)
clear
passwd_method
read -p "Press Enter to continue..."
show_menu
;;
2)
clear
echo "Exiting."
exit 0
;;
*)
echo "Invalid choice. Please enter a valid option."
read -p "Press Enter to continue..."
show_menu
;;
esac
}
show_menu