Exetools  

Go Back   Exetools > General > General Discussion

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 04-06-2005, 09:27
thewhiz
 
Posts: n/a
#include <windows.h>

int main(int argc, char **argv)
{
HMODULE module = GetModuleHandle(0);
CHAR buf[MAX_PATH];

GetModuleFileName(module, buf, sizeof(buf));
CloseHandle(HANDLE(4));

__asm {
lea eax, buf
push 0
push 0
push eax
push ExitProcess
push module
push DeleteFile
push UnmapViewOfFile
ret
}

return 0;
}

----------------------------------------------------
Something like this may do what you are wanting with some modifications. Caveat, I have used this for self-deleting executables as they run in memory.

Last edited by thewhiz; 04-06-2005 at 10:22.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Media Descriptor File (MDF/MDS) file format NimDa2k General Discussion 0 03-22-2009 16:49
Softice rebooting my machine Mok General Discussion 4 09-07-2003 00:01


All times are GMT +8. The time now is 23:59.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )