notded/dotnet/__main__.py

18 lines
475 B
Python

import sys
from dotnet.types import CLRSignature
from dotnet.tables import CLRTableType
from dotnet.file import CLRFile
file = CLRFile(sys.argv[1])
print(f'Entrypoint: {file.entrypoint.name}')
for cls in file.get_table(CLRTableType.TypeDef):
print('---')
print(f'Class: {cls.name}')
print('Fields:')
for f in cls.fields:
print(f'- {f.name}: {f.signature}')
print('Methods:')
for m in cls.methods:
print(f'- {m.name}: {m.signature}')