Hello,Â
the following script is written in C++ and is compatible with Visual Studios. Â
std::string DownloadURL(const char* URL) {
VMProtectBeginMutation("Sea: DownloadURL");
HINTERNET interwebs = InternetOpenA("Mozilla/5.0", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, NULL);
HINTERNET urlFile;
std::string rtn;
if (interwebs) {
urlFile = InternetOpenUrlA(interwebs, URL, NULL, NULL, NULL, NULL);
if (urlFile) {
char buffer[2000];
DWORD bytesRead;
do {
InternetReadFile(urlFile, buffer, 2000, &bytesRead);
rtn.append(buffer, bytesRead);
memset(buffer, 0, 2000);
} while (bytesRead);
InternetCloseHandle(interwebs);
InternetCloseHandle(urlFile);
std::string p = replaceAll(rtn, "|n", "\r\n");
return p;
}
}
Replace "InternetOpenUrlA" by "urlFile = InternetOpenUrlA(interwebs, URL, NULL, NULL, NULL, NULL);"
Cancel
Post