• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Hosts file prank access local file

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

deed

Member
Joined
Sep 8, 2009
* In XP or Vista open Notepad and go to the file “hosts” in c:\windows\system32\drivers\etc\
* Find the IP address of a website you would like to redirect to. You can do this by clicking "run" type "cmd" to get to the command prompt and then pinging the website. For example, enter "Ping iqcomputers.net" and you will be returned their ip address of 69.10.149.80.
* Take the IP address (in this example 69.10.149.80) of the site you want to be directed to and enter it at the bottom of the "hosts" file, press the spacebar and then type the original website you want to direct them away from (for example: www.google.com).
* Save the file
* Whenever your mark types www.google.com into his browser, he'll be directed to iqcomputers.net.
* To undo, remove the additional line from the "hosts" file



I have done this prank before but is there anyway so when they type in say google.com it takes them to a local html file instead of one that is online?
 

TollhouseFrank

Senior Headphone Guru
Joined
Nov 29, 2004
Location
T3h [email protected]!
i'm sure there is, but a better use for the hosts file is for ad/spyware blocking such as from the mvps hosts file.

Just be prepared to fix what you break if you go fiddlin' with the hosts file to pull a prank. I hope whoever you pull it on is understanding/at least able to prank back.... like taking a screenshot of your desktop, hiding the icons, hiding the taskbar and then setting the screenshot as the desktop background..... One of my faves and much quicker to undo and more likely the prankee can figure it out so there is less frustration involved on their end.
 

dropadrop

Member
Joined
Mar 17, 2001
Location
Finland
Just be prepared to fix what you break if you go fiddlin' with the hosts file to pull a prank. I hope whoever you pull it on is understanding/at least able to prank back.... like taking a screenshot of your desktop, hiding the icons, hiding the taskbar and then setting the screenshot as the desktop background..... One of my faves and much quicker to undo and more likely the prankee can figure it out so there is less frustration involved on their end.

This has always been my favorite. I don't think I'd want to edit any ones hosts file as a prank - it does not really fulfil the purpose of a prank to me.
 

Ben333

Folding for Team 32!
Joined
Feb 18, 2007
@ Frank, a better one is to just screen shot the desktop with a folder called "porn" or something, then set it as the wall paper without hiding the taskbar or icons and delete the folder. People will see the folder, but will wonder why they can't get in it or delete it. At the same time, everything else still works fine lol.
 

Diggrr

Underwater Senior Member
Joined
Nov 29, 2001
A buddy of mine used ACDSee to automatically view pics full screen, so I made a screen capture of my own desktop (same background as his) with a system popup. I edited all the icons out, changed the clock to XX:XX, and changed the popup wording to "Formatting drives in 15 seconds, Click cancel to abort"
I then dropped it in his startup folder.
He called me up in a panic saying the "Cancel" button didn't do anything, but if he held it, it at least gave him time to reach the power button!!!


Took him a month to forgive me for that one....
 
OP
D

deed

Member
Joined
Sep 8, 2009
Lol Yeah I finnaly found a way thought :) I linked it to an xamp localhost I was running so when he went to facebook it said he was banned etc for hacking bla bla bla lol.

Some of the things I have done are: Set his background as a blue screen of death and unplug the keyboard so he thinks its broken ( auto login)

Make it so each time he brings his mouse over the start button it moves to the other side of the screen.

Using a remote computer viewer that I hid and kept taking control of his mouse.




I have to lol I was at work one day and he setup my old laptop to boot up with sex noises and 4 videos popped up during a meeting :)



And for anyone that isnt sure what the hosts file is its this:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

And if you want to redirect them to lets say bad sites :) each time they go to google follow the top site and it should look like this:

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost
(insertiphere) google.com
(insertiphere) www.google.com

Easy to fix tbh I just cant think of any more things to screw with him lol.

The desktop idea and formatting hardrive is a good idea though :) Ill try it tonight.
 

Roisen

Member
Joined
Feb 13, 2007
Location
Folding in Ames, IA
* In XP or Vista open Notepad and go to the file “hosts” in c:\windows\system32\drivers\etc\
* Find the IP address of a website you would like to redirect to. You can do this by clicking "run" type "cmd" to get to the command prompt and then pinging the website. For example, enter "Ping iqcomputers.net" and you will be returned their ip address of 69.10.149.80.
* Take the IP address (in this example 69.10.149.80) of the site you want to be directed to and enter it at the bottom of the "hosts" file, press the spacebar and then type the original website you want to direct them away from (for example: www.google.com).
* Save the file
* Whenever your mark types www.google.com into his browser, he'll be directed to iqcomputers.net.
* To undo, remove the additional line from the "hosts" file



I have done this prank before but is there anyway so when they type in say google.com it takes them to a local html file instead of one that is online?


I believe you could do www.google.com \\localhost\SHARED_FOLDER\prank.html

What I love doing is changing all the shortcuts on the desktop to point to C:/Windows/system32/reset