diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2017-09-27 20:13:21 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-27 20:13:21 +0530 |
commit | f1dde4dc0ded121bea75e9e61d5c47e8e59ad81e (patch) | |
tree | eddff9618fe154b60cca2da695b4ef4e92614cbd /pwned.sh | |
parent | cdc773c89a4e2fad8373db03c1f3f42260294734 (diff) |
Redesigned
Diffstat (limited to 'pwned.sh')
-rw-r--r-- | pwned.sh | 72 |
1 files changed, 51 insertions, 21 deletions
@@ -1,28 +1,58 @@ #!/bin/bash -#set -x -account=$1 -if [ "$1" == "-h" ]; -then -echo Pwned Help -echo Usage : -echo -e "pwned -h \t /Shows Help" -echo -e "pwned title@email.com \t \t /Gives Information " -exit -fi -clear -echo "Using Email $account" -echo "If it is not in the format test@mail.com" -echo "then press Ctrl+C and put it in the correct format" -echo "Press enter to continue" +set x + +declutter(){ + rm breach.json + rm semibreach.json + rm breach.txt + rm pasteacc.json + rm semipaste.json + rm pasteacc.txt +} + +header(){ + +echo " ___ _ ___ "; +echo " | _ \__ __ ___ _ ___ __| | |__ \ "; +echo " | _/\ V V / ' \/ -_) _\` | /_/ "; +echo " |_| \_/\_/|_||_\___\__,_| (_) "; +echo " "; + +} -read nothing +main(){ + clear +header +echo "Enter your Email Address (For eg xyz@mail.com)" +read account +clear +header +echo "" echo "Checking if you have been Pwned" -curl -s -o raw_data.json "https://haveibeenpwned.com/api/v2/breachedaccount/"$account"" +curl -s -o breach.json "https://haveibeenpwned.com/api/v2/breachedaccount/"$account"" +curl -s -o pasteacc.json "https://haveibeenpwned.com/api/v2/pasteaccount/"$account"" +#curl -s -o pwnedpassword.json "https://haveibeenpwned.com/api/v2/pwnedpassword/"$account"" + clear -jq ".[]" raw_data.json > semi.json -jq .Title semi.json > final.txt -echo "You Have Been Pwned at/in/by" -sed 's/\"//g' final.txt +jq ".[]" breach.json > semibreach.json +jq .Title semibreach.json > breach.txt +jq ".[]" pasteacc.json > semipaste.json +jq .Title semipaste.json > pasteacc.txt +#jq ".[]" pwnedpassword.json > semipwnedpassword.json +#jq .Title semipwnedpassword.json > pwnedpassword.txt +header +echo "" +echo "" +echo -e "\e[1;97;44mYou Have Been Pwned at :\e[1;92;49m" +sed 's/\"//g' breach.txt +echo -e "\e[1;97;44mYou have been featured in these Pastes :\e[1;92;49m" +sed 's/\"//g' pasteacc.txt +#echo "Your Pwned Passwords are at :" +#sed 's/\"//g' pwnedpassword.txt +declutter +} +clear +main |