Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pygore Error #21

Open
0xYazuko opened this issue Sep 10, 2023 · 0 comments
Open

Pygore Error #21

0xYazuko opened this issue Sep 10, 2023 · 0 comments

Comments

@0xYazuko
Copy link

0xYazuko commented Sep 10, 2023

Hello here is my script :

import pygore

testfile = './GoLmoL'

f = pygore.GoFile(testfile)
c = f.get_compiler_version()

print('Compiler: {}\nTimestamp: {}\nSHA {}\n'.
      format(c.name, c.timestamp, c.sha))

pkgs = f.get_packages()
types = f.get_types()
f.close()
for p in pkgs:
    print('Package: {}'.format(p.name))
    print("Functions:")
    for f in p.functions:
        print('{} from {} to {}'.format(f.name, hex(f.offset), hex(f.end)))
    print("Methods:")
    for m in p.methods:
        print('{} {} from {} to {}'.format(m.receiver, m.name,
                                           hex(m.offset), hex(m.end)))
    print("Types:")
    for t in types:
        print('Package path: {} | Type name: {}'.format(t.packagePath, t.name))

He don't work because i have this error caused by the package:

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    c = f.get_compiler_version()
  File "/home/runner/FaithfulWorrisomePrograms/venv/lib/python3.10/site-packages/pygore/lib.py", line 278, in get_compiler_version
    return _get_compiler_version(self.path)
  File "/home/runner/FaithfulWorrisomePrograms/venv/lib/python3.10/site-packages/pygore/lib.py", line 325, in _get_compiler_version
    cv = pcv.contents
ValueError: NULL pointer access
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant