GithubHelp home page GithubHelp logo

pombredanne / pygore Goto Github PK

View Code? Open in Web Editor NEW

This project forked from goretk/pygore

0.0 0.0 0.0 70 KB

pyGoRE - Python library for analyzing Go binaries

Home Page: https://go-re.tk

License: GNU Affero General Public License v3.0

Makefile 9.03% Python 90.97%

pygore's Introduction

Build Status PyPI - Python Version PyPI

pyGoRE - Python library for analyzing Go binaries

How to use

  1. Use pip install pygore to download and install the library.
  2. Import it into your project.
  3. Write a new cool tool.

Sample code

import pygore

testfile = '/path/to/go/binary/file'

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))

pygore's People

Contributors

stevemk14ebr avatar tcm1911 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.