Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Dissertation/vulnId.sh
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
37 lines (35 sloc)
1.18 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#bruteLogin.sh --> vulnId.sh | |
#bruteForce.sh --> vulnId.sh | |
##Variables | |
#export URL="http://192.168.40.145/DVWA/vulnerabilities" | |
WORD_LIST="/usr/share/dirb/wordlists/common.txt" | |
EXT="/DVWA/vulnerabilities" | |
COUNT=$COUNT | |
#export COUNT=$COUNT | |
export DVWA_USER=$USER | |
export DVWA_PASS=$PASS | |
export LOGIN_URL=$LOGIN_URL | |
export IP=$IP | |
case $COUNT in | |
1) | |
#dirb on DVWA home page to find brute vulnerability directory | |
echo -e "\n---- Finding brute force directory ----\n" | |
export BRUTE_DIR="http://"$IP$EXT$(gobuster dir -u 'http://'$IP$EXT -w $WORD_LIST | grep '/brute ' | grep -o '^\S*') | |
echo -e "Directory with brute vulnerability: $BRUTE_DIR" | |
sleep 5s | |
/bin/bash ~/Documents/DVWA/scripts/bruteForce.sh | |
;; | |
2) | |
#find sqli vulnerability directory | |
echo -e "\n---- Finding SQL injection directory ----\n" | |
export SQLI_DIR="http://"$IP$EXT$(gobuster dir -u 'http://'$IP$EXT -w $WORD_LIST | grep '/sqli ' | grep -o '^\S*') | |
echo -e "Directory with sqli vulnerability: $SQLI_DIR \n" | |
sleep 5s | |
/bin/bash ~/Documents/DVWA/scripts/sqli.sh | |
;; | |
3) | |
rm tmp.txt | |
rm dvwa.cookie | |
;; | |
*) | |
esac |