for anyone following along the ghidra tutorial there has been some changes since this was made so heres how to fix the errors
To start ghidra with pyghidra you should find the pyghidraeun batch file in the /support folder of your ghidra installation
the ghidra.py script in il2cppdumper will return a few errors heres the fixes for them
for this error -> line 87
print 'Script finished!'
^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
you need to open ghidra.py with notepad++ and ho to the last line and put paranethesis right after print and at the end of script finished like this print( 'Script finished!' )
then you will likely get this error ->
line 14, in <module>
USER_DEFINED = ghidra.program.model.symbol.SourceType.USER_DEFINED
^^^^^^
NameError: name 'ghidra' is not defined
this is because the script is now executed within ghidra so the object oriented programming makes some of this written code redundant and breaks it.
to fix this error you need to add this at the top of your ghidra.py
from ghidra.program.model.symbol import SourceType
and then replace the USER_DEFINED line on line 14 with this
USER_DEFINED = SourceType.USER_DEFINED
FINALLY you will recieve one last error
->
line 40, in <module>
set_name(addr, name)
~~~~~~~~^^^^^^^^^^^^
File "C:\ReverseEngineer\ReverseAPK\Il2CppDumper.GUI.3.0.3\ghidra.py", line 22, in set_name
name = name.replace(' ', '-')
TypeError: a bytes-like object is required, not 'str'
to fix in line 22 of ghidra.py replace
name = name.replace(' ', '-')
with
name = name.replace(b' ', b'-')
or just add the lowercase b yourself