Skip to content

Instantly share code, notes, and snippets.

@changux
Created April 6, 2012 18:38
Show Gist options
  • Save changux/2321971 to your computer and use it in GitHub Desktop.
Save changux/2321971 to your computer and use it in GitHub Desktop.
Check Flashback Trojan
display dialog "Lets go to check two simple values, if the result is not equal to OK, run some antivirus or do your job with the terminal app. Also, check http://goo.gl/3FWfA" with icon stop with title "Simple Flashback Trojan detect tool"
try
set test1 to do shell script "defaults read /Applications/Safari.app/Contents/Info LSEnvironment > /tmp/nada 2>&1; cat /tmp/nada | grep -i not"
set test1 to result
if test1 contains "does not exist" then
display dialog "Step 1: OK" with icon note
do shell script "rm -f /tmp/nada"
else
display dialog "Step 1: Something is wrong with Info LSEnvironment" with icon stop
end if
end try
try
set test2 to do shell script "defaults read ~/.MacOSX/environment DYLD_INSERT_LIBRARIES > /tmp/nada2 2>&1; cat /tmp/nada2 | grep -i not"
set test2 to result
if test2 contains "does not exist" then
display dialog "Step 2: OK" with icon note
do shell script "rm -f /tmp/nada2"
else
display dialog "Step 2: Something is wrong with DYLD_INSERT_LIBRARIES" with icon stop
end if
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment