Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # checks for existence of RDWAPage on a specific URL
- # requires a file redirected on stdin
- # eg: ./scanrdweb.sh < targetlist.txt
- # outputs to results.csv
- # curl timeout set to 15 seconds
- while IFS= read -r TARGET; do
- curl https://$TARGET/RDWeb/pages/en-US/login.aspx --insecure --max-time 15 | grep RDWAPage
- ErrorCode=$?
- echo "$ErrorCode"
- if [ "$ErrorCode" = "0" ]; then
- echo "$TARGET,TRUE" >> results.csv
- echo "$TARGET is RDWEB (TRUE)"
- else
- echo "$TARGET,FALSE" >> results.csv
- echo "$TARGET is not RDWEB (FALSE)"
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement