shell-plug.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. # A shell script to use as plugin that includes several pentesting helpers, such as:
  3. # * Wordlists
  4. # * Env. Variables
  5. # * aliases
  6. # base variables
  7. WORDLIST_PATH="$HOME/documents/tools/lists"
  8. function pentest {
  9. echo "Pentest Shortuts Plugins"
  10. echo "[*] Aliases: "
  11. echo " pentest: display help for the commands and shortcuts"
  12. echo ""
  13. echo "[*] Env. Variables: "
  14. echo " ROCKYOU: $ROCKYOU"
  15. echo " WLIST_DIRS: $WLIST_DIRS"
  16. echo " WLIST_FILES: $WLIST_FILES"
  17. echo "[*] Functions"
  18. echo " set_ip <ip>: set global env variable \$IP/\$ip to <ip>"
  19. echo " get_ip: prints \$ip"
  20. }
  21. function set_ip {
  22. if [ "$1" != "" ]; then
  23. echo "[*] Setting IP to $1"
  24. echo "$1" > $HOME/.pentest_target
  25. # export the scope IP as global variable
  26. export ip=$(cat $HOME/.pentest_target)
  27. export IP=$ip
  28. fi
  29. }
  30. function get_ip {
  31. # print the ip, for using this function
  32. echo $ip
  33. }
  34. export ROCKYOU=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
  35. export WLIST_DIRS=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-directories.txt
  36. export WLIST_FILES=$WORDLIST_PATH/SecLists/Discovery/Web-Content/raft-medium-files.txt