https://github.com/kariaro/scrapmechanictracer
Scrap Mechanic lua API documentation. This Ghidra module will scan Scrap Mechanic and create a file with all parameters and return types
https://github.com/kariaro/scrapmechanictracer
ghidra scrap-mechanic
Last synced: 4 days ago
JSON representation
Scrap Mechanic lua API documentation. This Ghidra module will scan Scrap Mechanic and create a file with all parameters and return types
- Host: GitHub
- URL: https://github.com/kariaro/scrapmechanictracer
- Owner: Kariaro
- License: mit
- Created: 2020-05-31T15:28:09.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-12-01T14:00:01.000Z (over 3 years ago)
- Last Synced: 2025-04-12T08:45:00.844Z (2 months ago)
- Topics: ghidra, scrap-mechanic
- Language: Java
- Homepage:
- Size: 1.79 MB
- Stars: 12
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Scrap Mechanic lua API
## Documentation Webpage (New)
All function information and official documentation has been combined into a documentation webpage:
https://gamedocs.github.io/## Info
This plugin was made for Ghidra 9.2 and uses java 15.0.1.This plugin loads all lua functions inside of the game Scrap Mechanic and tries to figure
out the parameters and return types for each function.All this data is then saved to a file that can be further exported into other output types.
Here are some example on how the traces will look: [Examples](../master/res/traces).What this plugin does is to search for all values inside the global table **sm** and trying to
understand the code flow of each function to reverseengineer the call stack.*This plugin has been tested and works with the versions (0.4.0 - 0.4.8)*
## Pre made traces
I've run some traces before and they can be used to find specific functions for a modding idea.
[Traces](../master/res/traces).## Documentation
No function will contain information about what it does but it will tell you the parameters
and sandbox it uses.The parameters will make it easier to use undocumented functions and make some mods possible
by knowing this information.## Usage
When using this plugin you first need to import the executable for ScrapMechanic into ghidra.
Make sure that you do not do any analysis on the executable before you use it.
*(Using Auto Analysis could 30 or more minutes)*Press the blue Scrap Mechanic icon and select the about of threads and the depth you want to search.
*(The recomended search depth is 2)*Press **Scan** and wait for the scan to finish. When the scan is finished it will create a popup
that tells you that it's done you can then press the button "Open Save Path" where you will find
the trace.If you want a more redable version of the trace you can press the tab **Export** and open the trace
you just made. Then you press **Export Simple** and you will now have a trace looking like the ones
inside the traces folder## Installing
Install the zip file inside the release and open Ghidra.
Inside ghidra press the menu item *File* and press *Install Extensions...*.
Press the green button and find the downloaded zip file and add it.