Last active
November 8, 2016 10:19
-
-
Save techouse/1edbc54005238e334e76e909e2f48ff4 to your computer and use it in GitHub Desktop.
Revisions
-
techouse revised this gist
Nov 8, 2016 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ #!/bin/sh if [[ -z $1 ]] ; then echo "psky.sh <IP>" echo "" echo "Protected SKY IP checker" echo "Check if the given IP is blacklisted" echo "" return 1; fi REVERSE=$(echo $1 | awk -F '.' '{ print $4 "." $3 "." $2 "." $1 }') STATUS=$(dig $REVERSE.bad.psky.me +short $1) @@ -15,4 +15,4 @@ elif [ "$STATUS" == "127.0.0.2" ] || [ "$STATUS" == "127.0.0.3" ] ; then echo "SPAM"; else echo "UNKNOWN"; fi -
techouse revised this gist
Nov 8, 2016 . No changes.There are no files selected for viewing
-
techouse revised this gist
Nov 8, 2016 . No changes.There are no files selected for viewing
-
techouse revised this gist
Nov 8, 2016 . No changes.There are no files selected for viewing
-
techouse created this gist
Nov 8, 2016 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/bin/sh if [[ -z $1 ]] ; then echo "psky.sh <IP>" echo "" echo "Protected SKY IP checker" echo "Check if the given IP is blacklisted" echo "" return 1; fi REVERSE=$(echo $1 | awk -F '.' '{ print $4 "." $3 "." $2 "." $1 }') STATUS=$(dig $REVERSE.bad.psky.me +short $1) if [ "$STATUS" == "NOERROR" ] ; then echo "OK"; elif [ "$STATUS" == "127.0.0.2" ] || [ "$STATUS" == "127.0.0.3" ] ; then echo "SPAM"; else echo "UNKNOWN"; fi