![]() |
|
#1
|
|||
|
|||
|
[C++] HostsPatch
Hey everyone,
Saw this new section and I have some old sources to share with you guys. This is the first: a 'hosts' patcher. It adds an entry to the hosts file. It supports read-only hosts files, just let the user start the keygen/patch as Administrator. It works for both x32 and x64. Usage is simple: Code:
bool HostsPatch(
HWND hwndDlg, //window handle (can be 0)
const char* website //website to block (without 'http://')
);
int main(int argc, char* argv[])
{
HostsPatch(0, "activation.acme.com");
return 0;
}
Greetings, Mr. eXoDia |
| The Following 12 Users Gave Reputation+1 to mr.exodia For This Useful Post: | ||
alekine322 (04-03-2014), b30wulf (04-01-2014), besoeso (04-01-2014), chessgod101 (04-01-2014), conan981 (04-03-2014), giv (04-05-2014), Jhonjhon_123 (04-01-2014), papi (04-02-2014), serseri_1453 (04-01-2014), UniSoft (04-28-2014), Wannabe (04-06-2014), zeuscane (04-01-2014) | ||
| Tags |
| code, hosts, patcher, source |
|
|