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

Uploaded CPython 3.8+Windows x86-64

pyscrings-0.1.4-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.4-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: pyscrings-0.1.4-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 998.0 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.4-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 357b7e11c9ba0125d59c90ed3ff0d3d9341b2e3d19502b922e858d0f90156976
MD5 f9b79489c7773f8f87ab383a18c772aa
BLAKE2b-256 9e1900d0302d6377f5e74e74f40ff741975aae87defacd3a4d25a9bdfdfa1476

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pyscrings-0.1.4-cp38-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a5dc5b36358e4eea1e9b9432c9accb3efd196fecf6ed2edd19cf827d3c9d12c6
MD5 718ccfe130cadc05bf2b89a955e814b7
BLAKE2b-256 fb149be69f9d5dd6ce5b74a55825456cbe5636a17e46765faa56ec2898ca2c23

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