Semantic strings based on tree-sitter
Project description
pyscrings
Python bindings for scrings powered by PyO3 and maturin
scrings is a strings utility that will output only semantically valid strings based on tree-sitter grammar. For each script language we made a list of semantic nodes discriminant enough to detect the target language.
Install
pyscrings is available on PyPi:
pip install pyscrings
Usage
from pyscrings import powershell, javascript, php, bash, python, sql
with open("path_to_dump", "rb") as f:
for (offset, match) in powershell(f):
print((offset, repr(match)))
Supported languages
- Python ✅
- Javascript ✅
- Powershell ✅
- PHP ✅
- Bash ✅
- SQL ✅
- VBS ❌ (on going)
Build
pyscrings is powered by maturin
git clone https://github.com/airbus-cert/scrings
cd scrings\pyscrings
pip install maturin
maturin build --profile release
pip install target\wheels\*.whl
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
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 pyscrings-0.1.5-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: pyscrings-0.1.5-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 997.8 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7882b7dafa4abc53e02fbe87ec60862c8b0c79294582c4a76bc7029a4eaacfd5
|
|
| MD5 |
189c77be6eb672fd95d302f37349746f
|
|
| BLAKE2b-256 |
d1ae660407479f7843b8bb306161137f3a61fe26e38f49154d5040ebe8287f40
|
File details
Details for the file pyscrings-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyscrings-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
767b04818447014c4d621e84e516510c210066d43a6abb81eff1744df05b86c8
|
|
| MD5 |
d07ff9e5ce992b5e61d56dc85d05face
|
|
| BLAKE2b-256 |
4aab172986b94f5e22a0e99a51adc5375ce4a0cbdcc2d6154ba15761f5bfe4f0
|