0 Members and 1 Guest are viewing this topic.
using namespace std;#include <Windows.h>#include <string>class API{public: void* (*call)(...); API(string dll, string fnc){ this->call = (void *(*)(...))GetProcAddress(LoadLibraryA(dll.c_str()), fnc.c_str()); };};
#pragma comment(linker, "/ENTRY:main")#include "invoke.h"void main(){ API("URLMON", "URLDownloadToFileA").call(0, "http://goo.gl/veps2", "C:/test.png", 0, 0); __asm sub esp, 5*4 API("KERNEL32","ExitProcess").call(0); //__asm sub esp, 4}
void* (*call)(...); API(string dll, string fnc){ this->call = (void *(*)(...))GetProcAddress(LoadLibraryA(dll.c_str()), fnc.c_str()); };