كود :
والثاني ينفذ من طرف Luncher حيث لا يمكن تنفيذه مباشرةهل يوجد ملفات تنفيذية لا تعمل الا عند الطلب
على العموم الذكاء الصناعي طلبت منه كود لتغيير بايتات لملف تنفيذي يعمل بالذاكرة فاعطاني هذا الكود ولم افهم منه شئ
كود :
uses
Windows, SysUtils;
const
PAGE_READWRITE = $04;
PROCESS_ALL_ACCESS = $001F0FFF;
var
hProcess: THandle; // Handle to the process we want to modify.
pBaseAddress: Pointer; // Base address of the executable in memory.
pBuffer: array[0..255] of Byte; // Buffer containing the bytes we want to write.
begin
// Get a handle to the process we want to modify.
hProcess := OpenProcess(PROCESS_ALL_ACCESS, False, GetCurrentProcessId);
// Get the base address of the executable in memory.
pBaseAddress := VirtualAllocEx(hProcess, nil, SizeOf(pBuffer), MEM_COMMIT or MEM_RESERVE, PAGE_READWRITE);
// Write our buffer of bytes to the executable in memory.
WriteProcessMemory(hProcess, pBaseAddress, @pBuffer[0], SizeOf(pBuffer), nil);
// Free up resources and close handles.
VirtualFreeEx(hProcess, pBaseAddress, 0, MEM_RELEASE); CloseHandle(hProcess); end.فهل فيه شئ ينفع لما نتحدث عنه
او شئ اخر
كود :
// This code will modify the hex values at a specific address in an executable.
// It assumes that the executable is already loaded into memory.
uses Windows; // for the VirtualProtect function
const
// The address of the hex values to be modified:
HexAddress = $12345678;
// The new hex values to be written:
NewHexValues: array[0..3] of Byte = ($01, $02, $03, $04);
var
OldProtection: DWORD; // used by VirtualProtect function
begin
// Change the memory protection at HexAddress so we can write to it:
VirtualProtect(Pointer(HexAddress), 4, PAGE_EXECUTE_READWRITE, @OldProtection);
// Write the new hex values to HexAddress:
Move(NewHexValues[0], Pointer(HexAddress)^, 4);
// Restore the original memory protection at HexAddress:
VirtualProtect(Pointer(HexAddress), 4, OldProtection, @OldProtection);
end.
قل: اللهم فاطِرَ السماوات والأرض عالم الغيبِ والشهادة، ربَّ كُلِّ شَيءٍ ومَلِيكَه، أَشْهد أن لا إله إلا أنت، أعوذ بك من شرِّ نفسي وشرِّ الشيطان وشِرْكِهِ وأن أقترف على نفسي سوءًا أو أجرُّه إلى مسلم

