• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Tool: XEH [A Library For Your Hacking Tool]

Status
Not open for further replies.

Akiba

[img]http://i.imgur.com/o3RYT4v.png[/img]
4,262
Posts
13
Years
  • XEH [A Library For Your Hacking Tool]

    Introduction
    Some people were asking me to teach them about making hacking tools, so I decided to start working on a library that can jumpstart programmers and save them time on starting a hacking tool.

    This is the first release of a library that can simplify your application development experience, if you are a .NET developer, that is.

    More features will be added eventually.

    If you have any suggestions, feel free to make them.

    And example of how to use the library is in the attachments, as well as the library itself.

    Functions
    String OpenHex(String fileName)

    ///Returns a string containing hex of the provided filename

    Void SaveHex(String fileName, String hexString)

    ///Saves provided string of hex to provided filename

    Struct Macro

    ///Macro object that can be inherited

    Int() Macro.MacroIndex

    ///Index at which the Macro will be executed

    String() Macro.MacroContent

    ///Hex string that will overwrite the area

    Int() Macro.MacroRange

    ///Range of Hex that will be deleted and then inserted, may possibly be omitted in the next release

    String Macro.MacroName

    ///Name by which the macro can be identified

    Void Macro.New(Int macroIndex, String macroContent, Int macroRange, String macroName)

    ///Constructor that will allow new instances of Macro to be created

    Void Macro.RedimMacro(Int index)

    ///Should only be used for modifying macros at runtime, changes size of macro arrays

    Void Macro.AssignMacro(Int position, Int index, Int hexString)

    ///Should only be used for modifying macros at runtime, changes content of macros

    String Macro.ExecuteMacro(String hexString)

    ///Returns a string modified by the macro

    Expected
    Repointing Macros
    Move Macros
    Byte-Based Operation Macros

    Future
    There are many improvements to be made, and I am putting this out here just so people can make suggestions about it, so that this eventually will be a library that all developers can use.
     
    Last edited:

    link12552

    decade club
    205
    Posts
    16
    Years
  • Alright, good to see someone working on a ROM hacking library.
    There are, however, a few issues I feel you MUST realize before you continue too much farther.

    - You're making the same mistake I made: reading data as a hexadecimal string.
    Not only is this inefficient ( it doubles the size of the data), it's also a common conceptual issue.
    You want to retrieve the actual data, the bytes, not a string representing it.

    - When writing a library like this, you need to provide more data driven functions and classes.
    You should be able to type something similar to:
    byte[] data = MyReader.ReadBytes(some offset, some length);
    MyWriter.Write( data, some offset);

    - Programmers will write their own functions using this library.
    The entire concept of "macros" is burdensome and unnecessary.
    Create functions and types that programmers can use to build their own programs.

    - You need to make this opensource.
    Sure, people may use some of your code without permission. People will, however, point out bugs, flaws, and possible optimizations.
    Programmers like to know what a function they call actually does - how it functions.
    Plus, it's extremely easy to reverse engineer .NET programs - in fact I'm looking at the de-compiled source right now!

    - Finally, libraries like this already exist.

    My advice: Write programs, not libraries.
    Make an awesome tool that tens of thousands of people use, not a library that only a handful will see.
     

    Akiba

    [img]http://i.imgur.com/o3RYT4v.png[/img]
    4,262
    Posts
    13
    Years
  • Alright, good to see someone working on a ROM hacking library.
    There are, however, a few issues I feel you MUST realize before you continue too much farther.

    - You're making the same mistake I made: reading data as a hexadecimal string.
    Not only is this inefficient ( it doubles the size of the data), it's also a common conceptual issue.
    You want to retrieve the actual data, the bytes, not a string representing it.

    - When writing a library like this, you need to provide more data driven functions and classes.
    You should be able to type something similar to:
    byte[] data = MyReader.ReadBytes(some offset, some length);
    MyWriter.Write( data, some offset);

    - Programmers will write their own functions using this library.
    The entire concept of "macros" is burdensome and unnecessary.
    Create functions and types that programmers can use to build their own programs.

    - You need to make this opensource.
    Sure, people may use some of your code without permission. People will, however, point out bugs, flaws, and possible optimizations.
    Programmers like to know what a function they call actually does - how it functions.
    Plus, it's extremely easy to reverse engineer .NET programs - in fact I'm looking at the de-compiled source right now!

    - Finally, libraries like this already exist.

    My advice: Write programs, not libraries.
    Make an awesome tool that tens of thousands of people use, not a library that only a handful will see.

    Sorry, I didn't have the time to put the source up. Of course I know about stuff like RedGate's .NET Reflector, and other decompilers alike.

    And also, this is just a mere anterelease, not even considerable as an Alpha.

    I'm just putting this out there to let people know that something like this will eventually exist and can be used.

    And yes, I am working on an awesome tool that many (although most likely not thousands) will use. The Alpha has already been put up for almost two weeks.

    Of course, I am definitely working on improving this.

    Thanks for the feedback.
     

    Alexander Nicholi

    what do you know about computing?
    5,500
    Posts
    14
    Years
  • You know, this is a really good idea. The thing is, it needs to be more well-defined, more… shapeful. Essentially, you're gonna wanna add a LOT more functions (like, as many as you could think of) to make this a valued commodity.

    I'm also working on a ROM hacking library that's in its development stages, but it's not based in .NET (let alone VB) – it's being coded in Intel x86 ANSI C. I'm also going to release a 64-bit version, something .NET programs can't do (noteworthy, right?) Just some tips, though.

    1. I'd suggest using Visual C# or (if you think you can handle it) .NET C++. Visual Basic hasn't been a really favored language among developer communities, per sé, and if you do .NET C++, it'd be incredibly easy to port into Win32.
    2. Link's right about macros: they're a little over the top. Why not just make a function for it?
    3. Not all programs are based in .NET, meaning this library is useless for anyone developing in Win32 C/C++, let alone another language like Java or Fortran.

    I hope you'll take what I've said into consideration.
     
    Status
    Not open for further replies.
    Back
    Top