Skip to content

Fix adding modifier to hexstring  #175

@xbabka01

Description

@xbabka01

Yaramod do not add modifiers to hexstring.

Example code:

import yaramod
string = yaramod.YaraHexStringBuilder(0x58)
print(
    yaramod.YaraRuleBuilder()
    .with_name('asd')
    .with_hex_string('$asd', string.get())
    .private()
    .get().text
)

It will print something like this:

rule asd {
	strings:
		$asd = { 58 }
	condition:
		true
}

But it should print string with modifier

rule asd {
	strings:
		$asd = { 58 } private
	condition:
		true
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions