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.2-cp38-abi3-win_amd64.whl (997.8 kB view details)

Uploaded CPython 3.8+Windows x86-64

pyscrings-0.1.2-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.2-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pyscrings-0.1.2-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.2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 43469bf228d99d18af9204a8c1d379b0473de610bef030fe1e82ddb3c07f7146
MD5 40dad0f24b1921f778d266b20ba2077a
BLAKE2b-256 28acd3a283b1cd791f75f0fdbd5aa50eb3c762033a8fdcb31b4940635366ac2d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyscrings-0.1.2-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eaf450c51c607a9ee46c286aec4102dd9093d8fd01c3729c2cc78e5861ec78e1
MD5 97207ea00f160ade82b311cb01895744
BLAKE2b-256 38692940088d8f160541527466d443a71c7af2249081e5808a2507a52eea7175

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