Posted on 04-10-2012 07:16 PM
This one is pretty straightforward.
Unlike the user cleaner I posted this one is not tested at all (forcing all Software Updates seems to have stomped out the infected files and variables on this machine...prolly going from Safari 5.1.4 to 5.1.5 squished it)
#!/bin/bash
if check_file=$(defaults read /Applications/Safari.app/Contents/Info LSEnvironment | awk '/Safar/{print $3}'); then
while read -r; do
delete_me+=("$REPLY")
done < <(grep -a -o '__ldpath__[ -~]*' "${check_file}" | uniq)
defaults delete /Applications/Safari.app/Info LSEnvironment
chmod 644 /Applications/Safari.app/Contents/Info.plist
rm "${check_file}"
for file in "${delete_me[@]}"; do
rm "$file##*_}"
done
fi
Posted on 04-12-2012 01:56 PM
RUN SOFTWARE UPDATE
https://support.apple.com/kb/HT5242