Skip to main content

A tool to parse Yara rules and help you edit Yara rules in your program

Project description

yara-helper

A tool to parse Yara rules and help you edit Yara rules in your program

Demo

Load and dump single rule

>>> rule_text = """rule person
... {
...     meta:
...         name = "James"
...         age = 18
...         is_male = true
...     strings:
...         say1 = "Hi"
...         say2 = "Nice"
...     condition:
...         all of them
... }"""
>>> info = RuleInfo.load(rule_text)
>>> info.meta['name']
'"James"'
>>> info.strings['say1']
'"Hi"'
>>> info.meta['age'] = 22
>>> info.dump()
'rule person\n{\n    meta:\n        name = "James"\n        age = 22\n        is_male = true\n    strings:\n        say1 = "Hi"\n        say2 = "Nice"\n    condition:\n        all of them\n}'

Load and dump multiple rules

>>> RuleInfo.load_multiple(yara_text) # return List[RuleInfo]
>>> RuleInfo.dump_multiple(list_of_ruleinfo) # return List[str]

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-helper-0.3.5.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

yara_helper-0.3.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file yara-helper-0.3.5.tar.gz.

File metadata

  • Download URL: yara-helper-0.3.5.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for yara-helper-0.3.5.tar.gz
Algorithm Hash digest
SHA256 2f2571f37eba29690da6543689643e771f2835efe604735e9a28380173ad85a1
MD5 f75333f8f5918444482138d8b5456e18
BLAKE2b-256 de637c0f2e44988d863faba06b0107d23cc0a1358f754b929da6de8dbf364933

See more details on using hashes here.

File details

Details for the file yara_helper-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: yara_helper-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.3

File hashes

Hashes for yara_helper-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 30045b3764a488ace010e75e139615b1fb7a0cdcc20c14803f8ebd1804c995b0
MD5 2d7f1e15cca0e144175be604d0efd58d
BLAKE2b-256 58a22d9b2184299ec0e76a19f98163652de73486ccd737b1b0583aa7d0ba103a

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