-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPTMAG.sh
168 lines (161 loc) · 5.46 KB
/
PTMAG.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/bin/bash
#Author Notes
#echo -e is used for escape functionality, also -n is added for no new line at end of line, and \r is so that there is no carriage return.
#figlet will need to be installed as well as an additional non-default fault called larry3d.flf, MAKE SURE YOU MAKE A SETUP.SH!!!!
#Global Variables
RED='\033[01;31m'
NC='\033[01;0m'
GREEN='\033[01;32m'
BLUE='\033[01;34m'
YELLOW='\033[01;33m'
#Menu variables
finished="${GREEN}Complete${NC}"
working="${YELLOW}Work in progress${NC}"
upgrade="${BLUE}Future Upgrade${NC}"
unsupported="${RED}Module not yet added${NC}"
#main page elements
mainPage="Main"
mainArray=("Enumeration" "Exploitation" "Privilege-Escalation" "Post-Exploitation-Information-Gathering" "Quit")
mainKeys=($main_page_list[0]=$working $main_page_list[1]=$upgrade $main_page_list[2]=$unsupported $main_page_list[3]=$unsupported $main_page_list[4]="")
#Global functions
menu_func () {
printf "$1 Menu:\n"
for item in ${mainArray[*]}
do
printf "$((item+1)). $item:\n"
done
# printf "($item+1). $2[item]: ${$3[$item]}";
# printf "Select a number and press [Enter]: "
# read number
}
option () {
printf "Select a number and press [Enter]: "
# echo -n "Select a number and press [Enter]: "
read number
return $number;
}
valid_option () {
echo -ne "Please select a valid option.\r";
}
#Loading Prompt Here
echo -e "${RED}"
figlet -t -f larry3d.flf "Wi1d5a1m0N"
figlet -t -f larry3d.flf "Presents"
figlet -t -f larry3d.flf "PTMAG"
echo "Penetration Tester's Manual Attack Guide"
echo -ne 'Loading: [###### ] (25%) Starting up Framework...\r'
sleep 0.2
echo -ne 'Loading: [########### ] (50%) Gathering Resources... \r'
sleep 0.2
echo -ne 'Loading: [################# ] (75%) Checking for Updates... \r'
sleep 0.2
echo -ne 'Loading: [######################## ] (99%) Almost there... \r'
sleep 0.2
echo -ne 'Loading: [#########################] (100%) And Done... \r'
sleep 0.1
echo -ne '\n\n'
echo -e "${NC}"
echo -ne "Welcome to Wi1d5a1m0N's Penetration Tester's Manual Attack Guide\n\n"
echo -ne "This guide is not the end all, be all, but I will certainly try my hardest.\n"
echo -ne "This is a work in progress, so updates will be following. This guide will give\nan idea on where to start with your pen-testing methodologies, process, and provide\nsample commands, resource links, and ideas to think about when you are testing a\nsystem.\n\n"
#Start Enum methods menu function
enum_methods () {
clear
enum_methods_question () {
option
}
echo -e "${GREEN}Generally in a penetration test you would start with open-source/passive reconnaissance. I may or may not add information on that.\nAs of this version, clearly there is no support for it yet.${NC}\n\n"
echo -e "Enumeration Methods Menu:"
echo -e "1. IP/Network Enumeration: $working"
echo -e "2. Port Scanning: $unsupported"
echo -e "3. Service Enumeration: $unsupported"
echo -e "4. OS Enumeration: $unsupported"
echo -e "5. Previous Menu\n"
enum_methods_question
}
#Start Enum help menu function
enum_help () {
clear
enum_help_question () {
option
if [ $number == 1 ]
then
enum_menu
elif [ $number == 2 ]
then
clear
main_menu
else
valid_option
sleep 2
enum_help_question
fi
}
echo -e "${GREEN}Take heart you have not truly failed until you have given up...so, like many, before have said, TRY HARDER!!!${NC}\n\n"
echo -e "When all else fails here are some ideas that can help: "
echo -e "${GREEN}[+]${NC} Google is your friend --> https://www.google.com/"
echo -e "${GREEN}[+]${NC} Take a break, step back, refresh, try a more simple approach"
echo -e "${GREEN}[+]${NC} Talk your situation out with a peer"
echo -e "${GREEN}[+]${NC} Youtube is also a good resource, specifically IppSec --> https://www.youtube.com/channel/UCa6eh7gCkpPo5XXUDfygQQA"
echo -e "${GREEN}[+]${NC} Revert the system and start over --> This is only if you have the ability (i.e. virtual labs)\n\n"
echo -e "Enumeration Help Menu: \n1. Previous Menu\n2. Main Menu\n"
enum_help_question
}
#Start Enumeration Menu Function here
enum_menu () {
clear
enum_question () {
echo -n "Select a number and press [Enter]: "
read number;
if [ $number == 1 ]
then
enum_methods
elif [ $number == 2 ]
then
enum_help
elif [ $number == 3 ]
then
clear
main_menu
else
echo -ne "Please select a valid option.\r"
sleep 2
enum_question
fi
}
echo -e "${GREEN}Enumerate, Enumerate, Enumerate!!!\nWhen you think you have enumerated all you can, enumerate more...${NC}\n"
echo "Enumeration Menu:"
echo -e "1. Where to start: $working"
echo -e "2. I've done everything! What now!?!: $finished"
echo -e "3. Main Menu\n"
enum_question
}
#Start Main Menu Function here
main_menu () {
main_question () {
option
if [ $number == 1 ]
then
enum_menu
elif [ $number == 5 ]
then
exit 0
elif [ $number == 2 ] || [ $number == 3 ] || [ $number == 4 ]
then
printf "Module not added yet! Standby for upgrades...\n"
sleep 2
main_question
else
valid_option
fi;
}
# echo "Main Menu:"
# echo -e "1. Enumeration: $working"
# echo -e "2. Exploitation: $upgrade"
# echo -e "3. Privilege Escalation: $unsupported"
# echo -e "4. Post-Exploitation/Information Gathering: $unsupported";
# echo -e "5. Quit\n";
menu_func $mainPage $mainArray $mainKeys
main_question
}
main_menu