Skip to content

Instantly share code, notes, and snippets.

@pry0cc
Created December 30, 2020 19:21
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pry0cc/62086defd3c772ed1a43e06d1198d010 to your computer and use it in GitHub Desktop.
Save pry0cc/62086defd3c772ed1a43e06d1198d010 to your computer and use it in GitHub Desktop.
#!/bin/bash
email="$1"
key=""
if [[ -z "$email" ]]; then
echo "No email supplied"
exit 1
fi
current_page=1
total_pages=10
mkdir -p output
until [[ "$total_pages" -eq "$page" ]];
do
res=$(curl -s "https://api.whoxy.com/?key=$key&reverse=whois&email=$email&page=$current_page" | tee output/$current_page.json)
total_pages=$(echo $res | jq -r '.total_pages')
current_page=$(echo $res | jq -r '.current_page')
echo "$current_page / $total_pages"
current_page=$((current_page+1))
done
cat output/* | jq -r '.search_result[]?.domain_name' | anew output.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment