Results 1 to 8 of 8
  1. #1
    karldeovbnet's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Malabon City
    Posts
    11
    Reputation
    10
    Thanks
    2
    My Mood
    Amazed

    [Help] Codes for adding sites to be blocked in Host File [Solved]

    i need codes for editing the host file
    VB.Noob

    i'm here to learn and contribute as much as i can to the community

    ~ako si karl deo~

  2. #2
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    It has nothing to do with VB but here it is:

    Open up your C:\ Drive

    navigate to "windows"

    navigate to "system32"

    navigate to "drivers"

    navigate to "ect"

    open "hosts" with admin privileges in notepad

    type the destination IP first, then a space, then the website to which you want to make the computer navigate to the IP you previously wrote

    EX:

    Code:
    127.0.0.1 practivate.adobe.com
    127.0.0.1 ereg.adobe.com
    127.0.0.1 activate.wip3.adobe.com
    127.0.0.1 wip3.adobe.com
    127.0.0.1 3dns-3.adobe.com
    127.0.0.1 3dns-2.adobe.com
    127.0.0.1 adobe-dns.adobe.com
    127.0.0.1 adobe-dns-2.adobe.com
    127.0.0.1 adobe-dns-3.adobe.com
    127.0.0.1 ereg.wip3.adobe.com
    127.0.0.1 activate-sea.adobe.com
    127.0.0.1 wwis-dubc1-vip60.adobe.com
    127.0.0.1 activate-sjc0.adobe.com
    127.0.0.1 activate.adobe.com
    127.0.0.1 is also localhost (nothing)

    the above example is how to block adobe updater in order to crack cs5


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  3. #3
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,679
    My Mood
    Mellow
    Obviously he wanted to know how to do it programmatically, otherwise he wouldn't have asked.

    You can either use IO.File.AppendText or an IO.StreamWriter with "Append" set to true. Write the "IP sitename" as mnpeep did above and write each to a new line. An example:

    [highlight=vb.net]
    Using sWriter As New IO.StreamWriter"C:\Windows\System32\drivers\etc\ho st", True)
    sWriter.WriteLine("127.0.0.1 LocalHost")
    End Using
    [/highlight]

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  4. The Following 2 Users Say Thank You to Jason For This Useful Post:

    AceKill3r (02-25-2011),karldeovbnet (02-26-2011)

  5. #4
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Quote Originally Posted by Jason View Post
    Obviously he wanted to know how to do it programmatically, otherwise he wouldn't have asked.

    You can either use IO.File.AppendText or an IO.StreamWriter with "Append" set to true. Write the "IP sitename" as mnpeep did above and write each to a new line. An example:

    [highlight=vb.net]
    Using sWriter As New IO.StreamWriter"C:\Windows\System32\drivers\etc\ho st", True)
    sWriter.WriteLine("127.0.0.1 LocalHost")
    End Using
    [/highlight]
    ok got it, but shouldn't it be:

    sWriter.Writeline(vbcrlf & IPTextbox.text & " " & Websitetextbox.text)

    ??? make it so the user can add lines and use a textbox to type in the text?


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  6. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,679
    My Mood
    Mellow
    Quote Originally Posted by mnpeepno2 View Post
    ok got it, but shouldn't it be:

    sWriter.Writeline(vbcrlf & IPTextbox.text & " " & Websitetextbox.text)

    ??? make it so the user can add lines and use a textbox to type in the text?
    Was an example of how to use the StreamWriter and how to set out the names...can't just assume textbox names etc . Also you don't need to add a new CrLf character...what's the point of WriteLine then?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  7. The Following User Says Thank You to Jason For This Useful Post:

    AceKill3r (02-25-2011)

  8. #6
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    Whoops only saw the write...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  9. The Following User Says Thank You to mnpeepno2 For This Useful Post:

    karldeovbnet (02-26-2011)

  10. #7
    karldeovbnet's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Malabon City
    Posts
    11
    Reputation
    10
    Thanks
    2
    My Mood
    Amazed
    Quote Originally Posted by Jason View Post
    Obviously he wanted to know how to do it programmatically, otherwise he wouldn't have asked.

    You can either use IO.File.AppendText or an IO.StreamWriter with "Append" set to true. Write the "IP sitename" as mnpeep did above and write each to a new line. An example:

    [highlight=vb.net]
    Using sWriter As New IO.StreamWriter"C:\Windows\System32\drivers\etc\ho st", True)
    sWriter.WriteLine("127.0.0.1 LocalHost")
    End Using
    [/highlight]
    tried ur code, the problem is, instead of appending the new line, it clears everything and saves the new line.

    ~edit~

    tried with append, done,

    thx for the help, appreciate it very much
    Last edited by karldeovbnet; 02-26-2011 at 04:09 AM.
    VB.Noob

    i'm here to learn and contribute as much as i can to the community

    ~ako si karl deo~

  11. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,679
    My Mood
    Mellow
    Marked as solved, no more posting unless you have an iron-clad reason to.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)