Skip to content

Instantly share code, notes, and snippets.

@xiaokangwang
Last active May 22, 2023 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaokangwang/3e6b7ca99a30b13f82ed5fe6bf8d8f43 to your computer and use it in GitHub Desktop.
Save xiaokangwang/3e6b7ca99a30b13f82ed5fe6bf8d8f43 to your computer and use it in GitHub Desktop.
#!/bin/bash
input=$1
while read -r line
do
if [ $(curl https://$line/ --header 'Host: snowflake-broker.torproject.net.global.prod.fastly.net' -v 2>&1 |grep '404 page not found'|wc -l) -gt 0 ]
then
echo $line
fi
done < "$input"
#!/bin/bash
input=$1
while read -r line
do
if [ $(curl https://$line/proxy --header 'Host: snowflake-broker.torproject.net.global.prod.fastly.net' -v 2>&1 |grep 'X-Session-ID'|wc -l) -gt 0 ]
then
echo $line
fi
done < "$input"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment