MHS Source Code

Discussions Related to Game Hacking and Memory Hacking Software

Moderators: g3nuin3, SpeedWing, WhiteHat, mezzo

MHS Source Code

Postby L. Spiro » Thu Nov 04, 2010 2:37 am

The source for MHS can be found here:
http://memoryhacking.com/Misc/Stars.rar

The kernel driver here:
http://memoryhacking.com/Misc/StockReport2008.rar


The kernel driver is probably quite up-to-date but the MHS source is a few versions old but still considerably recent.
Almost compiles out-of-the-box but you may have to set a source path for something or other but any competent programmer will be able to see the error and realize what needs to be modified easily.
It all does work.

Microsoft Visual Studio 2005, with Service Pack 1 (maybe 2) was used to build.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: MHS Source Code

Postby Cookie » Thu Nov 04, 2010 7:49 pm

1st, woot, YUSH :twisted:
User avatar
Cookie
Hack-Master Hex
 
Posts: 611
Joined: Tue Apr 01, 2008 5:07 pm
Location: here it would seem

Re: MHS Source Code

Postby Felheart » Mon Nov 08, 2010 2:15 am

Thanks for the release.
I will have a look at it later.

I hope MHS2 will be made from only the best parts of MHS, CE and olly ;)
Felheart
Acker
 
Posts: 89
Joined: Sun Apr 27, 2008 3:05 am
Location: Germany

Re: MHS Source Code

Postby denispn » Mon Nov 08, 2010 5:30 am

Felheart wrote:I hope MHS2 will be made from only the best parts of MHS, CE and olly


Oh yes, please! That would be the ultimate game hacking tool.

Is L. Spiro really working on a new version?

Thanks,
ctl3d32
denispn
Hacker Smacker
 
Posts: 43
Joined: Wed Dec 26, 2007 9:45 am

Re: MHS Source Code

Postby L. Spiro » Mon Nov 08, 2010 5:19 pm

No one knows.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: MHS Source Code

Postby denispn » Mon Nov 08, 2010 8:50 pm

And the mistery remains...
denispn
Hacker Smacker
 
Posts: 43
Joined: Wed Dec 26, 2007 9:45 am

Re: MHS Source Code

Postby Johnson » Tue Nov 09, 2010 11:02 am

This is quite the treat ; though I do not understand the structure, because some body did not include the readme.

Whose bones shall I break?
Johnson
I Ask A Lot Of Questions
 
Posts: 19
Joined: Mon Apr 28, 2008 6:33 pm

Re: MHS Source Code

Postby L. Spiro » Tue Nov 09, 2010 2:31 pm

I had to cover this in the Private Section as well.

#1:
Some of this code is the first code I ever wrote in C++. Other code is somewhat recent.
None of it represents my current coding style or level because one thing I hate more than anything is inconsistency. These days, I code with strict conventions including namespaces, global-scope operators, JavaDoc commenting, copyright headers, and have even defined how to format sections of classes in so much detail as to have defined the number of blank lines between sections. Today, my headers are alphabetical, they are in folders (not thrown around in the main project folder as in MHS), contain only one class per file (but nesting is allowed in some cases), and do not have function bodies inside the class declarations.
People may whine about naming conventions, but in terms of pure professionalism there is no step above.
But why, if some of the code in MHS is so recent, is none of this to be found?
Because I wasn’t doing it from the beginning. I hate my old sloppy coding from the days when I began MHS, but I hate even more to have one half of a project written in one style and the other half written in a different style.
This is the single largest reason I quit working on MHS. I simply can’t stand the formatting and messiness of my code.
For most of you, it really doesn’t matter that the files are all in one folder, because most of you really just want to see how it all works. Have a blast.

#2:
No ReadMe no nothing. Of course my game engine is documented far beyond a ReadMe, but that is because I actually care about my game engine.
I lost interest in MHS long ago, and it only went downhill during the whole Risk Your Life period. To the point that I don’t know what all is in that package, and I don’t really care. The only reason I could be bothered to add a ReadMe is to explain #1 so that people don’t get the idea that I actually do code like that.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: MHS Source Code

Postby Johnson » Tue Nov 09, 2010 3:15 pm

L. Spiro wrote:Today, my headers are alphabetical

What does this mean?

L. Spiro wrote:and do not have function bodies inside the class declarations.

Even template classes?

L. Spiro wrote:These days, I code with strict conventions including namespaces, global-scope operators, JavaDoc commenting, copyright headers, and have even defined how to format sections of classes in so much detail as to have defined the number of blank lines between sections.

Yes; but when shall you upload?
Johnson
I Ask A Lot Of Questions
 
Posts: 19
Joined: Mon Apr 28, 2008 6:33 pm

Re: MHS Source Code

Postby L. Spiro » Tue Nov 09, 2010 5:50 pm

#1:
It means, after first including the main header, all following headers are alphabetical, first "" includes, then <> includes. For header files, the main header is the library main header.
Code: Select all
#include "../LSGGraphics.h" // Main header.  ALL headers in the graphics library FIRST include this file.
#include "Algorithm/LSTLAlgorithm.h" // The rest of the files are alphabetical, starting with "" includes because they are more important than <> includes.
#include "HighLevel/LSFFilesEx.h"
#include "LSGShaderLanguageParser.h"
#include "LSGShaderLexer.h"
#include "LSGShaderParserWrapper.h"
#include "Map/LSTLMap.h"
#include "String/LSTLString.h"
#include "String/LSTLStringList.h"
                                                 // One blank line after "" before including <> files.
#include <cassert> // <> includes, again in alphabetical order.
#include <new>


In .CPP files, the main header is the header that is directly associated with that .CPP file. Typically this is the only #include file in the .CPP, but if there are exceptions, they follow the rules just as well.

#2:
Templated class function definitions must always be in the headers. They are frequently difficult to read regardless of the organization (just try to read debug output from an STL error), and due to the nature of parameterized functions not all environments have decent support for quickly jumping from the declaration to the definition on templated class functions. The one template function I defined in a .CPP file (CStd::FtoA()) Microsoft® Visual Studio® simply cannot find when I right-click its name and jump to its definition.
On top of all of this, templates are very frequently used in cases that require you to overload every single operator there is, and every combination of such operators.
A fixed-point template class requires you to overload every form of mathematical operator (+, -, *, and /), comparison operator (==, !=, >=, >, <=, and <=), and assignment operator (=, +=, -=, *=, and /=), for every basic type (char, short, long, long long, unsigned char, unsigned short, unsigned long, unsigned long long, float, double, AND your fixed-point class), plus casts to and from each of these types, both at class scope and at global scope. Just the overloads I mentioned here add up to 204 functions.
All the while, your IDE is not going to let you easily jump back and forth between the declarations and the definitions because, in Microsoft® Visual Studio® for example, you cannot “Jump to Definition” on operators.
I made the only sane choice. Template classes are always declared and defined at the same time. Since templates are always abstract and hard to read for anyone who did not write them, it doesn’t count against it in the same way that it would a regular class.

#3:
Despite the raw number of people who have asked me to make such a detailed style guide, I remain convinced that it would cause more uproar than anything else.
People won’t get it that it is just one way to go if you haven’t already made your own ways to go.
They will take it as preaching and start whining how stupid one rule is or another or whine that the style is ugly etc.


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Re: MHS Source Code

Postby Cookie » Wed Nov 10, 2010 2:46 am

Isn't it weird that so many ppl said omfgbbqwoot mhs source is being released but only 2-3 post in the thread D:, it just goes to show that 99% of the people here only download the thing even if they don't know what to do with it. Not working on MHS was the right choice to do, L.S, the latest version is more than enough for these ppl.
User avatar
Cookie
Hack-Master Hex
 
Posts: 611
Joined: Tue Apr 01, 2008 5:07 pm
Location: here it would seem

Re: MHS Source Code

Postby Johnson » Wed Nov 10, 2010 7:54 am

L. Spiro wrote:#1:
Despite the raw number of people who have asked me to make such a detailed style guide, I remain convinced that it would cause more uproar than anything else.
People won’t get it that it is just one way to go if you haven’t already made your own ways to go.
They will take it as preaching and start whining how stupid one rule is or another or whine that the style is ugly etc.

Yet this makes little sense : for coders are then forced, and thereby betrayed, to reverse your coding style through a tiresome analysis ; and perhaps even then may miss some details thereof.

So I remain convinced that you are hiding the real reason, unless you be insane.
Johnson
I Ask A Lot Of Questions
 
Posts: 19
Joined: Mon Apr 28, 2008 6:33 pm

Re: MHS Source Code

Postby troublesh00ter » Wed Nov 10, 2010 4:21 pm

Johnson wrote:
L. Spiro wrote:#1:
Yet this makes little sense : for coders are then forced, and thereby betrayed, to reverse your coding style through a tiresome analysis ; and perhaps even then may miss some details thereof.

So I remain convinced that you are hiding the real reason, unless you be insane.


I share (to some extent) Spiro his need to format my code, except my headers aren't alphabetized and I put includes that I don't need in the header file in the .cpp file. But it actually makes sense to alphabetize the includes, so I'm going to do that in future projects. It has a downside as well, it is always a pain in the ... for me to read someone else's code. For instance, I align all of my function declarations and variables:

Code: Select all
void   myFunc ( );
int     myFunc2( );
string myFunc3( );

string szHello = "Hello";
int     iHello   = 1;
etc.


I find it difficult to read when 15 variables are initialized without this alignment. Same goes for functions with many parameters.

He is 100% right not to give out a detailed guide to code formatting, people will rant about it no matter what, and it will lead to nothing constructive as coding style is a personal thing, and people serious about coding will develop their own style. I think many people just aren't driven enough to apply a struct coding style, and therefore are looking for other people to tell them how to do it.

I'm not sure what you mean with your comment that people are forced to analyze his style... he already mentioned that the MHS source is not consistent and even if it was, who are you to say that he has to prove a 'code style' guide with it. I for one am very grateful that I get to see the work of a great coder like Spiro, even though it is not the best work, there is still a hell of a lot that I will learn from this.
troublesh00ter
Sir Hacks-A-Lot
 
Posts: 30
Joined: Mon Jun 01, 2009 2:54 pm
Location: The Netherlands

Re: MHS Source Code

Postby Johnson » Wed Nov 10, 2010 6:08 pm

Postum stupidum est. Non sequitur.
Johnson
I Ask A Lot Of Questions
 
Posts: 19
Joined: Mon Apr 28, 2008 6:33 pm

Re: MHS Source Code

Postby L. Spiro » Wed Nov 10, 2010 9:15 pm

And how would you describe your post?

คุณจะให้ผมพูดภาษาไทยไหม? (Google heavily mistranslates this and I know of no other Thai translators. Good luck.)

See how stupid you look when you randomly pick a language that is neither your nor the board’s native, and no one else is using it but you?

場合を除き、もちろん、お前は格好いいな言語使っています。 (Good luck getting the hidden implication out of this sentence; a translator will tell you the words, but not the meaning.)


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Next

Return to General Related Discussions

Who is online

Users browsing this forum: No registered users and 0 guests