Skip to main content

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

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyscrings-0.1.5-cp38-abi3-win_amd64.whl (997.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

pyscrings-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.28+ x86-64

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

Hashes for pyscrings-0.1.5-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7882b7dafa4abc53e02fbe87ec60862c8b0c79294582c4a76bc7029a4eaacfd5
MD5 189c77be6eb672fd95d302f37349746f
BLAKE2b-256 d1ae660407479f7843b8bb306161137f3a61fe26e38f49154d5040ebe8287f40

See more details on using hashes here.

File details

Details for the file pyscrings-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pyscrings-0.1.5-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 767b04818447014c4d621e84e516510c210066d43a6abb81eff1744df05b86c8
MD5 d07ff9e5ce992b5e61d56dc85d05face
BLAKE2b-256 4aab172986b94f5e22a0e99a51adc5375ce4a0cbdcc2d6154ba15761f5bfe4f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page