编译YARA规则以测试文件或字符串
项目描述
什么是yara-ctypes
A ctypes libyara wrapper module which exposes libyara’s exports into the Python runtime (see: yara-project’s libyara v1.7).
A thread safe Rules object with an interface that is compatible with the interface exposed in the yara-project CPython extension module.
namespace management to allow easy loading of multiple YARA rules into a single Rules matching object.
Various Scanner class types to enable thread or process pool execution of matching requests over a Rules object.
A feature rich command line interface that gives the user many options to control how they may wish to perform a scan.
原因
ctypes在系统函数调用上释放GIL... 运行您的PC以达到其真正潜力。
通过将高阶逻辑(如管理规则路径、过滤路径、控制池化执行等)保留在Python等语言中,大大简化了事物。
不再构建PyC扩展...
我发现了一些错误和内存泄漏,并想使我的生活变得更简单。
有关yara-ctypes的参考和指南,请参阅: yara-ctypes文档
有关此包装器的额外技巧/技巧,请随时在github yara-ctypes/问题 页面上提问。
项目托管由 github.com 提供。
[mjdorma+yara-ctypes@gmail.com]
安装和运行
只需运行以下命令
> python setup.py install > python setup.py test > yara-ctypes -h
或者 PyPi
> pip install yara > yara-ctypes -h
兼容性
yara-ctypes已被实现以兼容Python 2.6+和Python 3.x。它已针对以下Python实现进行了测试
Ubuntu 12.04
CPython 2.7(32位,64位)
CPython 3.2(32位,64位)
CPython 2.6(32位)
CPython 2.7(32位)
CPython 3.2(32位)
CPython 3.3(32位)
Windows 7
CPython 2.6(32位,64位)
CPython 3.2(32位,64位)
OS X Mountain Lion
CPython 2.7(64位)
连续集成测试由Travis CI提供。
问题
变更日志
版本 1.7.7(2014年5月27日)
str转换修复(由David Cannings @olliencc贡献)
版本 1.7.6(2013年10月26日)
现在使用setuptools进行分发
版本 1.7.5(2013年9月13日)
添加CLI状态线程
改进进程和线程完成代码
版本 1.7.4(2013年9月12日)
添加yar预处理器
修复异步计数器错误
解决了未释放的结果问题
版本 1.7.3(2013年4月28日)
使用进程池或线程池进行扫描
错误修复和更多测试
版本 1.7.2(2013年4月19日)
CLI改进
错误修复
版本 1.7.1(2013年4月17日)
StdinScanner
流块入队重叠控制
版本 1.7.0(2013年4月15日)
附带了libyara-1.7的构建
通过yara-1.7的接口更改解决了兼容性问题
扫描命令行界面的大幅更改和改进。
更多测试
版本 1.6.5(2013年4月12日)
扫描中更多技术
改进测试
错误修复
版本 1.6.4(2013年4月11日)
支持py3.3
附加测试
改进扫描接口
错误修复
版本 1.6.3(2013年3月8日)
修复了yara.py的错误(回调可调用检查)
版本 1.6.2(2013年2月28日)
支持OS X Mountain Lion
版本 1.6.1(2012年9月6日)
支持64位Windows
错误修复
添加了文档
版本 1.6.0(2012年9月1日)
初始发布