I do not normally deal with internet security problems but this one has got me interested.
The issue is with a specific site, lets say example.com, and how it it visited.
If the address is typed directly into the browser, the website works fine.
If the address is searched in google/bing/yahoo and followed, a 302 redirect is given leading to: a gambling site, an error page, or a web page that only contains an encoded script.
My question here is, how can I identify what this script is doing?
The script captured can be found in the following paste bin. http://pastebin.com/6uV7M4nJ