Skip to main content

Library for manipulation of YARA files.

Project description

Travis CI build status AppVeyor build status

yaramod is a library that provides parsing of YARA rules into AST and a C++ programming interface to build new YARA rulesets. This project is not associated with the YARA project.

yaramod also comes with Python bindings and this repository should be fully compatible with installation using pip.

Usage Example

See the wiki.

Requirements

  • C++ compiler with C++14 support

  • On Windows, only Microsoft Visual C++ is supported (version >= Visual Studio 2015).

  • CMake (version >= 3.6)

  • Flex (version >= 2.6)

  • Bison (version >= 3.0)

If you are also insterested in Python bindings: * GCC 5+ (for Linux/Unix, should remain the same for other compilers and platforms) * Python 3+

Build and Installation

  • Clone the repository:

  • git clone https://github.com/avast-tl/yaramod.git

  • Linux:

  • cd yaramod

  • mkdir build && cd build

  • cmake -DCMAKE_BUILD_TYPE=<Debug|Release> .. [OPTIONS...]

  • make -jN (N is the number of CPU cores to use for parallel build)

  • Windows:

  • Open a command prompt (e.g. C:\msys64\msys2_shell.cmd from MSYS2)

  • cd yaramod

  • mkdir build && cd build

  • cmake -G<generator> .. [OPTIONS...]

    • -G<generator> is -G"Visual Studio 14 2015" for 32-bit build using Visual Studio 2015, or -G"Visual Studio 14 2015 Win64" for 64-bit build using Visual Studio 2015. Of course, any later version of Visual Studio may be used.

  • cmake --build . --config Release -- -m

  • Alternatively, you can open yaramod.sln generated by cmake in Visual Studio IDE.

Available options are: * YARAMOD_DOC - provide build target doc for building documentation with Doxygen. (Default: OFF) * YARAMOD_TESTS - build unit tests. (Default: OFF) * YARAMOD_PYTHON - build python bindings. (Default: OFF) * YARAMOD_EXAMPLES - build example binaries. (Default: OFF)

Python bindings

The easiest way to get Python bindings to work is through pip like this:

pip install git+https://github.com/avast-tl/yaramod.git

or you can install latest stable version from PyPI like this:

pip install yaramod

If you want to clone and build the repository yourselves you can do so by following these steps:

  • Setup virtual environment if you don’t want to install yaramod into your system python:

  • ./setup_env.sh

  • source use_env.sh

  • Run compilation and installation of python bindings:

  • python setup.py build OPTIONS

  • python setup.py install

  • Allowed OPTIONS are:

  • --with-unit-tests - Build also C++ unit tests.

  • --debug - Build debug configuration.

API Documentation

You can generate the API documentation by yourself. Pass -DYARAMOD_DOC=ON to cmake and run make doc.

License

Copyright (c) 2017 Avast Software, licensed under the MIT license. See the LICENSE file for more details.

yaramod uses third-party libraries or other resources listed, along with their licenses, in the LICENSE-THIRD-PARTY file.

Contributing

See RetDec contribution guidelines.

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

yaramod-2.0.0.tar.gz (230.9 kB view details)

Uploaded Source

Built Distribution

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

yaramod-2.0.0-cp36-cp36m-win_amd64.whl (456.2 kB view details)

Uploaded CPython 3.6mWindows x86-64

File details

Details for the file yaramod-2.0.0.tar.gz.

File metadata

  • Download URL: yaramod-2.0.0.tar.gz
  • Upload date:
  • Size: 230.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for yaramod-2.0.0.tar.gz
Algorithm Hash digest
SHA256 1a84505addfd2f898c398345e163f5405847d3b352fc62d9d0afa43f5f1dcdbc
MD5 21bd1aec3b567bcb97dfcfb876e6cc39
BLAKE2b-256 675814c1ebad33a4ce8ea66f91a641325128732a319600f463dee2be7dcb4455

See more details on using hashes here.

File details

Details for the file yaramod-2.0.0-cp36-cp36m-win_amd64.whl.

File metadata

File hashes

Hashes for yaramod-2.0.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 ba7d0bfaa847af38776247738929675bcd4e708049d58ea68aea922aef5d2ebc
MD5 765f9d68bed4a54732ca1c8b200b0153
BLAKE2b-256 3e65f6b9400694bd2d1b989269d9f48cb38633e69be006c9722c65a4ae0e7bdb

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