You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Gopherjs reverse engineering
Gopherjs is a compiler for the go language which compiles to pure javascript, it can be used to write go code which is executed on a webrowser, or where I found it, on a cordova app, while I was trying to reverse engineer an android apk.
First six lines, I will call it "header", it the same for all the projects, so we can ignore them, the only useful info is the go version, which also tell us the gopherjs version as they are linked.
Then we have a variable number of lines, were each line is a go package, we will split each of this lines in an individual file, so the IDE those not implode (which is what happens when you try to beautify the code all at once).
Lastly, we have 9 lines which are all the same for all the programs too, this is where everything starts whith the call to init(), but we will ignore this part for now.
Some ideas for the future
Use a parser like this one to improve the decompiler extension. Or maybe run the code for its decompilation, as the $packages structure might contain really useful information, and maybe could be use for better reverse engineering.
cool project 👍🏻
but this feels like a lot of work (writing a whole decompiler, not only unpacking) for a very niche feature, and is better suited to be in https://github.com/vik0t0r/gopherjsre rather than this repo, but he can of course reuse some of the unminify logic if needed
I'd rather focus on improving the current core features for now
cc // @vik0t0r FYI
See Also
The text was updated successfully, but these errors were encountered: