HINTERNET open = InternetOpen(TEXT("gettingAnswer"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
if (open != NULL)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}InternetOpen");
HINTERNET connect = InternetConnect(open, TEXT("website"), INTERNET_DEFAULT_HTTP_PORT, NULL, NULL, INTERNET_SERVICE_HTTP, 0, 1u);
if (connect != NULL)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}InternetConnect");
HINTERNET request = HttpOpenRequest(connect, TEXT("GET"), TEXT("keys.txt"), NULL, NULL, 0, INTERNET_FLAG_RELOAD, 1);
if (request != NULL)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}HttpOpenRequest");
BOOL send = HttpSendRequest(request, NULL, 0, NULL, 0);
if (send == TRUE)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}HttpSendRequest");
char szData[1024];
DWORD dwBytesRead;
BOOL read = InternetReadFile(request, szData, sizeof(szData) - 1, &dwBytesRead);
if (read != FALSE)
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}InternetReadFile");
DWORD serial;
GetVolumeInformationA(NULL, NULL, NULL, &serial, NULL, NULL, NULL, NULL);
char zhopka[64];
sprintf(zhopka, "%d", serial);
SF->LogConsole(szData);
if (!strstr(szData, zhopka))
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}У вас нет лицензии! Ваш код: {808080}[%d]{ffffff}.", zhopka);
}
else
{
SF->getSAMP()->getChat()->AddChatMessage(D3DCOLOR_XRGB(128, 128, 128), "[crack_me.sf]: {ffffff}У вас есть лицензия.");
}
}
}
}
::InternetCloseHandle(request);
}
::InternetCloseHandle(connect);
}
::InternetCloseHandle(open);