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

Leading slashs are stripped #5

Closed
nbareil opened this issue Mar 21, 2018 · 1 comment
Closed

Leading slashs are stripped #5

nbareil opened this issue Mar 21, 2018 · 1 comment

Comments

@nbareil
Copy link
Contributor

nbareil commented Mar 21, 2018

When a regexp ends with a "/", it is removed:

$ cat leading_slash.yara
rule foobar {
  strings:
    $a = /foo\//
  condition:
    all of them
}

$ y2j leading_slash.yara
{           
   "file": "leading_slash.yara",
   "imports": null,
   "includes": null,
   "rules": [
      {
         "modifiers": {
            "global": false,
            "private": false
         },
         "identifier": "foobar",
         "tags": [],
         "meta": null,
         "strings": [
            {
               "id": "$a",
               "type": 2,
               "text": "foo\\",
               "modifiers": {
                  "nocase": false,
                  "ascii": false,
                  "wide": false,
                  "fullword": false,
                  "i": false,
                  "s": false
               }
            }
         ],
         "condition": "all of them"
      }
   ]
}

While I was expecting "text": "foo\\/".

@Northern-Lights
Copy link
Owner

Fixed, thanks for reporting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants