
Untitled
By: a guest on
May 20th, 2012 | syntax:
None | size: 2.30 KB | hits: 22 | expires: Never
on gestaltVersion_info(gestalt_code, string_length) try
tell application "Finder" to ¬ copy my NumToHex((system attribute gestalt_code), ¬
string_length) to {a, b, c, d} set the numeric_version to {a, b, c, d} as string if a is "0" then set a to "" set the version_string to (a & b & "." & c & "." & d) as string return {numeric_version, version_string}
on error return {"", "unknown"}
end try end gestaltVersion_info
on NumToHex(hexData, stringLength) set hexString to {} repeat with i from stringLength to 1 by -1
set hexString to ((hexData mod 16) as string) & hexString
set hexData to hexData div 16 end repeat
return (hexString as string) end NumToHex
copy my gestaltVersion_info("sysv", 4) to {system_version, system_string} if the system_version is less than "1050" then
do shell script "/usr/bin/printf \"\\n# Block Adobe Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\ \n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\ \tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe .com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns- 4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobe- dns.adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns- 3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivate- sea.adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivate- sjc0.adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts" with administrator privileges
else if the system_version is greater than "1050" then
do shell script "/usr/bin/printf \"\\n# Block Adobe Activation\\n127.0.0.1\\tactivate.adobe.com\\n127.0.0.1\\tpractivate.adobe.com\ \n127.0.0.1\\tereg.adobe.com\\n127.0.0.1\\tactivate.wip3.adobe.com\\n127.0.0.1\ \tactivate.wip4.adobe.com\\n127.0.0.1\\twip3.adobe.com\\n127.0.0.1\\twip4.adobe .com\\n127.0.0.1\\t3dns-3.adobe.com\\n127.0.0.1\\t3dns- 4.adobe.com\\n127.0.0.1\\t3dns-2.adobe.com\\n127.0.0.1\\tadobe- dns.adobe.com\\n127.0.0.1\\tadobe-dns-2.adobe.com\\n127.0.0.1\\tadobe-dns- 3.adobe.com\\n127.0.0.1\\tereg.wip3.adobe.com\\n127.0.0.1\\tactivate- sea.adobe.com\\n127.0.0.1\\twwis-dubc1-vip60.adobe.com\\n127.0.0.1\\tactivate- sjc0.adobe.com\\n127.0.0.1\\thl2rcv.adobe.com\\n\" >> /etc/hosts; /usr/bin/dscacheutil -flushcache" with administrator privileges
end if