![]() |
Code: <pre class="alt2" dir="ltr" style=" margin: 0px; padding: 6px; border: 1px solid rgb(0, 0, 0); width: 640px; height: 498px; text-align: left; overflow: auto; background: rgb(37, 37, 37) none repeat scroll 0% 0%; border-radius: 5px; font-size: 11px; text-shadow: none;">#include <stdio.h> #include <windows.h> int main() { HANDLE hEventLogHandle; const CHAR* chLogFileNameList[] = { "Application\0","Security\0","System\0" }; int iCount = 0; CHAR chComputerNameBuffer[256]; DWORD dwComputerNameBufferSize = sizeof(chComputerNameBuffer); SecureZeroMemory(chComputerNameBuffer,sizeof(chCom puterNameBuffer)); printf("Coded by sasami_327\n\n"); if ( !GetComputerName(chComputerNameBuffer,&dwCompu terNameBufferSize) ) { printf("Fail to GetComputerName\n"); ExitProcess(1); } else { printf("[+] %s\n",chComputerNameBuffer); } for ( iCount = 0; iCount < sizeof(chLogFileNameList)/sizeof(chLogFileNameList[0]); iCount++ ) { hEventLogHandle = OpenEventLog(chComputerNameBuffer,chLogFileNameLis t[iCount]); if ( hEventLogHandle == NULL ) { printf("[-] OPEN FAILED: %s\n",chLogFileNameList[iCount]); continue; } else { printf("[+] OPEN SUCCESSED: %s\n",chLogFileNameList[iCount]); } if ( !ClearEventLog(hEventLogHandle,NULL) ) { printf("[-] CLEAR FAILED: %s\n",chLogFileNameList[iCount]); CloseEventLog(hEventLogHandle); continue; } else { printf("[+] CLEAR SUCCESSED: %s\n",chLogFileNameList[iCount]); CloseEventLog(hEventLogHandle); } } return 0; }</pre> |
All times are GMT. The time now is 12:20 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.