[Tutor] Finding line number by offset value.

Cody West codythetech at gmail.com
Sun Feb 21 14:32:42 EST 2016


Hi,

I'm using yara-python for some file scanning and I'm trying to take the
offset in the 'strings' field and turn it into a line number.

http://yara.readthedocs.org/en/latest/yarapython.html

Below is what I'm working with.

(48L, '$execution', 'eval(base64_decode')

I'm trying to take 48L, which I believe is the character number, and get
the line number from that.

I know how to count lines until I match a string, but this is a little
harder.

I've searched all over the tubes and I can't seem to find anything useful.
Help a beginner out?

Thanks for your time,
Cody W


More information about the Tutor mailing list