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 ezyara

rules = ezyara.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

ezyara-0.4.1.tar.gz (493.2 kB view hashes)

Uploaded Source

Built Distribution

ezyara-0.4.1-cp38-abi3-macosx_11_0_arm64.whl (6.2 MB view hashes)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

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