Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2016
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/bash
  2. protocol=""
  3. while IFS='' read -r line || [[ -n "$line" ]]; do
  4. for method in GET OPTIONS TRACK;
  5. do
  6. echo "$method " >> $line.txt ;
  7. if curl --fail -k -s -X GET http://$line > /dev/null; then
  8. protocol="http"
  9. else
  10. protocol="https"
  11. fi;
  12. curl --max-time 5 -k -I -X $method $protocol://$line >> $line.txt
  13. done
  14. echo "TRACE" >> $line.txt;
  15. curl --max-time 5 -k -D - -X TRACE $protocol://$line >> $line.txt
  16.  
  17. done < "$1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement