Skip to content

Commit 8973fa9

Browse files
Merge pull request #2 from aboutcode-org/macho-winpe
Add binary symbols parsing for winpe and macho
2 parents 0f0637b + d9b7e5d commit 8973fa9

25 files changed

+2496
-303
lines changed

AUTHORS.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
The following organizations or individuals have contributed to this repo:
22

3-
-
3+
- Ayan Sinha Mahapatra @AyanSinhaMahapatra
4+
- nexB Inc.
5+

README.rst

Lines changed: 128 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,145 @@
1-
A Simple Python Project Skeleton
2-
================================
3-
This repo attempts to standardize the structure of the Python-based project's
4-
repositories using modern Python packaging and configuration techniques.
5-
Using this `blog post`_ as inspiration, this repository serves as the base for
6-
all new Python projects and is mergeable in existing repositories as well.
1+
binary-inspector
2+
================
73

8-
.. _blog post: https://blog.jaraco.com/a-project-skeleton-for-python-projects/
4+
binary-inspector is a utility to extract symbols from various kinds of binaries,
5+
i.e. ELF, Mach-O, WinPE and other binary formats. It is designed to work as a ScanCode
6+
Toolkit plugin and integrated in ScanCode.io pipelines.
97

8+
To install and use:
109

11-
Usage
12-
=====
10+
- Run ``pip install binary-inspector``
11+
- Use with ``scancode --json-pp - --binary-symbol --verbose <PATH to a tree or file with binaries>``
1312

14-
A brand new project
15-
-------------------
16-
.. code-block:: bash
13+
The JSON output will contain binary symbols found in binaries if any.
1714

18-
git init my-new-repo
19-
cd my-new-repo
20-
git pull git@github.com:nexB/skeleton
15+
- License: Apache-2.0 AND MIT
16+
- Copyright (c) nexB Inc., AboutCode, OWASP Foundation and others.
17+
- Homepage: https://github.com/aboutcode-org/binary-inspector
2118

22-
# Create the new repo on GitHub, then update your remote
23-
git remote set-url origin [email protected]:nexB/your-new-repo.git
19+
Development
20+
----------------
2421

25-
From here, you can make the appropriate changes to the files for your specific project.
22+
- Install requirements and dependencies using ``./configure --clean && ./configure --dev``
23+
- Then ``source venv/bin/activate``
2624

27-
Update an existing project
28-
---------------------------
29-
.. code-block:: bash
25+
Testing:
3026

31-
cd my-existing-project
32-
git remote add skeleton [email protected]:nexB/skeleton
33-
git fetch skeleton
34-
git merge skeleton/main --allow-unrelated-histories
27+
- To run tests: ``pytest -vvs``
28+
- To regen test fixtures: ``SCANCODE_REGEN_TEST_FIXTURES=yes pytest -vvs``
3529

36-
This is also the workflow to use when updating the skeleton files in any given repository.
30+
Acknowledgements, Funding, Support and Sponsoring
31+
--------------------------------------------------------
3732

38-
More usage instructions can be found in ``docs/skeleton-usage.rst``.
33+
This project is funded, supported and sponsored by:
3934

35+
- Generous support and contributions from users like you!
36+
- the European Commission NGI programme
37+
- the NLnet Foundation
38+
- the Swiss State Secretariat for Education, Research and Innovation (SERI)
39+
- Google, including the Google Summer of Code and the Google Seasons of Doc programmes
40+
- Mercedes-Benz Group
41+
- Microsoft and Microsoft Azure
42+
- AboutCode ASBL
43+
- nexB Inc.
4044

41-
Release Notes
42-
=============
45+
This project also uses some functions from other packages:
4346

44-
- 2023-07-18:
45-
- Add macOS-13 job in azure-pipelines.yml
47+
- blint (https://github.com/owasp-dep-scan/blint)
48+
- symbolic (https://pypi.org/project/symbolic/)
49+
- lief (https://pypi.org/project/lief/)
4650

47-
- 2022-03-04:
48-
- Synchronize configure and configure.bat scripts for sanity
49-
- Update CI operating system support with latest Azure OS images
50-
- Streamline utility scripts in etc/scripts/ to create, fetch and manage third-party dependencies
51-
There are now fewer scripts. See etc/scripts/README.rst for details
5251

53-
- 2021-09-03:
54-
- ``configure`` now requires pinned dependencies via the use of ``requirements.txt`` and ``requirements-dev.txt``
55-
- ``configure`` can now accept multiple options at once
56-
- Add utility scripts from scancode-toolkit/etc/release/ for use in generating project files
57-
- Rename virtual environment directory from ``tmp`` to ``venv``
58-
- Update README.rst with instructions for generating ``requirements.txt`` and ``requirements-dev.txt``,
59-
as well as collecting dependencies as wheels and generating ABOUT files for them.
52+
|europa| |dgconnect|
6053

61-
- 2021-05-11:
62-
- Adopt new configure scripts from ScanCode TK that allows correct configuration of which Python version is used.
54+
|ngi| |nlnet|
55+
56+
|aboutcode| |nexb|
57+
58+
59+
60+
This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial
61+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
62+
Communications Networks, Content and Technology under grant agreement No 101069594.
63+
64+
|ngizeroentrust| https://nlnet.nl/project/Back2source/
65+
66+
67+
This project was funded through the NGI0 Core Fund, a fund established by NLnet with financial
68+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
69+
Communications Networks, Content and Technology under grant agreement No 101092990.
70+
71+
|ngizerocore| https://nlnet.nl/project/Back2source-next/
72+
73+
74+
This project was funded through the NGI0 Entrust Fund, a fund established by NLnet with financial
75+
support from the European Commission's Next Generation Internet programme, under the aegis of DG
76+
Communications Networks, Content and Technology under grant agreement No 101069594.
77+
78+
|ngizeroentrust| https://nlnet.nl/project/purl2all/
79+
80+
81+
82+
.. |nlnet| image:: https://nlnet.nl/logo/banner.png
83+
:target: https://nlnet.nl
84+
:height: 50
85+
:alt: NLnet foundation logo
86+
87+
.. |ngi| image:: https://ngi.eu/wp-content/uploads/thegem-logos/logo_8269bc6efcf731d34b6385775d76511d_1x.png
88+
:target: https://ngi.eu35
89+
:height: 50
90+
:alt: NGI logo
91+
92+
.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg
93+
:target: https://nexb.com
94+
:height: 30
95+
:alt: nexB logo
96+
97+
.. |europa| image:: https://ngi.eu/wp-content/uploads/sites/77/2017/10/bandiera_stelle.png
98+
:target: http://ec.europa.eu/index_en.htm
99+
:height: 40
100+
:alt: Europa logo
101+
102+
.. |aboutcode| image:: https://aboutcode.org/wp-content/uploads/2023/10/AboutCode.svg
103+
:target: https://aboutcode.org/
104+
:height: 30
105+
:alt: AboutCode logo
106+
107+
.. |swiss| image:: https://www.sbfi.admin.ch/sbfi/en/_jcr_content/logo/image.imagespooler.png/1493119032540/logo.png
108+
:target: https://www.sbfi.admin.ch/sbfi/en/home/seri/seri.html
109+
:height: 40
110+
:alt: Swiss logo
111+
112+
.. |dgconnect| image:: https://commission.europa.eu/themes/contrib/oe_theme/dist/ec/images/logo/positive/logo-ec--en.svg
113+
:target: https://commission.europa.eu/about-european-commission/departments-and-executive-agencies/communications-networks-content-and-technology_en
114+
:height: 40
115+
:alt: EC DG Connect logo
116+
117+
.. |ngizerocore| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
118+
:target: https://nlnet.nl/core
119+
:height: 40
120+
:alt: NGI Zero Core Logo
121+
122+
.. |ngizerocommons| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
123+
:target: https://nlnet.nl/commonsfund/
124+
:height: 40
125+
:alt: NGI Zero Commons Logo
126+
127+
.. |ngizeropet| image:: https://nlnet.nl/image/logos/NGI0PET_tag.svg
128+
:target: https://nlnet.nl/PET
129+
:height: 40
130+
:alt: NGI Zero PET logo
131+
132+
.. |ngizeroentrust| image:: https://nlnet.nl/image/logos/NGI0Entrust_tag.svg
133+
:target: https://nlnet.nl/entrust
134+
:height: 38
135+
:alt: NGI Zero Entrust logo
136+
137+
.. |ngiassure| image:: https://nlnet.nl/image/logos/NGIAssure_tag.svg
138+
:target: https://nlnet.nl/image/logos/NGIAssure_tag.svg
139+
:height: 32
140+
:alt: NGI Assure logo
141+
142+
.. |ngidiscovery| image:: https://nlnet.nl/image/logos/NGI0Discovery_tag.svg
143+
:target: https://nlnet.nl/discovery/
144+
:height: 40
145+
:alt: NGI Discovery logo

azure-pipelines.yml

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -7,58 +7,10 @@
77

88
jobs:
99

10-
- template: etc/ci/azure-posix.yml
11-
parameters:
12-
job_name: ubuntu22_cpython
13-
image_name: ubuntu-22.04
14-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
15-
test_suites:
16-
all: venv/bin/pytest -n 2 -vvs
17-
1810
- template: etc/ci/azure-posix.yml
1911
parameters:
2012
job_name: ubuntu24_cpython
2113
image_name: ubuntu-24.04
2214
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
2315
test_suites:
2416
all: venv/bin/pytest -n 2 -vvs
25-
26-
- template: etc/ci/azure-posix.yml
27-
parameters:
28-
job_name: macos13_cpython
29-
image_name: macOS-13
30-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
31-
test_suites:
32-
all: venv/bin/pytest -n 2 -vvs
33-
34-
- template: etc/ci/azure-posix.yml
35-
parameters:
36-
job_name: macos14_cpython_arm64
37-
image_name: macOS-14
38-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
39-
test_suites:
40-
all: venv/bin/pytest -n 2 -vvs
41-
42-
- template: etc/ci/azure-posix.yml
43-
parameters:
44-
job_name: macos14_cpython
45-
image_name: macOS-14-large
46-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
47-
test_suites:
48-
all: venv/bin/pytest -n 2 -vvs
49-
50-
- template: etc/ci/azure-win.yml
51-
parameters:
52-
job_name: win2019_cpython
53-
image_name: windows-2019
54-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
55-
test_suites:
56-
all: venv\Scripts\pytest -n 2 -vvs
57-
58-
- template: etc/ci/azure-win.yml
59-
parameters:
60-
job_name: win2022_cpython
61-
image_name: windows-2022
62-
python_versions: ['3.9', '3.10', '3.11', '3.12', '3.13']
63-
test_suites:
64-
all: venv\Scripts\pytest -n 2 -vvs

docs/source/index.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
Welcome to nexb-skeleton's documentation!
2-
=========================================
1+
Welcome to binary-inspector's documentation!
2+
============================================
33

44
.. toctree::
55
:maxdepth: 2
66
:caption: Contents:
77

8-
skeleton-usage
98
contribute/contrib_doc
109

1110
Indices and tables

0 commit comments

Comments
 (0)