@@R00kTruth well anything really... I’m learning c++ and this is interesting but I would love to see some more tutorials on visual studio code and how to use it better or anything really that has to do with watching someone explain what there doing while writing c++... what about making your own game in c++... What about useing unreal engine to make stuff... unreal engine uses c++ and unity game engine uses C#... I basically just need someone to show me how the code works and how it links together... blender is a free tool that uses c++ and you can make anything you want.. I would like to see some new content..
@@manudelmarche I'd just like to interject for a moment. What you’re referring to as C, is in fact, ISO/IEC 9899:2018, or as I’ve recently taken to calling it, ISO plus IEC. C is not a specified language unto itself, but rather a group of languages sharing similar syntactic structures and rough interoperability on various compilers. Many computer users run a modified version of the ISO system every day, without realizing it. Through a peculiar turn of events, the version of ISO which is widely used today is often called “C”, and many of its users are not aware that it is basically the ISO version, standardized by the International Standards Organization.
This is the first, literally the first tutorial I've seen so far that maybe doesn't straight explain everything but at least leaves *reference* to the stuff one should look into. *Impossible...*
After those if statements where you check for bad outcomes and exit the application, you don’t need to use “else” for the continuation of the program. If you ended the if block with exit() or return false, the code after that block will only be executed in the else situation. This will save you a lot of indents, makes the code look a lot neater.
to be honest you are one of the few people who can explain it understandable in a short period of time. I understood it the first time i saw the video :) thumbs up !
@@shreeshind8388 to be honest i can`t remember anymore but i am pretty sure. But keep in mind that the address will change every time you restart the game and if you want that it always works you have to find the base pointer with the offsets or just modify the function which is used in the game for counting up and down the gems in the memory.
Finally a guy who speaks good english, AND understand how everything works! Kudos for this bro! Didn't learn anything new, but leaving my fotprint here anyway. Good job, more tuts would be nice! Maybe looking for base addresses and pointers? seen so many people don't understanding what it is, and why dynamic is not static etc.
Usually, people who speak jaded English are more intelligent because they know more than just one language. And this is coming from someone who only speaks one language, though I am trying to learn Japanese. So give them more benefit of the doubt.
Wait wut? "people who speak jaded English are more intelligent because they know more than just one language" ? Jaded as in: "Bored or lacking enthusiasm, typically after having had too much of something"? Or does it mean something I can't find a dictionary for? ...maybe "jagged English" or "broken English" is what you were looking for. I know some polyglots are smarter from personal experience, but being able to speak two languages badly isn't hard, and a lot of people do. Most people from around the world are passable in their own language and bad English. The only problem is when you're own language is bad English...
libumMendaciumEst most of the videos related to computer programming I have watched have from content creators from India or China. I wouldn't call it broken English, because they are fluent for the most part. Hence why I called it jaded English. Their content typically is hard to understand due to their delivery or it is very bland. But hey man, thanks for trying to take a Jab at me because you assumed that I am bad at English... "Wait wut" ;)
I'm not making any assumption about you being bad at English: "Jaded" doesn't have that definition in English, it's pretty solid proof :) Also "Wait wut" wasn't the jab, is was however the last line: "The only problem is when you're own language is bad English" ...upon which I which to pontificate: Fairest of beasts Kyle Martin, be you so damned by the coarseness of your tongue? Eloquence like mine, from which you are denied, comes freely to me. Don't covet what you have not, but rejoice in your own language: Bad English. I might be coming off as an arsehole, but I'm sobern't. Before I go, take this ruclips.net/video/DamuE8TM3xo/видео.html it will give you the knowledge of C++, with the power of brilliant English forged in a soothing tone. And this is to help you learn japanese: ruclips.net/video/OFQQALduhzA/видео.html
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
You're the first one who did something I could understand. From a clean coder POV, you could keep all that code on the same indentation block, helps reading and understanding. All those else were unnecessary since you exit in every ifs anyway :)
Great video, I spent all day trying to figure out simple way to read/write in C#, then your video easily explaining how to do it in c++ in a few lines.
At 11:20 - that's some of the realest sh*t I've heard all day. It drives me mad when people just start copying & pasting code and then throwing a fit in the comments section complaining that it doesn't work. Thank you for exercising the whole "write it yourself" thing, I agree 100%.
When I was learning C, I copy-pasted SECTIONS of code from others, then re-named variables, and modified some fine details, and I was learning a LOT. I also do it when I'm learning a new library, and it helps a lot to understand new concepts.
i copy paste code all the time. I get bored easy so typing is boring. I'd rather cut right into the meat and break the code apart testing each line, & play around with the code -then wasting time typing it all out.
I must agree with the comment someone left about finally someone that speaks english with no terrible foreign accent. Good Job, keep up the work. I have a bunch off apps no my phone that intend to teach all kind of languages for pc / scripting but I hardly have the time at the moment to brush through them.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
several things: > after exiting the program in the first if-statement you don't need the else-one. > GetWindowThreadProcessId(hwnd, &procID); is not passing the variable by reference but rather passing a copy of the address of "procID" > Initializing "handle" with an initializer list would be more efficient than initializing it as null and then assign the value of "OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID)" to it > the else-branch after the above point is again unnecessary > again &newValue doesn't tell the compiler to pass in a reference, but rather passes in the address of "newValue" > all variables should be initialized with their value instead of initializing them and then assigning a value ("int readTest {0};" is superior to "int readTest = 0;") > exit(-1); is not good either. return EXIT_FAILURE; would be better.
But wouldn't all variables that are initialized and then immediately assigned a value in code actually just get initialized already with its value when compiled? That's one of (the many) optimizations that are standard on modern compilers.
That's why it's a good practice to have rvalue on the left side in "if" statements. For example "if (nullptr = procID)". In this case, you will get an error.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
@@FabianKristoff its stuff you most ironically start missing more often when you already have had some experience and you just sorta code 'less consciously' in a way
great stuff. just a few hints: - unlike return values, exit codes are usually positive - there is no need for an "else" if your "if" exits the program anyways - sizeof int and float is usually the same (4 bytes). it has nothing to do with the actual types. you could actually just put 4 on most systems.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Damn, you explained that shit well. I'm trying to get into C++, (currently learning javascript as a part of my computer science class in junior year of high school), and this tutorial was extremely easy to follow, especially given the fact that I had never even touch C++ before watching it.
if we open cheat engine with any mmorg f the game guard will detect it and close it, so how can we find any adress ? how can we bypass it ? nice vid dude and sry for my english
Maybe the memory you are trying to access in not in the stack or heap so you cannot directly change it using c++, however windows api allows you to access the game directly and all the memory its using(It's my opinion i don't know for sure, please do correct me if i'm wrong).
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
I wouldn't detect if a game or program is running via it's program title. Some games or programs have window titles that are constantly changing, like DOSBox for example. Just detect if the process itself is running via its process name as that will never change. In the event the process is not available, you should do a loop and keep checking so that way we can run the game/program at another time and the trainer will pick it up whenever you decide to open the game/program.
scan for it in cheat engine, but i wouldn't recommend just writing to the address as if it's static - it's most likely dynamic, as soon as you close the game the address will change. Do a pointer scan for the address with a pointer depth of 1 so that the results are just (Module + offset1) + offset2. Then read the contents of (Module + offset1) which will be a pointer, then write to the pointer + offset2. This way you don't have to worry about updating the addresses every time.
Because that if statement only exists to check for an error that is necessary to get out of the way for the rest of the program to work. If the window it needs isn't found, it quits. Otherwise, it does its job.
@Zeyo, you don’t understand his point. If an if block ends with exit(), all the code after this block will only run in the “else” situation anyway. If you skip the else statement, you don’t have to go 5 indents deep which makes the code complicated to read.
Nice, good video for helping people understand memory. I had taken a C++ class before 1 of 2 & I didn't quite understand memory handling but this video helped me understand it a little better. Thanks!
Nice video! You could omit the "else" clauses after the error checking, because you always return in the "if" before. That would make the code much more linear and easy to follow.
One question: the address you had was a fixed value. Doesn't this change with every program start? And is there something like an address offset that tells you how far the value (or coins or whatever) is away from the start of the program, or does that change too every time?
While I don't like cheaters or people who use their knowledge for those kind of things, I do find your tutorial helpful for people getting into reading and writing memory.
Hi man! Nice videos. Just what I needed, I am learning a lot from you!. BTW, as I studied this , one little classic typo I noticed on line 21. Namely, as I understand, procID from that moment will be NULL due single equation symbol witch becomes assignment instead of checking equality (as in line 9), and this if will be never true even if procID is NULL. Also, I think the handle should be set up after you make sure that procID is not NULL. Best of luck and thanks for your stuff!
quick question concerning 12:03 line 32 I have WriteProcessMemory(handle, (LPVOID)101E2D7B4, &newValue, sizeof(newValue), 0); and I get the error message: error: unable to find numeric literal operator 'operator""D7B4' I presume it is because "D" is the first letter that it starts there I have tried: encasing it in " and ' and () and {} it runs when I encase it in ' but it does not change the value any tips?
there is a problem in the second argument of the function call WriteProcessMemory: The problem is you are trying to cast a base 10 number to an address rather than a hexadecimal number. To fix that add an 0x in the first end of the number like this (LPVOID) *0x* _101E2D7B_
The reason to why when you enclose it in ' ' it works is that when you enclose a value in ' ' it is implicitly translated into a single char and then it will be happily promoted into an LPVOID withought any errors because char and int are both intergral types so you chan store a number inside a char type and use it as an int without problems but only those numbers stipulated in the ascii table or whatever may b unicode.. hop this helps too
So many comments about the missing '=' but I didn't see a single one about sizeof(int) == sizeof(float). If you try sizeof(double) then you'll see two numbers in memory smashed together.
2 month ago i watched your vid and i really liked it even though i didn't understand anything in the code and i didn't think i would be able to do anything like it now i'm learning C++ i'm learning classes & and objects now and i understand your code (not all of it but i got the idea and that's amazing ) now i could do stuff like that and i was wondering if C++ had a sleep or a wait function or i would have to build one thanx to you I won't have to wait to learn about it really loved your video if you didn't get that form my crazy talk (btw i didn't start right a way to learn C++ it took me a long time to actually start ( and by a long time i mean 1 month give or take :D))
Neat tutorial. I've got extensive C++ knowledge but I've never even bothered thinking about using it to cheat. Interesting idea. Now I know everyone's shown you that 'procID = NULL' error, but I've got a couple of questions/comments with this code: 1. Why exit(-1) and not just return(1)? My background in C++ says it's generally not good practice to not finish with return statements. Why a syscall? Any specific reason? 2. Not really a question per say, but you don't need those else statements. The if statements will exit upon exit(-1), so you can just write code below them normally. Just a head's up.
This is a bit more difficult to write in Linux by the way, but entirely possible. You can use the /proc filesystem to figure out process info instead of all that winapi stuff.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life. ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
12:34 this doesn't show an error because float is equal size as int (int32_t by default x86 spec), both are 4 bytes. it could though give an error on different/older compiler when int was 2bytes or sometimes 8bytes if built for x64 (int could default to int64_t but usually tries to use lower sized one when possible). 1 byte is 8bits, so 4 x 8bits = 32bit, both have the same size. It's easy to check using printf(sizeof(your_int_variable_name)); printf(sizeof(your_float_variable_name));
if you are getting weird errors with no red lines make sure you have #include "stdafx.h" at the very top of the code, it has to be above everything else
This is very nice! I have experience on PS3 but none on windows and this definitely helped. I'd really want to know how to run a thread from inside the process though, not write from external, so I gotta find a video on that now.
its been 4 years and im still waiting for the Ep.2 ...
@@R00kTruth well anything really... I’m learning c++ and this is interesting but I would love to see some more tutorials on visual studio code and how to use it better or anything really that has to do with watching someone explain what there doing while writing c++... what about making your own game in c++... What about useing unreal engine to make stuff... unreal engine uses c++ and unity game engine uses C#... I basically just need someone to show me how the code works and how it links together... blender is a free tool that uses c++ and you can make anything you want.. I would like to see some new content..
He Disappeared Like Zer0 Mem0ry RUclips Channel
He has adhd , so he is procastinating
@@myownthoughts969 So hows going,its been almost year.
Any progress?
Keep waiting 😂
This is genuinely great, as a beginner C++ coder (I've used C# before) this is very helpful. It isn't too late to recontinue this series
Omg you explain c++ better than all of my comp sci professors. I would love to see more videos from you. Pls make more.
I was about to say the exact same thing! This is so easy to follow!
Well unless its mario 64 they cant help further hacking
So the less clearly you're able to explain C++, more universities are willing to hire you and give you tenure.
Sorry guys. As much as I love the video and the explanations provided. This is not a C++ tutorial. This could have been made using barebone C.
@@manudelmarche I'd just like to interject for a moment. What you’re referring to as C, is in fact, ISO/IEC 9899:2018, or as I’ve recently taken to calling it, ISO plus IEC. C is not a specified language unto itself, but rather a group of languages sharing similar syntactic structures and rough interoperability on various compilers. Many computer users run a modified version of the ISO system every day, without realizing it. Through a peculiar turn of events, the version of ISO which is widely used today is often called “C”, and many of its users are not aware that it is basically the ISO version, standardized by the International Standards Organization.
This is the first, literally the first tutorial I've seen so far that maybe doesn't straight explain everything but at least leaves *reference* to the stuff one should look into. *Impossible...*
Can it need to add readprocessmemory script please reply
Hands down, the best tutorial ive watched and extremely beginner friendly, thank you.
that was awesome. I've been programming for over a decade and never realized how much you can do.
After those if statements where you check for bad outcomes and exit the application, you don’t need to use “else” for the continuation of the program. If you ended the if block with exit() or return false, the code after that block will only be executed in the else situation. This will save you a lot of indents, makes the code look a lot neater.
OMG, your explanation was so chill and easy to understand, you showed me that this memory-stuff isn't that hard at all
to be honest you are one of the few people who can explain it understandable in a short period of time. I understood it the first time i saw the video :) thumbs up !
Can it need to add readprocessmemory script please reply
@@shreeshind8388 what do you mean ?
@@sunnisun36 can u tell me that u just coded and the code is working know sorry for bad eng.
@@shreeshind8388 to be honest i can`t remember anymore but i am pretty sure. But keep in mind that the address will change every time you restart the game and if you want that it always works you have to find the base pointer with the offsets or just modify the function which is used in the game for counting up and down the gems in the memory.
@@sunnisun36 thank u very much for your comment.
Finally a guy who speaks good english, AND understand how everything works! Kudos for this bro! Didn't learn anything new, but leaving my fotprint here anyway. Good job, more tuts would be nice! Maybe looking for base addresses and pointers? seen so many people don't understanding what it is, and why dynamic is not static etc.
xabo True
Usually, people who speak jaded English are more intelligent because they know more than just one language. And this is coming from someone who only speaks one language, though I am trying to learn Japanese. So give them more benefit of the doubt.
Wait wut? "people who speak jaded English are more intelligent because they know more than just one language" ? Jaded as in: "Bored or lacking enthusiasm, typically after having had too much of something"? Or does it mean something I can't find a dictionary for?
...maybe "jagged English" or "broken English" is what you were looking for.
I know some polyglots are smarter from personal experience, but being able to speak two languages badly isn't hard, and a lot of people do. Most people from around the world are passable in their own language and bad English. The only problem is when you're own language is bad English...
libumMendaciumEst most of the videos related to computer programming I have watched have from content creators from India or China. I wouldn't call it broken English, because they are fluent for the most part. Hence why I called it jaded English. Their content typically is hard to understand due to their delivery or it is very bland. But hey man, thanks for trying to take a Jab at me because you assumed that I am bad at English... "Wait wut" ;)
I'm not making any assumption about you being bad at English: "Jaded" doesn't have that definition in English, it's pretty solid proof :)
Also "Wait wut" wasn't the jab, is was however the last line: "The only problem is when you're own language is bad English"
...upon which I which to pontificate: Fairest of beasts Kyle Martin, be you so damned by the coarseness of your tongue? Eloquence like mine, from which you are denied, comes freely to me. Don't covet what you have not, but rejoice in your own language: Bad English.
I might be coming off as an arsehole, but I'm sobern't. Before I go, take this ruclips.net/video/DamuE8TM3xo/видео.html
it will give you the knowledge of C++, with the power of brilliant English forged in a soothing tone.
And this is to help you learn japanese: ruclips.net/video/OFQQALduhzA/видео.html
people that sound like they wanna die are my favourite type of people
Damm where are his videos
Last ones 1 year ago
Hes dead
@@coprice94 don't be spreading false info man.
@@mryup6100 I'm not man
please make an episode 2, i really loved the vid and learned alot from it. i would appreciate it if there would be a part 2 soon
Please can you upload more? I actually understand from you :o
Sn6 lol salty
@Snn lmao
Can it need to add readprocessmemory script please reply
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life..
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Triggered by that misspelled '==' :)
Luckily, in this case it only affects the branch that shouldn't be taken.
VioletGiraffe that’s why I always compile with -Wall -Wextra -pedantic
Lol i saw that and thinked the same
You're the first one who did something I could understand.
From a clean coder POV, you could keep all that code on the same indentation block, helps reading and understanding. All those else were unnecessary since you exit in every ifs anyway :)
Bro this tutorial IS SO GOOD 10/10, explaining everything perfectly
Can it need to add readprocessmemory script please reply
Great video, I spent all day trying to figure out simple way to read/write in C#, then your video easily explaining how to do it in c++ in a few lines.
At 11:20 - that's some of the realest sh*t I've heard all day. It drives me mad when people just start copying & pasting code and then throwing a fit in the comments section complaining that it doesn't work. Thank you for exercising the whole "write it yourself" thing, I agree 100%.
When I was learning C, I copy-pasted SECTIONS of code from others, then re-named variables, and modified some fine details, and I was learning a LOT. I also do it when I'm learning a new library, and it helps a lot to understand new concepts.
Can't stress this enough.
Amen, it's also poor practice, as just memorizing code doesn't help people learn 'why' or 'how' the code works.
No, thats exactly how you learn how and why...
i copy paste code all the time. I get bored easy so typing is boring. I'd rather cut right into the meat and break the code apart testing each line, & play around with the code -then wasting time typing it all out.
this is the best gamehacking tutorial, in the middle of 2021 and working normally congratulations for the effort
Wow.. Thank you. Finally a tutorial that explains everything well.
thank you. i've been studying c++ for about 4 months now & wanted to get into game hacking, so thank you.
THE GOVERNMENT would like to know your location
They already do
Alakazam ✨✨✨✨✨✨
my love for c++ was ignited again , the hate is gone, love this video , tnx. I know it's from few years back but damn ... so well made.
Finally a real tutorial that shows the basics so you are able to understand it. Thanks for doing it =) Im subscribing to hopefully learn more from you
I’m new to computer science and watching what I’m eventually going to learn about makes me so excited
yeah 😃
cmon dude wheres the part 2 :(
I must agree with the comment someone left about finally someone that speaks english with no terrible foreign accent. Good Job, keep up the work. I have a bunch off apps no my phone that intend to teach all kind of languages for pc / scripting but I hardly have the time at the moment to brush through them.
Awesome tutorial :D are these mx blue switches? I love their sound :D
Please continue the series, fuck, I need it. You explain everything so fucking well.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life..
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
several things:
> after exiting the program in the first if-statement you don't need the else-one.
> GetWindowThreadProcessId(hwnd, &procID); is not passing the variable by reference but rather passing a copy of the address of "procID"
> Initializing "handle" with an initializer list would be more efficient than initializing it as null and then assign the value of "OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID)" to it
> the else-branch after the above point is again unnecessary
> again &newValue doesn't tell the compiler to pass in a reference, but rather passes in the address of "newValue"
> all variables should be initialized with their value instead of initializing them and then assigning a value ("int readTest {0};" is superior to "int readTest = 0;")
> exit(-1); is not good either. return EXIT_FAILURE; would be better.
But wouldn't all variables that are initialized and then immediately assigned a value in code actually just get initialized already with its value when compiled? That's one of (the many) optimizations that are standard on modern compilers.
wow such pedantry for someone who thinks that ahahah wtf
the industry expert over here
Man, Please Do More Tutorials!!! I learn more from you in 15 minutes than 2 hours of trying to understand what pro coders write on forums
nice video, you have a small mistype where it says
'if (procID = NULL)'
rather than
' if (procID == NULL)'
ya, wouldn't the compiler throw up an error at you for that?
It's not strictly a syntax error, more of a logic error. You can assign values in if statement conditions
BJJOORRNN1 no it would just assign the value
Shaun Dreclin hey I got a question, so if the value I got from cheat engine is a string, what type of code do I write?
That's why it's a good practice to have rvalue on the left side in "if" statements. For example "if (nullptr = procID)". In this case, you will get an error.
Please make more, you explain it really well.. Make more c++ tutorials like this one, we beg you !!
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life..
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
if (procID == NULL) with two = not one at line 24
My ocd was bangin on the door from that. How didn't he notice it ahahaha
@@FabianKristoff its stuff you most ironically start missing more often when you already have had some experience and you just sorta code 'less consciously' in a way
What weirds me out is that it seems to compile and run fine lol
great stuff. just a few hints:
- unlike return values, exit codes are usually positive
- there is no need for an "else" if your "if" exits the program anyways
- sizeof int and float is usually the same (4 bytes). it has nothing to do with the actual types. you could actually just put 4 on most systems.
THIS IS AMAZING!
And that's why, kids, you should write the rvalue in the left side of a test expression, so that the compiler can notify you of the error.
0x1A4 iq right here
dude, when's ep 2 coming?
this video was uploaded in 2016 :) so there will be no ep.2
actually you're right. didn't see that.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
That was one of the best tutorials ive seen so far on youtube, please upload more
*I like your C++ skills its worth it i know C++ too*
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
Man you are great !!!! You explain better than all the books i read... Plz make more videos.
Respect from Greece !
For C++ development, I recommend JetBrains CLion over Microsoft Visual Studio. Much better IDE in my opinion
VS is better
@@__3093 no its not
Damn, you explained that shit well. I'm trying to get into C++, (currently learning javascript as a part of my computer science class in junior year of high school), and this tutorial was extremely easy to follow, especially given the fact that I had never even touch C++ before watching it.
if we open cheat engine with any mmorg f the game guard will detect it and close it, so how can we find any adress ? how can we bypass it ? nice vid dude and sry for my english
Write your own memory process scanner. Search "C memory scanner" on youtube and youll see what I mean.
EnduranceT thanks dude i will try it out
Maybe the memory you are trying to access in not in the stack or heap so you cannot directly change it using c++, however windows api allows you to access the game directly and all the memory its using(It's my opinion i don't know for sure, please do correct me if i'm wrong).
Fun fact, started CS50 with edX and this makes so much sense now.
More, more, more. Next == Pattern Scanning, Offsets, writing things like float, 4 byte, byte and string.
you forgot bitwise operators . But yes ( Pattern Scanning, Offsets, writing things like float, 4 byte, byte and string.)
That's neat! I avoid hardcoding a pointer, but it works ;) Dude, you need more videos like this. Seriously!
how would you do it if the address had an offset
You might as well just google the base address, see if someone already found it. Otherwise cheat engine can also help with that.
If you don't understand just write your own code, you'll get the hang of it eventually
I want to make a wallhack for dead by daylight but i dont have any clue where and how to start. Can you maybe help with tips etc?
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
I wouldn't detect if a game or program is running via it's program title. Some games or programs have window titles that are constantly changing, like DOSBox for example. Just detect if the process itself is running via its process name as that will never change. In the event the process is not available, you should do a loop and keep checking so that way we can run the game/program at another time and the trainer will pick it up whenever you decide to open the game/program.
How do i Find the adress?
¯\_(ツ)_/¯
scan for it in cheat engine, but i wouldn't recommend just writing to the address as if it's static - it's most likely dynamic, as soon as you close the game the address will change. Do a pointer scan for the address with a pointer depth of 1 so that the results are just (Module + offset1) + offset2. Then read the contents of (Module + offset1) which will be a pointer, then write to the pointer + offset2. This way you don't have to worry about updating the addresses every time.
i hate to bump this old vid but i sure would love a part 2 of everything
Why use else after an if statement with exit() in it?
Thank you! That redundancy is a pet peeve of mine. Drives me nuts.
Coz need app. The exit buttom xD
wat
Because that if statement only exists to check for an error that is necessary to get out of the way for the rest of the program to work. If the window it needs isn't found, it quits. Otherwise, it does its job.
@Zeyo, you don’t understand his point. If an if block ends with exit(), all the code after this block will only run in the “else” situation anyway. If you skip the else statement, you don’t have to go 5 indents deep which makes the code complicated to read.
Nice, good video for helping people understand memory. I had taken a C++ class before 1 of 2 & I didn't quite understand memory handling but this video helped me understand it a little better. Thanks!
You do this
{
}
I do this {
}
thats ma man
{
}
is more readable
not if your code is more than 500 lines
yeah, i tend to make the } at the same column as the corresponding { .
Its indeed more readable that way, especially if the { } are nested.
ma man
I learned a bit but this is more than enough for my coding journey, thanks a lot man
i watched so mny videos about reading writing memory and your video helped me out a lot :)
2:42 Lol, no, that's actually ok xD i actually love it
Johnny_GR sweat 😂
One Of The Best Videos I Have Ever Seen
heymurder, you are not coming back? we need you back here.
and this explanation of win32 and all was really good
Finally english guy who is actually very helpful!
Nice video! You could omit the "else" clauses after the error checking, because you always return in the "if" before. That would make the code much more linear and easy to follow.
One question: the address you had was a fixed value. Doesn't this change with every program start? And is there something like an address offset that tells you how far the value (or coins or whatever) is away from the start of the program, or does that change too every time?
While I don't like cheaters or people who use their knowledge for those kind of things, I do find your tutorial helpful for people getting into reading and writing memory.
Hi man! Nice videos. Just what I needed, I am learning a lot from you!. BTW, as I studied this , one little classic typo I noticed on line 21. Namely, as I understand, procID from that moment will be NULL due single equation symbol witch becomes assignment instead of checking equality (as in line 9), and this if will be never true even if procID is NULL. Also, I think the handle should be set up after you make sure that procID is not NULL.
Best of luck and thanks for your stuff!
Wow dude
I understood everything although my native language is not English Thank you so much !
Can it need to add readprocessmemory script please reply
Very well explained video, great job!
Cool video :) - However, shouldnd you check the procID before getting the handle for it? (put the handle getter below the procID check) :P
besides the missing =, the else branches are unnecessary, because if the if statement equates to false it carries on after the if block any way.
i like that keyboard sound its what every tutorial is missing
quick question concerning 12:03 line 32 I have
WriteProcessMemory(handle, (LPVOID)101E2D7B4, &newValue, sizeof(newValue), 0);
and I get the error message:
error: unable to find numeric literal operator 'operator""D7B4'
I presume it is because "D" is the first letter that it starts there
I have tried:
encasing it in " and ' and () and {}
it runs when I encase it in ' but it does not change the value any tips?
there is a problem in the second argument of the function call WriteProcessMemory: The problem is you are trying to cast a base 10 number to an address rather than a hexadecimal number. To fix that add an 0x in the first end of the number like this (LPVOID) *0x* _101E2D7B_
The reason to why when you enclose it in ' ' it works is that when you enclose a value in ' ' it is implicitly translated into a single char and then it will be happily promoted into an LPVOID withought any errors because char and int are both intergral types so you chan store a number inside a char type and use it as an int without problems but only those numbers stipulated in the ascii table or whatever may b unicode.. hop this helps too
@@chachamarwa6047 WOW! That response was so way more robust than I thought it was going to be, thank you.
SUBSCRIBED!
@@drakeredwind0138 👍🏾👍🏾👍🏾
you explained this REALLY fucking well
if(procId = NULL) doesn't work, you're just assigning procId to NULL which evaluates to false every single time
should be if(procID==NULL)
yes i think so
Thanks! CPP is all I learned in College. Took the web class before even CSS existed!
Holy fuk that was awesome.. I am learning c++ and had no idea you could do cool shyt like this.
Awesome! i wish you would have continued the series
You are a fucking legend you explain every single thing so much better than others
So many comments about the missing '=' but I didn't see a single one about sizeof(int) == sizeof(float). If you try sizeof(double) then you'll see two numbers in memory smashed together.
Wow thank you so much for taking the time to share this, amazing practical example of C++
Understandable. Quite clear explanation.
Hey I Have Also ADHD , i Know how it feels start things and discontinue
2 month ago i watched your vid and i really liked it even though i didn't understand anything in the code and i didn't think i would be able to do anything like it
now i'm learning C++ i'm learning classes & and objects now
and i understand your code (not all of it but i got the idea and that's amazing ) now i could do stuff like that
and i was wondering if C++ had a sleep or a wait function or i would have to build one thanx to you I won't have to wait to learn about it
really loved your video if you didn't get that form my crazy talk
(btw i didn't start right a way to learn C++ it took me a long time to actually start ( and by a long time i mean 1 month give or take :D))
Thanks for making this video man, i'd love to see more from you,
Neat tutorial. I've got extensive C++ knowledge but I've never even bothered thinking about using it to cheat. Interesting idea.
Now I know everyone's shown you that 'procID = NULL' error, but I've got a couple of questions/comments with this code:
1. Why exit(-1) and not just return(1)? My background in C++ says it's generally not good practice to not finish with return statements. Why a syscall? Any specific reason?
2. Not really a question per say, but you don't need those else statements. The if statements will exit upon exit(-1), so you can just write code below them normally. Just a head's up.
This is a bit more difficult to write in Linux by the way, but entirely possible. You can use the /proc filesystem to figure out process info instead of all that winapi stuff.
What are your thoughts on Nick Cano's book? Love your stuff btw.
Absoulutely AMAZING Video. I Learned How To Make A Trainer In C++ JUST BECAUSE OF YOU! ☺ You Are Truly Amazing.
Thanks you very much for all your videos you can't imagine how these videos help me a lot just keep doing a very good job.
My friends, please search for your life purpose, why are we here?? I advise you to watch this series 👇 as a beginning to know the purpose of your existence in this life.
ruclips.net/p/PLPqH38Ki1fy3EB-8xmShVqpbQw99Do2B-
I learned so much from you here everyone else sucks
12:34 this doesn't show an error because float is equal size as int (int32_t by default x86 spec), both are 4 bytes. it could though give an error on different/older compiler when int was 2bytes or sometimes 8bytes if built for x64 (int could default to int64_t but usually tries to use lower sized one when possible). 1 byte is 8bits, so 4 x 8bits = 32bit, both have the same size.
It's easy to check using
printf(sizeof(your_int_variable_name));
printf(sizeof(your_float_variable_name));
Really nice tutorial, i like the way you explain the code.
i hope you make more.
Awesome tutorial , i now know how to get process. Thank you !!
if you are getting weird errors with no red lines make sure you have #include "stdafx.h" at the very top of the code, it has to be above everything else
RobotRage thank you
This is very nice! I have experience on PS3 but none on windows and this definitely helped. I'd really want to know how to run a thread from inside the process though, not write from external, so I gotta find a video on that now.
Please continue the series man
Thx for the promise I am gona listen to you
Thank you for this wonderful job !!!
It's been very useful !!
Im a scrub and you explained your process very well. Thank you