News for hackers. Stuff that matters.
Re:Microsoft Application Inspector by kozhevnikov on Tuesday January 28, 2020 @11:47AM (#22171098)
Does it support HTML? Can one parse HTML with regex?
Re:Microsoft Application Inspector by SloopJon on Tuesday January 28, 2020 @11:59AM (#22171256)
It doesn't appear to be parsing at all. It's just looking for patterns.

If you look at languages.json in RulesEngine/Resources, files with the extension .html (and some others) are recognized as "html", with type "code":

  {
    "name": "html",
    "extensions": [ ".html", ".htm", ".cshtml", ".tmpl" ],
    "type": "code"
  },

This sets the scope for the patterns in AppInspector/rules/default; e.g.,

  {
    "name": "Content Management Framework: Wordpress",
    "id": "AI021200",
    "description": "Development Framework: Wordpress",
    "applies_to": [ "javascript", "html" ],
    "tags": [ "Framework.CMS.Wordpress" ],
    "severity": "moderate",
    "patterns": [
      {
        "pattern": "wordpress",
        "type": "string",
        "scopes": [ "code", "comment" ],
        "modifiers": [ "i" ],
        "confidence": "high"
      }
    ]
  },
This seems like it would be prone to a lot of false positives, but I haven't tried the tool.
Re:Microsoft Application Inspector by JadeNB on Tuesday January 28, 2020 @12:38PM (#22171719)
Boy, are you in for a fun StackExchange read: https://stackoverflow.com/a/1732454 .
Re:Microsoft Application Inspector by singlow on Tuesday January 28, 2020 @11:52AM (#22171158)
You can't parse it properly with a Regular Expression, but you can parse it with regex-like systems. However I doubt it is parsing outright - it only has to look for certain keywords and patterns that indicate certain behaviors.
Re:Microsoft Application Inspector by guydalf on Tuesday January 28, 2020 @03:01PM (#22173476)
Correct. We don't need to parse it per se just look for use of features that are easy to identify like XmlHttpRequest, Json.Parse use etc.