ELF symbol check
Project description
Purpose
This tool does check compiled elf-files (and all dependencies) against given rules. Objectives are
- check for discouraged functions (e.g. strcpy)
- check for combinations of symbols (e.g. mutex and pthreads)
Usage
usage: pysymbolcheck [-h] [--libpath LIBPATH] rules file
Eval symbols of a binary against given rules
positional arguments:
rules Path to a rule file
file File to parse
optional arguments:
-h, --help show this help message and exit
--libpath LIBPATH ":" separated path to lookup libraries
Rule file format
a rule file consists of a json-array, like this
[]
within this n element of the following can be added
{ "severity": "error", "id": "A_Unique_ID", "msg": "some message", "rule", "<rule>" }
for severity it is advised to use only info, warning or error
Rule definition
A rule can consist of any logical combined operation such as
((A && B) || (C && D )) && !E
to get the needed information following keywords are implemented
| keyword | variables | purpose | example |
|---|---|---|---|
| AVAILABLE() | symbol-name | check if a symbol is defined in the binary or any referenced lib | AVAILABLE(strncpy) |
| USED() | symbol-name | check if a symbol is used by some binary or lib | USED(strncpy) |
| SIZE() | symbol-name | get the size in bytes of a symbol | SIZE(strncpy) |
| TYPE() | symbol-name | get the type in bytes of a symbol | TYPE(strncpy) |
| && | n.a. | logical and | A && B |
| || | n.a. | logical or | A || B |
| ! | n.a. | not operator | !A |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysymbolcheck-2.12.0.tar.gz.
File metadata
- Download URL: pysymbolcheck-2.12.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b76496569f8893a679d3e716915b4c7ee1a2ec80fc1e98348665b17e40ddc531
|
|
| MD5 |
a25970d78f42f57474842c7adb0c4c32
|
|
| BLAKE2b-256 |
004a182321f857b6aa4c09bf37adb2086991721dfbb71dfba1d95043b4e39f9d
|
File details
Details for the file pysymbolcheck-2.12.0-py3-none-any.whl.
File metadata
- Download URL: pysymbolcheck-2.12.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e58459e9ad62af78d1c928e85f447919d9e9b4f38ffa2ec908d772dde2be780
|
|
| MD5 |
02f1effcfb0247122d08340e4bca50fb
|
|
| BLAKE2b-256 |
77bfa28a11f8d8a2cc4d6c30f03a7573713a1ad0b3e06a95c79d3f5750a7691d
|