Mam source code jednak nie mogę poradzić sobie z kompilacją tego.
Czy mógłby ktoś mi pomóż lub skompilować to i wrzucić na hosting?
Czy mógłby ktoś mi pomóż lub skompilować to i wrzucić na hosting?
Kod:
/*
* Written by florian0 for StageTwo.eu
* Code and binary may be shared, modified and published as
* long as this notice and the printf stays intact
*/
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <stdlib.h>
#include <Windows.h>
#define VOLUMEID_OFFSET 0x965C
void execHook(void);
BOOL WINAPI DllMain(HINSTANCE hModule, DWORD fdwReason, LPVOID lpReserved) {
if (fdwReason == DLL_PROCESS_ATTACH) {
execHook();
}
return TRUE;
}
void execHook(void) {
HMODULE module;
int* lpVolumeId;
DWORD disk_serial;
/* Create a fancy console */
AllocConsole();
freopen("CONOUT$", "w", stdout);
/* Dont remove this :) */
printf("Written by florian0 for stagetwo.eu - plis no stealerino\n");
/* Get actual volume serial further checks */
GetVolumeInformationA("C:\\", NULL, NULL, &disk_serial, NULL, NULL, NULL, NULL);
printf("LDR> VolumeID of Drive C:\\ is 0x%08x\n", disk_serial);
/* Load the Onyx.dll */
printf("LDR> Loading Library ...\n");
module = LoadLibrary("Onyx.dll");
/* Check if anything went wrong */
if (module == NULL) {
perror("LDR> Could not load library :(");
printf("LDR> Something went wrong. Better kill the client ... \n");
exit(-1);
} else {
printf("LDR> Library loaded successfully!\n");
}
/* Setup the Pointer to the volume serial */
lpVolumeId = (int*)(((int)module) + VOLUMEID_OFFSET);
/* Check if the volume serial matches the serial read by GetVolumeInformation() */
if (*lpVolumeId == disk_serial)
{
printf("LDR> VolumeID matches memory location, patching ...\n");
}
else
{
/* Throw a warning otherwise. The patcher may have the wrong memory address and
* mess up everything */
printf("LDR> WARINING: *****************************************************\n");
printf("LDR> WARINING: VolumeID (0x%08x) does not match memory location.\n", *lpVolumeId);
printf("LDR> WARINING: PATCH MAY NOT WORK. Patching anyways ... yolo \n");
printf("LDR> WARINING: *****************************************************\n");
}
/* Init randomizer (we want real pseudo-random volume serials) */
srand(GetTickCount());
/* Create and write a new serial */
*lpVolumeId = (rand() & 0xFF) |
(rand() & 0xFF) << 8 |
(rand() & 0xFF) << 16 |
(rand() & 0xFF) << 24;
printf("LDR> Randomized VolumeId: 0x%08x\n", *lpVolumeId);
/* Goodbye message */
printf("LDR> All done - client will continue\n");
printf("LDR> Goodbye!\n");
}