Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- protocol=""
- while IFS='' read -r line || [[ -n "$line" ]]; do
- for method in GET OPTIONS TRACK;
- do
- echo "$method " >> $line.txt ;
- if curl --fail -k -s -X GET http://$line > /dev/null; then
- protocol="http"
- else
- protocol="https"
- fi;
- curl --max-time 5 -k -I -X $method $protocol://$line >> $line.txt
- done
- echo "TRACE" >> $line.txt;
- curl --max-time 5 -k -D - -X TRACE $protocol://$line >> $line.txt
- done < "$1"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement