Unable to access websites in Safari?

Interesting that this is a trojan. I haven’t run across this. I like how Linc also explains how to avoid this in the future.
You installed the QHost trojan:
Trojan:BASH/QHost.WB – F-Secure Weblog : News from the Lab
As for what you should do, first of all, do not install any Safari modifications such as “Glims,” which not only won’t solve your problem, but will create other problems, right away or in the future when Safari is updated.
Check the modification date of the hosts file. If you have a Time Machine or other backup of the file older than that, restore from it. Otherwise, you’ll need to edit the file. Post if you need help doing that.
To avoid problems like this, perhaps much worse problems, you need to develop a lot more security awareness. Don’t indiscriminately install software you download from random websites. If a website tells you to install a “plugin” or “codec” from that same site, don’t do it. Software with a corporate brand, such as Adobe Flash, must be downloaded directly from the developer’s site. No intermediary is acceptable. Make sure you read the URL in the address bar. If it’s something like this:
blahblah.adobe.com/
then you’re on Adobe’s site. If it’s any of the following, you’re on a fake Adobe site:
blahblahadobe.com/
adobe.blahblah.com/
adobe.com.blahblah/
