forked from Sambal0x/Recon-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdir_enum.sh
More file actions
38 lines (25 loc) · 1.15 KB
/
dir_enum.sh
File metadata and controls
38 lines (25 loc) · 1.15 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
#!/bin/bash
# Author: Sambal0x
#
# Instructions : ./dir_enum.sh <domain.com>
WORDLIST=/opt/external/osint/massdns/lists/all.txt #custom wordlist
######## PLEASE SET UP VARIABLES HERE ########
OUTDIR=~/osint # We will create subfolders for each domain here
RECON_DOMAIN=$1
WORDLIST=/opt/SecLists/Discovery/Web-Content/raft-small-words-lowercase.txt
SLACKHOOK=https://hooks.slack.com/services/XXXXXX
######## YAY, ALL DONE WITH VARIABLES ########
function push_to_slack() {
# Send results to slack's web hook
echo "[+] Sending results to slack ..."
directory="$(cat $subdomains-directory.txt)"
curl -X POST -H 'Content-type: application/json' --data "{'text':'## Found Directories for $RECON_DOMAIN ##\n$directory'}" $SLACKHOOK 2>/dev/null
}
# set up the directory structure
mkdir -p $OUTDIR/$RECON_DOMAIN/directory-recon
# change into dir - as output files from enumall go to local dir
cd $OUTDIR/$RECON_DOMAIN/directory-recon
for subdomains in $(cat $OUTDIR/$RECON_DOMAIN/subdomain-recon/$RECON_DOMAIN-subdomains.txt); do
gobuster dir -u https://$subdomains -w $WORDLIST -l -t 50 -o $subdomains-directory.txt -e
done
push_to_slack