What version of YARA are you using? That should work but I'm unable to
confirm right now.

-- WXS

On Friday, March 4, 2016, Robert Giczewski <robert.giczew...@gmail.com>
wrote:

> That would be too easy ;-)
>
> TypeError: 'yara.Rules' object is not iterable
>
>
> Am Freitag, 4. März 2016 13:59:11 UTC+1 schrieb Wesley Shields:
>>
>> I believe there is support for this that was added a while back. Totally
>> untested but I believe it goes like this:
>>
>> for rule in rules:
>>     print rule.identifier
>>
>> -- WXS
>>
>> On Friday, March 4, 2016, Robert Giczewski <robert.g...@gmail.com> wrote:
>>
>>> Hi,
>>> I'm currently loading quite a lot of files containing even more yara
>>> rules.
>>> After loading the files, I'm compiling the rules so I can check files
>>> against the rules. (see the code below)
>>>
>>> print "[*] Loading rules (%s) ... " % (rules_dir)
>>>
>>> sigs = dict([(name.replace(".yara", "").split("/")[-1], name) for name
>>> in glob.glob(rules_dir + "/*.yara")])
>>> rules = yara.compile(filepaths=sigs)
>>>
>>>
>>> Before checking any file, I want to see the names of every rule I
>>> successfully compiled.
>>> I'd love to have something like:
>>>
>>>
>>> for rule in rules.getNames():
>>>     print rule
>>>
>>> # badAss-1-rule
>>> # badAss-2-rule
>>> # ...
>>> # badAss-n-rule
>>>
>>> Any ideas?
>>>
>>> Thanks,
>>>
>>> Rob
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "YARA" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to yara-project+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "YARA" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to yara-project+unsubscr...@googlegroups.com
> <javascript:_e(%7B%7D,'cvml','yara-project%2bunsubscr...@googlegroups.com');>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"YARA" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to yara-project+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to