Python interface for YARA
Project description
yara-python
With this library you can use YARA from your Python programs. It covers all YARA’s features, from compiling, saving and loading rules to scanning files, strings and processes.
Here it goes a little example:
>>> import yara
>>> rule = yara.compile(source='rule foo: bar {strings: $a = "lmn" condition: $a}')
>>> matches = rule.match(data='abcdefgjiklmnoprstuvwxyz')
>>> print(matches)
[foo]
>>> print(matches[0].rule)
foo
>>> print(matches[0].tags)
['bar']
>>> print(matches[0].strings)
[(10L, '$a', 'lmn')]
Installation
The easiest way of installing YARA is by using pip:
$ pip install yara-python
But you can also get the source from GitHub and compile it yourself:
$ git clone --recursive https://github.com/VirusTotal/yara-python
$ cd yara-python
$ python setup.py build
$ sudo python setup.py install
Notice the --recursive option used with git. This is important because we need to download the yara subproject containing the source code for libyara (the core YARA library). It’s also important to note that the two methods above link libyara statically into yara-python. If you want to link dynamically against a shared libyara library use:
$ python setup.py build --dynamic-linking
For this option to work you must build and install YARA separately before installing yara-python.
Documentation
Find more information about how to use yara-python at https://yara.readthedocs.org/en/latest/yarapython.html.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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-python-4.0.1.tar.gz.
File metadata
- Download URL: yara-python-4.0.1.tar.gz
- Upload date:
- Size: 406.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78077c1961dc2068508bebc312a5574e8151ca5ebf57c82ca95587f1efc73509
|
|
| MD5 |
02b49e6f4121692bca308f614b6b320d
|
|
| BLAKE2b-256 |
c6a3f21aeebe85bbe3f2e089324663ea206fa1fc3f4196815b30b752f2e93e67
|
File details
Details for the file yara_python-4.0.1-cp38-cp38m-win_amd64.whl.
File metadata
- Download URL: yara_python-4.0.1-cp38-cp38m-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c9b091f31e88dcb6f05ca3507d7e0ba9fc21eebdd5dc51e256927b3ae68623c
|
|
| MD5 |
c177afcbdf4734a51443f7dd1f02d746
|
|
| BLAKE2b-256 |
3edbe0d5e52a390553d0a10dc9ac305687d2c9f233a66f0b02ff11c2b54fd196
|
File details
Details for the file yara_python-4.0.1-cp38-cp38m-win32.whl.
File metadata
- Download URL: yara_python-4.0.1-cp38-cp38m-win32.whl
- Upload date:
- Size: 747.6 kB
- Tags: CPython 3.8m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bfdda8456b7d80674d79f7e16ffc52c94613708e97424fdfe56fa86bd5d63be
|
|
| MD5 |
187d1ab3abb9b31d7661b5837bb56071
|
|
| BLAKE2b-256 |
5a7a650becf71dbb8c9139ba1549e10952f592ec7a194275b6a1bbe0e2a8d3e4
|
File details
Details for the file yara_python-4.0.1-cp37-cp37m-win_amd64.whl.
File metadata
- Download URL: yara_python-4.0.1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d12b8fb6ae665467a1cddc53fb219d87a5d5d944ce0cc7fd1432df8591b4af87
|
|
| MD5 |
18ed04fd8dc3c0f96506c28314f863e9
|
|
| BLAKE2b-256 |
988f56ceebbb03f907db82aa3739a4118fb80a458b654b3f9313469da8ae2bb3
|
File details
Details for the file yara_python-4.0.1-cp37-cp37m-win32.whl.
File metadata
- Download URL: yara_python-4.0.1-cp37-cp37m-win32.whl
- Upload date:
- Size: 747.4 kB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
300fb0f2a07e9ec187f4409b78c3f0a53460eb6ec22572f55a97d7fc49177fae
|
|
| MD5 |
e2c42a9c25ec128b62a9f72f4e24e0ef
|
|
| BLAKE2b-256 |
0dc1c5589143834f6de81a1850383b5c167d73f184ff83d7d6dd72a59f805cdd
|
File details
Details for the file yara_python-4.0.1-cp36-cp36m-win_amd64.whl.
File metadata
- Download URL: yara_python-4.0.1-cp36-cp36m-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.6m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fda7c18d333b97d2dc4baeffa25d970cafbaca4ccb4b7afe1a33ea81885a4523
|
|
| MD5 |
eb5a9dc4b6d62807ee91cfa94bd14f21
|
|
| BLAKE2b-256 |
430eac7a727440ef45e5e2e602d2715d95a17fde35e188b6a0b2d3ceefb6f7d8
|
File details
Details for the file yara_python-4.0.1-cp36-cp36m-win32.whl.
File metadata
- Download URL: yara_python-4.0.1-cp36-cp36m-win32.whl
- Upload date:
- Size: 747.4 kB
- Tags: CPython 3.6m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2999c75ff905c78998e49298a114e0f1eb7c1eb863036a9e4fc78584db96066
|
|
| MD5 |
bc30f99668ba02ea8d9269b1179f5455
|
|
| BLAKE2b-256 |
b5034fe6a8c6b8fc78ef3ce7f8b9dfff4996d1ae6e737d2b2a309a91d9bdc376
|
File details
Details for the file yara_python-4.0.1-cp35-cp35m-win_amd64.whl.
File metadata
- Download URL: yara_python-4.0.1-cp35-cp35m-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.5m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c84ff44ead853926b8684083d5d13f946973a78aea22b87d6deac23327bf1de1
|
|
| MD5 |
274f49ae2a1e8054df2f2bd2698537b8
|
|
| BLAKE2b-256 |
940308d05f508194b0ef321c5f2fc02290ea0a61982be980bf94f81fae7b4cb0
|
File details
Details for the file yara_python-4.0.1-cp35-cp35m-win32.whl.
File metadata
- Download URL: yara_python-4.0.1-cp35-cp35m-win32.whl
- Upload date:
- Size: 747.4 kB
- Tags: CPython 3.5m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89072952b45eab279863717e9ee1ff344efebb1f246dbbf85b05702438a3ebd0
|
|
| MD5 |
3c8be2e3d4fcafd26422d1783ca7338c
|
|
| BLAKE2b-256 |
3019494985efab56c91cd11c430ee8667c376e222c50ce782d3791c8d52f2841
|