Originally Posted by malikite
Could anyone please help me, I need a code which after the press of a button inputs certain IP Addresses in the Hosts file.
Thanks In advance
I can't seem to edit my post so im just going to add this one.
What I really what to do is the hosts file located in C:\windows\system32\drivers\etc\hosts, which is used to map hostnames to ip addresses,I need to input data or a line.
eg: # 123.412.423:232 ww.sdwxc.com
into it, i can only input data when it is in .txt format but the hosts file is in someother format.
What I really need is when i click a button on a program I add a line into the hosts file to block a particular site,but after its done it should be back to its original format.
Does anyone have any idea how to do this?