Last active
February 8, 2018 14:45
-
-
Save krypted/e0a03d23a88ca0ff007b81a81744de29 to your computer and use it in GitHub Desktop.
This file contains 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 | |
#Get our list of DNS servers | |
servers=`networksetup -getdnsservers Wi-Fi` | |
#Start with this set to False - we'll change it to true if needed | |
foundInfected=false | |
#For each item in $servers | |
for ser in $servers; do | |
#If the current IP matches this IP | |
if [ $ser == '82.163.143.135' ]; then | |
#We found an infection, so update the variable | |
foundInfected=true | |
fi | |
done | |
#Echo out the result | |
if [ $foundInfected == 'true' ]; then | |
echo "<result>infected</result>" | |
else | |
echo "<result>notinfected</result>" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment