Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › C# Programming › Question about C# Writing in Memory

Question about C# Writing in Memory

Posts 1–15 of 33 · Page 1 of 3
PR
Programmer213
Question about C# Writing in Memory
Hi,
i hope i´m right in this forum.
Is there a way to change values in Memory like this?
WriteMemory(adress,value);
because the ways, i saw are too complicated.
Can you please give me tipps how i can make that?
I dont want to make thausands of functions, just a programm that sets the ammo to 100.(without loop i´ll make that myself)
Please help me!
#1 · 13y ago
Snowkip
Snowkip
your first step it to learn how to spell 'address' correctly.
#2 · 13y ago
PR
Programmer213
please i mean it seriously
#3 · 13y ago
DA
DawgiiStylz
could help in VB tho
http://www.mpgh.net/forum/33-visual-...ory-part*****ml
#4 · 13y ago
abuckau907
abuckau907
closer to: WriteMemory(processHandle, address, value);

processHandle = OpenProcess(PROCESS_ALL_ACCESS,false,someProcessID )

should get you started. Or ask a specific question : )
#5 · 13y ago
PR
Programmer213
ok but i saw that many people take C++ for hacks.
So my code:
#include <iostream>
#include <Windows.h>
#include <string>
#include <ctime>

void WriteToMemory(HANDLE hProcHandle);
DWORD FindAdd(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress);

bool AmmoStatus = true;
BYTE AmmoValue[] = {0xA3,0x1C,0x0,0x0};
DWORD AmmoBaseAddress = {0x004DF73C};
DWORD AmmoOffsets[] = {0x378, 0x14, 0x0}; //3 LEVEL pointer

bool HealthStatus = true;
BYTE HealthValue[] ={0x39,0x5,0x0,0x0};
DWORD HealthBaseAddress = {0x004DF73C};
DWORD HealthOffsets[] = {0xF4};

HWND hGameWindow = NULL;
DWORD dwProcId = NULL;
HANDLE hProcHandle = NULL;
std::string sAmmoStatus;
std::string sHealthStatus;

int main()
{
hGameWindow = FindWindow( NULL, L"AssaultCube");

if(hGameWindow)
{
GetWindowThreadProcessId( hGameWindow, &dwProcId );
if( dwProcId != 0 )
{
// Get Process Handle
hProcHandle = OpenProcess( PROCESS_ALL_ACCESS, FALSE, dwProcId );
if( hProcHandle == INVALID_HANDLE_VALUE || hProcHandle == NULL )
{
WriteToMemory(hProcHandle);
}
}
else{
std::cout << "AssaultCube not found!" << std::endl;
}
}

DWORD FindAdd(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress){

//DECLARE BASE ADDRESS
DWORD pointer = BaseAddress; // Declare a pointer of DWORD
//USED TO output the contents in the pointer
DWORD pTemp;

DWORD pointerAddr;
for(int i = 0; i < PointerLevel; i ++)
{
if(i == 0)
{
ReadProcessMemory(hProcHandle, (LPCVOID)pointer, &pTemp, 4, NULL);
}
//add first offset to that address
pointerAddr = pTemp + Offsets[i]; // Set p1 to content of p + offset

//Read memory one more time and exit the loop
ReadProcessMemory(hProcHandle, (LPCVOID)pointerAddr, &pTemp, 4, NULL);
}
return pointerAddr;
}

void WriteToMemory(HANDLE hProcHandle)
{
if(AmmoStatus)
{
DWORD AmmoAddressToWrite = FindDmaAddy(3, hProcHandle, AmmoOffsets, AmmoBaseAddress);
WriteProcessMemory( hProcHandle, (BYTE*)AmmoAddressToWrite, &AmmoValue, sizeof(AmmoValue), NULL);
}

if(HealthStatus)
{
//because health address is only one pointer in we send only to FindDmaAddy
DWORD HealthAddressToWrite = FindDmaAddy(1, hProcHandle, HealthOffsets, HealthBaseAddress);
WriteProcessMemory( hProcHandle, (BYTE*)HealthAddressToWrite, &HealthValue, sizeof(HealthValue), NULL);
}
}
so the intellisence means, that behind FindAdd should come a ; but there shouldnt, i know that, because i have the code from fleephacks. I just copied his code.
Someon can find my mistake?
#6 · 13y ago
abuckau907
abuckau907
I think I found it: you copied someone else's code. ; )


Read a little, and understand what it's doing. You can't be a programmer without learning how to program. Period.
#7 · edited 13y ago · 13y ago
PR
Programmer213
i know i understand it but why it doesnt work?
#8 · 13y ago
abuckau907
abuckau907
I haven't bothered to look : )

edit: and won't *
#9 · 13y ago
PR
Programmer213
please i have no one to ask in school or family
#10 · 13y ago
abuckau907
abuckau907
Read a book on general programming practices. And don't pick C++ just because you think it's "POWERFUL" .....how powerful is it when you can't even get it to compile?

edit: Didn't go to bed last night, thought I was in C section Either way, you should probably learn the language better.
#11 · edited 13y ago · 13y ago
PR
Programmer213
I can programm and i just want to find my mistake (but thx for your tipps)
#12 · 13y ago
abuckau907
abuckau907
your mistake? you copied someone else's code...why are you saying "my" ?


--If you haven't figured it out in 2 days, send me a PM and I'll devote an hour to actually trying to help. Getting offline soon.
#13 · 13y ago
PR
Programmer213
You know what i mean. I dont want to dispute with you. Please help me.
#14 · 13y ago
LO
Lovroman
Just use Jorndel's C# memory class, that's easiest and very well working way .
C# Class http://www.mpgh.net/forum/604-call-d...n-jorndel.html

#15 · 13y ago
Posts 1–15 of 33 · Page 1 of 3

Post a Reply

Similar Threads

  • question about vb6 and memoryBy quebech4ck in Visual Basic Programming
    6Last post 18y ago
  • Question about memory nametagsBy ZReal in Call of Duty Modern Warfare 2 Coding / Programming / Source Code
    2Last post 13y ago
  • My little newb question about Memory hacking[SOLVED]By 'Bruno in C++/C Programming
    16Last post 16y ago
  • Few questions about memory hacksBy D1kiy in C++/C Programming
    13Last post 15y ago
  • question about zoomBy yocinfluence in WarRock - International Hacks
    4Last post 20y ago

Tags for this Thread

#assaultcube#c ##hacking#memory