Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed broken BaseYaraScanner #641

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions volatility/plugins/malware/malfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,13 @@ def scan(self, offset, maxlen):
data = self.address_space.zread(i, to_read)
if data:
for rule in rules:
for match in rule.match(data = data):
# We currently don't use name or value from the
# yara results but they can be yielded in the
# future if necessary.
for moffset, _name, _value in match.strings:
if moffset < constants.SCAN_BLOCKSIZE:
yield match, moffset + i
matches = rule.match(data=data)
if matches:
for k, v in matches.iteritems():
for yara_strings in v[0].get("strings"):
moffset = yara_strings.get("offset")
if moffset < constants.SCAN_BLOCKSIZE:
yield matches, moffset + i

i += constants.SCAN_BLOCKSIZE

Expand Down