@@ -218,6 +218,15 @@ def parse_strings(parsed_obj):
218
218
219
219
220
220
def ignorable_symbol (symbol_name : str | None ) -> bool :
221
+ """
222
+ Determines if a symbol is ignorable.
223
+
224
+ Args:
225
+ symbol_name (str): The name of the symbol to check.
226
+
227
+ Returns:
228
+ bool: True if the symbol is ignorable, False otherwise.
229
+ """
221
230
if not symbol_name :
222
231
return True
223
232
for pref in ("$f64." , "__" ):
@@ -901,7 +910,6 @@ def parse_overlay(parsed_obj: lief.Binary) -> dict[str, dict]:
901
910
.replace ("\0 " , "" )
902
911
.replace ("\n " , "" )
903
912
.replace (" " , "" ))
904
- print (overlay_str )
905
913
if overlay_str .find ('{"runtimeTarget' ) > - 1 :
906
914
start_index = overlay_str .find ('{"runtimeTarget' )
907
915
end_index = overlay_str .rfind ('}}}' )
@@ -911,7 +919,7 @@ def parse_overlay(parsed_obj: lief.Binary) -> dict[str, dict]:
911
919
# If all is good, deps should have runtimeTarget, compilationOptions, targets, and libraries
912
920
# Use libraries to construct BOM components and targets for the dependency tree
913
921
deps = json .loads (overlay_str )
914
- except json .DecodeError :
922
+ except json .JSONDecodeError :
915
923
pass
916
924
return deps
917
925
@@ -964,7 +972,7 @@ def add_pe_metadata(exe_file, metadata, parsed_obj):
964
972
metadata ["exception_functions" ] = parse_functions (parsed_obj .exception_functions )
965
973
# Detect if this PE might be dotnet
966
974
for i , dd in enumerate (parsed_obj .data_directories ):
967
- if i == 14 and isinstance (dd , lief . PE . DataDirectory . TYPES . CLR_RUNTIME_HEADER ) :
975
+ if i == 14 and type (dd ) == " CLR_RUNTIME_HEADER" :
968
976
metadata ["is_dotnet" ] = True
969
977
metadata ["dotnet_dependencies" ] = parse_overlay (parsed_obj )
970
978
tls = parsed_obj .tls
0 commit comments