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.6.tar.gz
(3.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yara-helper-0.3.6.tar.gz.
File metadata
- Download URL: yara-helper-0.3.6.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5240ed1ea36a325af6223aec814159370e92427cb2bbf05dd5e84babd654e3d
|
|
| MD5 |
397d0b2fa830c51dd38a8e8b8fcbb3fc
|
|
| BLAKE2b-256 |
ba435247c9fcb22dde32d1cb2651bc20eb8c9ed21eb45bcfa6084fb0b6258f84
|
File details
Details for the file yara_helper-0.3.6-py3-none-any.whl.
File metadata
- Download URL: yara_helper-0.3.6-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.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e9f4c772ddff6de684ce09676b502cad89a5ca73839cf491179763bd16985a5e
|
|
| MD5 |
655b866471df1764ec5ab95ba8cbe205
|
|
| BLAKE2b-256 |
3fe33ec38014e55b18bdf9ee2693d2218c3b2a7c4bb977404935eb37d7c05d8b
|