python-Wappalyzer icon indicating copy to clipboard operation
python-Wappalyzer copied to clipboard

Fix invalid regex in Wappalyzer/data/technologies.json: Symfony -> html

Open arielf opened this issue 3 years ago • 0 comments

python3.11/site-packages/Wappalyzer/Wappalyzer.py:226: UserWarning: Caught 'unbalanced parenthesis at position 119' compiling regex: ['(?:<div class="sf-toolbar[^>]+?>[^]+([\d.])+|<div id="sfwdt[^"]+" class="[^"]*sf-toolbar)', 'version:\1'] ----------------------------------^^^ invalid sub-regex The 'position 119' seems to a delayed reaction to the core issue.

Indeed it looks like the sub-regex: [^]+ just before is invalid since ^ is a negation/complement for the char-class which is empty here.

The problem is in the data-file: Wappalyzer/data/technologies.json line 11961 The rule for "Symfony": "html": should be (one char change): "html": "(?:<div class="sf-toolbar[^>]+?>[^<]+<span class="sf-toolbar-value">([\d.])+|<div id="sfwdt[^"]+" class="[^"]*sf-toolbar)\;version:\1", ----------------------------------------------^^^^ the fix

arielf avatar Jan 18 '23 00:01 arielf