Skip to main content

Python bindings for YARA-X

Project description

PyPI - Version PyPI - License Documentation Downloads Downloads per week GitHub Repo stars

The official Python library for YARA-X. Supports Python 3.8+ in Linux, MacOS and Windows.

import yara_x

rules = yara_x.compile('''
  rule test { 
    strings: 
      $a = "foobar" 
    condition: 
      $a
  }''')

results = rules.scan(b"foobar")

assert results.matching_rules[0].identifier == "test"
assert results.matching_rules[0].patterns[0].identifier == "$a"
assert results.matching_rules[0].patterns[0].matches[0].offset == 0
assert results.matching_rules[0].patterns[0].matches[0].length == 6

For more information about how to use this library, please check the documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yara_x-0.3.0.tar.gz (484.0 kB view hashes)

Uploaded Source

Built Distributions

yara_x-0.3.0-pp310-pypy310_pp73-win_amd64.whl (5.6 MB view hashes)

Uploaded PyPy Windows x86-64

yara_x-0.3.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

yara_x-0.3.0-pp310-pypy310_pp73-macosx_11_0_arm64.whl (6.1 MB view hashes)

Uploaded PyPy macOS 11.0+ ARM64

yara_x-0.3.0-pp310-pypy310_pp73-macosx_10_12_x86_64.whl (6.5 MB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

yara_x-0.3.0-pp39-pypy39_pp73-win_amd64.whl (5.6 MB view hashes)

Uploaded PyPy Windows x86-64

yara_x-0.3.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

yara_x-0.3.0-pp39-pypy39_pp73-macosx_11_0_arm64.whl (6.1 MB view hashes)

Uploaded PyPy macOS 11.0+ ARM64

yara_x-0.3.0-pp39-pypy39_pp73-macosx_10_12_x86_64.whl (6.5 MB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

yara_x-0.3.0-pp38-pypy38_pp73-win_amd64.whl (5.6 MB view hashes)

Uploaded PyPy Windows x86-64

yara_x-0.3.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view hashes)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

yara_x-0.3.0-pp38-pypy38_pp73-macosx_11_0_arm64.whl (6.1 MB view hashes)

Uploaded PyPy macOS 11.0+ ARM64

yara_x-0.3.0-pp38-pypy38_pp73-macosx_10_12_x86_64.whl (6.5 MB view hashes)

Uploaded PyPy macOS 10.12+ x86-64

yara_x-0.3.0-cp38-abi3-win_amd64.whl (5.6 MB view hashes)

Uploaded CPython 3.8+ Windows x86-64

yara_x-0.3.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (7.4 MB view hashes)

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

yara_x-0.3.0-cp38-abi3-macosx_11_0_arm64.whl (6.1 MB view hashes)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

yara_x-0.3.0-cp38-abi3-macosx_10_12_x86_64.whl (6.5 MB view hashes)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

Supported by

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