TheWover / donut

Generates x86, x64, or AMD64+x86 position-independent shellcode that loads .NET Assemblies, PE files, and other Windows payloads from memory and runs them with parameters
BSD 3-Clause "New" or "Revised" License
3.38k stars 610 forks source link

Add support for resources #132

Closed topstrelok closed 1 month ago

topstrelok commented 11 months ago

Please add resource support, when I make my program in shellcode with donut it displays "Resource not found" message

int APIENTRY WinMain(HINSTANCE hInstance,
  HINSTANCE hPrevInstance,
  LPSTR lpCmdLine,
  int nCmdShow) {
  HRSRC rc = FindResource(hInstance, MAKEINTRESOURCE(IDD_DIALOG1), RT_DIALOG);
  if (rc != NULL) {
    MessageBox(NULL, "Resource is ok", "Resource is ok", MB_OK);
  } else {
    MessageBox(NULL, "Resource not found", "error", MB_OK);
  }

  return 0;
}
TheWover commented 11 months ago

Try the -k 2 option.