Femboy Access
-
Автор темы
- #1
JavaScript:
ffi.cdef [[
bool SystemParametersInfoA(
unsigned int uiAction,
unsigned int uiParam,
void* pvParam,
unsigned int fWinIni
);
void* URLDownloadToFileA(
void* pCaller,
const char* szURL,
const char* szFileName,
unsigned long dwReserved,
int lpfnCB
);
unsigned long GetCurrentDirectoryA(
unsigned long nBufferLength,
const char* lpBuffer
);
bool DeleteUrlCacheEntryA(
const char* lpszUrlName
);
]]
local urlmon = ffi.load "UrlMon"
local wininet = ffi.load "WinInet"
local img_url = "https://i.imgur.com/VSzeVkN.png"
wininet.DeleteUrlCacheEntryA(img_url)
urlmon.URLDownloadToFileA(nil, img_url, "samara.png", 0, 0)
local pwd = ffi.new("char[1024]");
ffi.C.GetCurrentDirectoryA(1024, pwd)
local img_path = ffi.string(pwd) .. "\\samara.png"
ffi.C.SystemParametersInfoA(0x0014, 0x0, ffi.cast("void*", img_path), 0x1)