Advertisement
anonit

Scan for RDWeb

Apr 5th, 2024
718
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.65 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # checks for existence of RDWAPage on a specific URL
  4. # requires a file redirected on stdin
  5. # eg: ./scanrdweb.sh < targetlist.txt
  6. # outputs to results.csv
  7. # curl timeout set to 15 seconds
  8.  
  9. while IFS= read -r TARGET; do
  10.         curl https://$TARGET/RDWeb/pages/en-US/login.aspx --insecure --max-time 15 | grep RDWAPage
  11.         ErrorCode=$?
  12.         echo "$ErrorCode"
  13.         if [ "$ErrorCode" = "0" ]; then
  14.                 echo "$TARGET,TRUE" >> results.csv
  15.                 echo "$TARGET is RDWEB (TRUE)"
  16.         else
  17.                 echo "$TARGET,FALSE" >> results.csv
  18.                 echo "$TARGET is not RDWEB (FALSE)"
  19.         fi
  20. done
  21.  
Tags: BASH curl rdweb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement