|
@@ -7,37 +7,71 @@
|
|
|
|
|
|
|
|
|
WORDLIST_PATH="$HOME/documents/tools/lists"
|
|
|
-
|
|
|
+PROJ_FILE=$HOME/.pentest_proj
|
|
|
+IP_FILE=$HOME/.pentest_target
|
|
|
|
|
|
function pentest {
|
|
|
echo "Pentest Shortuts Plugins"
|
|
|
echo "[*] Aliases: "
|
|
|
- echo " pentest: display help for the commands and shortcuts"
|
|
|
+ echo " pentest : display help for the commands and shortcuts"
|
|
|
echo ""
|
|
|
echo "[*] Env. Variables: "
|
|
|
- echo " ROCKYOU: $ROCKYOU"
|
|
|
- echo " WLIST_DIRS: $WLIST_DIRS"
|
|
|
- echo " WLIST_FILES: $WLIST_FILES"
|
|
|
- echo "[*] Functions"
|
|
|
- echo " set_ip <ip>: set global env variable \$IP/\$ip to <ip>"
|
|
|
- echo " get_ip: prints \$ip"
|
|
|
+ echo " ROCKYOU : $ROCKYOU"
|
|
|
+ echo " WLIST_DIRS : $WLIST_DIRS"
|
|
|
+ echo " WLIST_FILES : $WLIST_FILES"
|
|
|
+ echo ""
|
|
|
+ echo "[*] Functions:"
|
|
|
+ echo " set_ip <ip> : set global env variable \$IP to <ip>"
|
|
|
+ echo " get_ip : prints \$ip"
|
|
|
+ echo " set_proj : set global env variable \$P to the current path"
|
|
|
+ echo " get_proj : prints \$P"
|
|
|
+ echo ""
|
|
|
+ echo "[*] Set Configuration:"
|
|
|
+ echo " \$Target : $IP"
|
|
|
+ echo " \$Proj. Path: $P"
|
|
|
}
|
|
|
|
|
|
function set_ip {
|
|
|
if [ "$1" != "" ]; then
|
|
|
echo "[*] Setting IP to $1"
|
|
|
- echo "$1" > $HOME/.pentest_target
|
|
|
+ echo "$1" > $IP_FILE
|
|
|
|
|
|
- export ip=$(cat $HOME/.pentest_target)
|
|
|
- export IP=$ip
|
|
|
+ export IP=$(cat $IP_FILE)
|
|
|
fi
|
|
|
}
|
|
|
|
|
|
+function set_proj {
|
|
|
+ echo "[*] Setting Project Path to $(pwd)"
|
|
|
+ echo "$(pwd)" > $PROJ_FILE
|
|
|
+
|
|
|
+ export P=$(cat $PROJ_FILE)
|
|
|
+}
|
|
|
+
|
|
|
+function get_proj {
|
|
|
+ echo $P
|
|
|
+}
|
|
|
+
|
|
|
function get_ip {
|
|
|
|
|
|
- echo $ip
|
|
|
+ echo $IP
|
|
|
}
|
|
|
|
|
|
-export ROCKYOU=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
|
|
|
-export WLIST_DIRS=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
|
|
|
-export WLIST_FILES=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-files.txt
|
|
|
+function init {
|
|
|
+
|
|
|
+ if [ -f $IP_FILE ]; then
|
|
|
+ export IP=$(cat $IP_FILE)
|
|
|
+ fi
|
|
|
+
|
|
|
+
|
|
|
+ if [ -f $PROJ_FILE ]; then
|
|
|
+ export P=$(cat $PROJ_FILE)
|
|
|
+ fi
|
|
|
+
|
|
|
+ export ROCKYOU=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
|
|
|
+ export WLIST_DIRS=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
|
|
|
+ export WLIST_FILES=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-files.txt
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+init
|