forked from Hay1tsme/segatools
platform/dns.c: Add platform DNS hook
This commit is contained in:
57
platform/dns.c
Normal file
57
platform/dns.c
Normal file
@ -0,0 +1,57 @@
|
||||
#include <windows.h>
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "hooklib/dns.h"
|
||||
|
||||
#include "platform/config.h"
|
||||
#include "platform/dns.h"
|
||||
|
||||
HRESULT dns_platform_hook_init(const struct dns_config *cfg)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
assert(cfg != NULL);
|
||||
|
||||
if (!cfg->enable) {
|
||||
return S_FALSE;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"naominet.jp", cfg->startup);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"anbzvarg.wc", cfg->startup);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"ib.naominet.jp", cfg->billing);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"vo.anbzvarg.wc", cfg->billing);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"aime.naominet.jp", cfg->aimedb);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
hr = dns_hook_push(L"nvzr.anbzvarg.wc", cfg->aimedb);
|
||||
|
||||
if (FAILED(hr)) {
|
||||
return hr;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
Reference in New Issue
Block a user