Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Commit

Permalink
Merge pull request #26 from unstabl3/patch-3
Browse files Browse the repository at this point in the history
Patch 3
  • Loading branch information
harsh-bothra authored Feb 17, 2021
2 parents 2e528f3 + 818c2e2 commit 977c8c8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ A few features like port scanning might not be working in the current build and

``targetfile`` contains list of domains to perform Recon. For example: `targettest.com`

### Exclude out-of-scope subdomains

Bheem has a flag to remove out-of-scope subdomains from the scan. To do so you have to use "-e" flag with comma separated subdomains.

``Bheem -t targetfile -S -e sub.ex.com,sub1.ex.com``

# Side Notes

1. If you don't want to use specific module, just comment it out and it won't be used anymore.
Expand Down
5 changes: 4 additions & 1 deletion arsenal/Bheem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,12 @@ large_recon(){

}

while getopts ":t:SMLh" opt; do
while getopts ":t:eSMLh" opt; do
case ${opt} in
t ) target=$OPTARG
;;
e ) exclude=$OPTARG
;;
S ) small_recon
;;
M ) medium_recon
Expand All @@ -72,6 +74,7 @@ while getopts ":t:SMLh" opt; do
;;
\? | h ) echo "Usage :";
echo " -t List of target";
echo " -e Exclude target.(eg: sub1.ex.com,sub2.ex.com)";
echo " -S Perform Small Recon";
echo " -M Perform Medium Recon";
echo " -L Perform Large Recon";
Expand Down
11 changes: 10 additions & 1 deletion arsenal/subdomain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,14 @@ mkdir -p $dir
subfinder -d $1 > $dir/$1_unfilter_subdomains;
assetfinder --subs-only $1 >> $dir/$1_unfilter_subdomains;
#amass enum -d $1 >> $dir/$1_unfilter_subdomains;
cat $dir/$1_unfilter_subdomains | sort -u > $dir/$1_subdomains;

if [ -z "$exclude" ]
then
cat $dir/$1_unfilter_subdomains | sort -u > $dir/$1_subdomains;
else
echo -e "\e[92m[~] Excluding domains..\e[00m"
echo "${exclude[*]}" | cut -d',' --output-delimiter=$'\n' -f1- | tee -a $dir/"$1"_excluded.txt
cat $dir/"$1"_unfilter_subdomains | sort -u | grep "\.$1" > $dir/tmp_Bunique.txt
grep -vFf $dir/"$1"_excluded.txt $dir/tmp_Bunique.txt > $dir/$1_subdomains
rm $dir/tmp_Bunique.txt
fi

0 comments on commit 977c8c8

Please sign in to comment.