Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

[TuT]Block webSites without any Softwares !!

block webSites without any Softwares !!



Steps

1] Browse C:\WINDOWS\system32\drivers\etc
2] Find the file named "HOSTS"
3] Open it in notepad
4] Under "127.0.0.1 localhost" Add 127.0.0.2 www.orkut.com , and that site will no longer be accessable.
5] Done!


example :

127.0.0.1 localhost
127.0.0.2 www.orkut.com

- www.orkut.com is now unaccessable


For every site after that you want to add, just add "1" to the last number in the internal ip (127.0.0.2) and then the addy like before.

IE:
127.0.0.3 www.yahoo.com
127.0.0.4 www.msn.com
127.0.0.5 www.google.com

This also works with banner sites, just find the host name of the server with the banners and do the same thing with that addy.

Hoep this small tutorial could keep you going in simple way of blocking websites
[Image: 192-BC15-A-BC6-F-43-EA-8-ED4-76-D5-A5847950.gif]
Thanks for this, ideal for blocking some people lazy watching porn
15 years on HF finally can have a signature for free :3
Ya, you can do this in you PC, And to do it in slave's PC you'll have to make a Batch file & this has been posted in Batch section for thousands of time. It deserves there.

And also please explain how this works... Or i'll tell you. :p
Metalhead
thiss is great man. i notice this is where the malware does its work in blocking AV sites
hi man i'm using windwos 7 when i open host file with notepad and typed the and typed the website name as u guided when i'm going to save that file its ask for the location to save
if i saved the file it is saved in the .txt format
how can i do ur method of blocking website in windows 7 ?
(Dec 14, 2011 06:03 AM)empty22 Wrote:  hi man i'm using windwos 7 when i open host file with notepad and typed the and typed the website name as u guided when i'm going to save that file its ask for the location to save
if i saved the file it is saved in the .txt format
how can i do ur method of blocking website in windows 7 ?

Just open your file, edit it.

Now close the window. It'll as to save the changes. click YES.

You're done!
Metalhead
Nice Guide . . . IT will help some people who want to sidable some pages from their network

Thanks
To help people understand this, when your computer trying to access any adress (web) it first looking for an information in hosts
if it has a record in it
the adreess where you go/// When Type this
127.0.0.2 /// www.Facebook.com
127.0.0.2 is invalid adress so facebook is blocked this is simple redirect
I Wrote a script to do this on my Mac:

Code
#!/usr/bin/perl

use Tie::File;
$file = "/private/etc/hosts";

## These are the options that you entered after the
## scriptname. They must be in the right order to work.
## ---
$OP = $ARGV[0];
$URL = $ARGV[1];

if ($OP eq "u") {
    open IN, '<', $file or die;
    @lijnen = <IN>;
    close IN;

    @lijnen = grep !/$URL/, @lijnen;

    open OUT, '>', $file or die;
    print OUT @lijnen;
    close OUT;

} elsif ($OP eq "r") {
    print "\n\nTo where do you want the website to redirect to? ";
    $URLR = <STDIN>;
    chomp($URLR);

    ## Getting the IP of the host since
    ## the hosts files needs IP addresses
    ## ---
    @ipp = gethostbyname($URLR);
    @ip = unpack("C4",$ipp[4]);
    $ip = join(".",@ip);

    &openFile;
    print FILE "$ip $URL \n";
    &closeFile;    

    ##Flushing the cache
    ## ---
    system("dscacheutil -flushcache");

    print "\n\n$URL has been redirected to $URLR. \n";
    print "Take in mind that it can take some moments to work. \n\n";

} elsif ($OP eq "b") {
    &openFile;
    print FILE "127.0.0.1 $URL \n";
    &closeFile;    

    system("dscacheutil -flushcache");

    print "\n\n$URL has been blocked. \n";
    print "Take in mind that it can take some moments to work. \n\n";

} else {
    print "\n\nYou did something wrong. \n";
    print " Usage: Blok u/b/r URL \n";
    print "u = Unblock \n";
    print "b = Block \n";
    print "r = Redirect \n\n";
}

sub openFile {
open(FILE,'>>/private/etc/hosts')
  or die "\nYou need to run this script as SUDO.\n\n";
}

sub closeFile {
close(FILE);
}

You can use it on windows by editing the hosts file location.
nice tutrial bro,,gtyhjuyhjrgghhjtghjjkjkkj
thanks for the share.
I will try it.
[Image: sQQA0SQ.jpg]
dude its not working in windowos 7 i tried once can give explanation with pictures


Possibly Related Threads...
Thread / Author Replies Views Last Post
by Elite_xApr 13, 2025 04:44 PM 4 571 Apr 13, 2025 04:44 PM
Last Post: SS2580G
by FlyZoneAug 9, 2019 08:11 AM 6 498 Aug 9, 2019 08:11 AM
Last Post: darkcoded
by doctorsqlSep 11, 2016 06:05 AM 44 1,111 Sep 11, 2016 06:05 AM
Last Post: mackavelli