September 22nd, 2006
Messing with the hosts file
Give your coworker hours of confusion, and (if you are lucky) confuse the tech support guy too.
Windows OS, Internet Explorer as browser (may not work in Firefox/etc)
Windows Hosts file specifies where URL’s will take you - using it you can bypass your dns server..
In English, please
You can redirect yahoo.com visitors to hotmail, or somewhere worse*. Not just Yahoo but any site really.
- Open the windows Hosts file, using notepad: In windows XP installations, it is usually at C:\WINDOWS\system32\drivers\etc\HOSTS
(Open that file using notepad). e.g click START, then RUN, and type
NOTEPAD C:\WINDOWS\system32\drivers\etc\HOSTS and press enter
- The host file contains IP addresses followed by URL’s. You must know the destination IP of the site you want to redirect TO. For example, lets say you want to redirect all visitors to NBC.COM to CNN.com (126.96.36.199 is cnn.com), you might type something like:
- Save the file
- Voila! Coworker types nbc.com, and ends up at CNN.com! Try this to send yahoo users to hotmail, hotmail users to google and so on.
- To reverse the process, re-open the file and remove the edits you made, and save.
TIP 1: To find the IP of a website, you can try going to dos (click run, type CMD) and typing tracert sitename.com
TIP 2: To ‘kill’ a site, put the IP to 127.0.0.1 (Localhost)
Bonus: This method can be used to block annoying ad sites/popup sites you don’t like, quickly and easily (point them to localhost).
Disclaimer: *Above info for informational purposes only. Please do not irritate your cow-orkers, unless you are really bored (and have a good insurance policy). I will not be held responsible for any damage you suffer from following this or other pointless pranks. Please remember to re-edit the hosts file at end of day and REMOVE any changes you made.
Entry Filed under: Hacks