p1sec / hermes-dec Goto Github PK
View Code? Open in Web Editor NEWA reverse engineering tool for decompiling and disassembling the React Native Hermes bytecode
License: GNU Affero General Public License v3.0
A reverse engineering tool for decompiling and disassembling the React Native Hermes bytecode
License: GNU Affero General Public License v3.0
The Not
opcode should use the !
operator, meanwhile it uses the -
operator
hermes-dec/src/decompilation/pass2_transform_code.py
Lines 489 to 490 in 2bd5073
Add This ASAP!
Or tell a method how to recompile after edit ...
v90
There's No Option To Re Assemble & Recompiler
Fix This
Tried hbctool to reassemble
Error:
assert os.path.exists(f"{path}/metadata.json"), f"metadata.json not found."
AssertionError: metadata.json not found
I've run ~/hermes-dec/parsers/hbc_file_parser.py file.js.hbc
and it seems, it always returns the following error
File "~/hermes-dec/parsers/hbc_file_parser.py", line 807, in <module>
hbc_reader.read_whole_file(file_descriptor)
File "~/hermes-dec/parsers/hbc_file_parser.py", line 763, in read_whole_file
self.read_header_from_buffer() # Defines self.header
File "~/hermes-dec/parsers/hbc_file_parser.py", line 488, in read_header_from_buffer
assert sha1(file_data[:-SHA1_NUM_BYTES]).digest() == file_data[-SHA1_NUM_BYTES:]
AssertionError
find
confirms it is Hermes JavaScript bytecode, version 90
.Hello developers,
I would like to know if you have any option to return the code to index.android.boundle after changes in the hasm file ?
Logs:
[...]
Address 256941: Line 17179891934 - Column 38654917786 - Statement 445715
Address 256946: Line 17179891934 - Column 38654917784 - Statement 445715
Address 256946: Line 19327375581 - Column 38654917789 - Statement 445715
Address 256926: Line 19327375581 - Column 42949885084 - Statement 445715
Address 256940: Line 19327375581 - Column 42949885115 - Statement 445715
Traceback (most recent call last):
File "/home/kali/.local/bin/hbc-file-parser", line 8, in <module>
sys.exit(main())
^^^^^^
File "/home/kali/.local/share/pipx/venvs/hermes-dec/lib/python3.11/site-packages/hermes_dec/parsers/hbc_file_parser.py", line 915, in main
print_debug_info(hbc_reader.sources_data_storage)
File "/home/kali/.local/share/pipx/venvs/hermes-dec/lib/python3.11/site-packages/hermes_dec/parsers/debug_info_parser.py", line 64, in print_debug_info
current_statement += statement_delta
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
When u add Reassembler option? Or Tell A Method How To Reassemble? ๐ฅฒ
This disassembler function better than HBC TOOL.
Hello,
I wanted to reach out and make you aware of a typo I noticed in the file README.md:
Line 74 in 7444ad2
The folder which holds the decompilation tools is currently "decompilation", not "decompiler". As such, the command could be updated as follows:
~/hermes-dec/decompilation/hbc_decompiler.py assets/index.android.bundle /tmp/my_output_file.js
A very small issue overall, but I figured it may be worth bringing up.
Thank you, and I appreciate the hard work spent developing this tool!
The full error message is UnicodeEncodeError: 'charmap' codec can't encode character '\u2502' in position 68: character maps to <undefined>
which happens while printing instructions. As from the readme, you tested on the same version and it seems you have it worked. Any suggestions?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.