Created
December 30, 2020 19:21
-
-
Save pry0cc/62086defd3c772ed1a43e06d1198d010 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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