Professional Documents
Culture Documents
Untitled 1
Untitled 1
/bin/bash
# Run subdomain enumeration tools to discover new subdomains and save to new-
subs-TARGET_NAME.txt
subfinder -d $TARGET_DOMAIN -o new-subs-$TARGET_DOMAIN-$loopnumber.txt
amass enum -passive -d $TARGET_DOMAIN -o new-subs-$TARGET_DOMAIN-$loopnumber.txt
findomain -t $TARGET_DOMAIN -u new-subs-$TARGET_DOMAIN-$loopnumber.txt
chaos -d $TARGET_DOMAIN -o new-subs-$TARGET_DOMAIN-$loopnumber.txt
assetfinder $TARGET_DOMAIN | tee -a new-subs-$TARGET_DOMAIN-$loopnumber.txt
# Clear alert-sub-TARGET_NAME.txt
> alert-sub-$TARGET_DOMAIN.txt
fi
# Read next target domain to monitor from scopes.txt and set loopnumber to 0 if
end of file is reached
TARGET_DOMAIN=$(sed -n $((loopnumber+1))p scopes.txt)
if [ -z "$TARGET_DOMAIN" ]; then
TARGET_DOMAIN=$(head -n 1 scopes.txt)
loopnumber=0
fi
done