Perfare / Il2CppDumper

Unity il2cpp reverse engineer
MIT License
6.67k stars 1.29k forks source link

BinaryNinja script error #788

Closed 0xElessar closed 2 months ago

0xElessar commented 2 months ago

Hello,

the files are over 80MB big, so uploading them might be difficult. After installing your latest plugin (from GITHUB repo) to BinaryNinja 3.3 (Windows), and running it, I am getting this error:

Exception in thread Thread-3:
Traceback (most recent call last):
  File "threading.py", line 1016, in _bootstrap_inner
  File "C:\Users\admin\AppData\Local\Vector35\BinaryNinja\plugins\..\python\binaryninja\plugin.py", line 928, in run
    self.task.run()
  File "C:\Users\admin\AppData\Roaming\Binary Ninja\plugins\Il2CppBinaryNinja\__init__.py", line 75, in run
    self.process_header()
  File "C:\Users\admin\AppData\Roaming\Binary Ninja\plugins\Il2CppBinaryNinja\__init__.py", line 20, in process_header
    result = self.bv.parse_types_from_string(f.read())
  File "C:\Users\admin\AppData\Local\Vector35\BinaryNinja\plugins\..\python\binaryninja\binaryview.py", line 6651, in parse_types_from_string
    raise SyntaxError(error_str)
SyntaxError: error: sources.hpp:220239:8 'long float' is invalid

any advice would be great.

thanks

masagrator commented 2 months ago

There is no such thing as long float in C and C++, I guess that's why.

If this is in header that il2cppdumper produced, replace "long float" with "double"

0xElessar commented 2 months ago

Thanks, @masagrator. I tried that, but the problem came from some different, one line in the *.h header file contained:

float long;

the parsing engine assume long is a type instead of variable name! Changing 'long' to other string, solved the problem.

thanks