{"id":34077384,"url":"https://github.com/buildsi/smeagle-py","last_synced_at":"2026-03-14T14:05:33.001Z","repository":{"id":57826856,"uuid":"528270162","full_name":"buildsi/smeagle-py","owner":"buildsi","description":"Smeagle Python - generate facts from ELF with debug","archived":false,"fork":false,"pushed_at":"2022-08-24T05:27:29.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T20:20:16.019Z","etag":null,"topics":["binary-analysis","dwarf","elf","registers","x86-64"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/buildsi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-24T04:52:50.000Z","updated_at":"2024-03-15T18:08:38.000Z","dependencies_parsed_at":"2022-09-07T01:50:56.870Z","dependency_job_id":null,"html_url":"https://github.com/buildsi/smeagle-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/buildsi/smeagle-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildsi%2Fsmeagle-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildsi%2Fsmeagle-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildsi%2Fsmeagle-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildsi%2Fsmeagle-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/buildsi","download_url":"https://codeload.github.com/buildsi/smeagle-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/buildsi%2Fsmeagle-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27725930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-analysis","dwarf","elf","registers","x86-64"],"created_at":"2025-12-14T10:02:52.537Z","updated_at":"2025-12-14T10:02:53.231Z","avatar_url":"https://github.com/buildsi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Smeagle Python\n\n[![PyPI version](https://badge.fury.io/py/smeagle.svg)](https://badge.fury.io/py/smeagle)\n[![ELF ABI Parsing Basic Tests](https://github.com/buildsi/smeagle-py/actions/workflows/basic-tests.yaml/badge.svg)](https://github.com/buildsi/smeagle-py/actions/workflows/basic-tests.yaml)\n\nGenerate facts for ELF binaries with debug information.\n\n## Usage\n\nFirst create a virtual environment and install dependencies.\n\n```bash\n$ python -m venv env\n$ source env/bin/activate\n$ pip install -e .\n```\n\nOr you can install the latest release from pypi:\n\n```bash\n$ pip install smeagle\n```\n\nIf you need a quick binary with debug, compile the example:\n\n```bash\ncd example\nmake\n```\n\nHere is the usage in python:\n\n```python\nfrom smeagle.loader import Loader\n\nld = Loader(\"example/libmath-v1.so\")\nprint(ld.corpus.to_json())\n```\n\nAnd an example [dev.py](dev.py) is provided to do the same and print to the terminal:\n\n```bash\n$ python dev.py example/libmath-v1.so\n```\n```\n{\n    \"library\": \"/home/vanessa/Desktop/Code/smeagle-py/example/libmath-v1.so\",\n    \"locations\": [\n        {\n            \"function\": {\n                \"name\": \"_ZN11MathLibrary10Arithmetic3AddEdd\",\n                \"class\": \"Function\",\n                \"parameters\": [\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm0\",\n                        \"direction\": \"import\"\n                    },\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm1\",\n                        \"direction\": \"import\"\n                    }\n                ],\n                \"return\": {\n                    \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                    \"direction\": \"export\",\n                    \"location\": \"%xmm0\"\n                },\n                \"direction\": \"export\"\n            }\n        },\n        {\n            \"function\": {\n                \"name\": \"_ZN11MathLibrary10Arithmetic8SubtractEdd\",\n                \"class\": \"Function\",\n                \"parameters\": [\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm0\",\n                        \"direction\": \"import\"\n                    },\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm1\",\n                        \"direction\": \"import\"\n                    }\n                ],\n                \"return\": {\n                    \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                    \"direction\": \"export\",\n                    \"location\": \"%xmm0\"\n                },\n                \"direction\": \"export\"\n            }\n        },\n        {\n            \"function\": {\n                \"name\": \"_ZN11MathLibrary10Arithmetic8MultiplyEdd\",\n                \"class\": \"Function\",\n                \"parameters\": [\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm0\",\n                        \"direction\": \"import\"\n                    },\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm1\",\n                        \"direction\": \"import\"\n                    }\n                ],\n                \"return\": {\n                    \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                    \"direction\": \"export\",\n                    \"location\": \"%xmm0\"\n                },\n                \"direction\": \"export\"\n            }\n        },\n        {\n            \"function\": {\n                \"name\": \"_ZN11MathLibrary10Arithmetic6DivideEdd\",\n                \"class\": \"Function\",\n                \"parameters\": [\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm0\",\n                        \"direction\": \"import\"\n                    },\n                    {\n                        \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                        \"location\": \"%xmm1\",\n                        \"direction\": \"import\"\n                    }\n                ],\n                \"return\": {\n                    \"type\": \"d20be53e889d2cee0c86d0ef9b0fbbc8\",\n                    \"direction\": \"export\",\n                    \"location\": \"%xmm0\"\n                },\n                \"direction\": \"export\"\n            }\n        }\n    ],\n    \"types\": {\n        \"d20be53e889d2cee0c86d0ef9b0fbbc8\": {\n            \"type\": \"double\",\n            \"size\": 8,\n            \"class\": \"Float\"\n        }\n    }\n}\n```\n\n## Tests\n\nThe test cases are stored in an external repository, so they can be shared. You can\nrun tests as follows:\n\n```bash\ngit clone https://github.com/buildsi/smeagle-examples ./tests/examples\n\n# Install extra test deps (assuming smeagle already installed, as shown above)\npip install pytest deepdiff\ncd tests/\n\n# Compile tests with a consistent compiler\ndocker run -t -v $PWD:/code gcc:12.1 bash -c \"cd /code \u0026\u0026 make\"\n\n# Run tests\npytest -xs test_examples.py\n```\n\n## Authors\n\n - [@vsoch](https://github.com/vsoch)\n - [@hainest](https://github.com/hainest)\n\n## License\n\nThis project is part of Spack. Spack is distributed under the terms of both the MIT license and the Apache License (Version 2.0). Users may choose either license, at their option.\n\nAll new contributions must be made under both the MIT and Apache-2.0 licenses.\n\nSee LICENSE-MIT, LICENSE-APACHE, COPYRIGHT, and NOTICE for details.\n\nSPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nLLNL-CODE-811652\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildsi%2Fsmeagle-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuildsi%2Fsmeagle-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuildsi%2Fsmeagle-py/lists"}