TheHive-Project / TheHive-Project/Cortex
Analyzers - Failure
Nobody has claimed this yet.
- Dominant language
- Scala
- Stars
- 1.6k
- Forks
- 264
- PR merge metrics
- No merged PRs in 30d
Description
On analyzers section we are getting this eror;
Traceback (most recent call last): File "/usr/lib/python3.7/sre_parse.py", line 1021, in parse_template this = chr(ESCAPES[this][1])KeyError: '\\s'During handling of the above exception, another exception occurred:Traceback (most recent call last): File "/etc/cortex/Cortex-Analyzers/analyzers/Abuse_Finder/abusefinder.py", line 9, in <module> from abuse_finder import domain_abuse, ip_abuse, \ File "/usr/local/lib/python3.7/dist-packages/abuse_finder/__init__.py", line 2, in <module> from .domain import domain_abuse File "/usr/local/lib/python3.7/dist-packages/abuse_finder/domain.py", line 3, in <module> from pythonwhois.net import get_whois_raw File "/usr/local/lib/python3.7/dist-packages/pythonwhois/__init__.py", line 1, in <module> from . import net, parse File "/usr/local/lib/python3.7/dist-packages/pythonwhois/parse.py", line 363, in <module> registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes] File "/usr/local/lib/python3.7/dist-packages/pythonwhois/parse.py", line 363, in <listcomp> registrant_regexes = [preprocess_regex(regex) for regex in registrant_regexes] File "/usr/local/lib/python3.7/dist-packages/pythonwhois/parse.py", line 205, in preprocess_regex regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\s*(?P<\1>\S.*)", regex) File "/usr/lib/python3.7/re.py", line 192, in sub return _compile(pattern, flags).sub(repl, string, count) File "/usr/lib/python3.7/re.py", line 309, in _subx template = _compile_repl(template, pattern) File "/usr/lib/python3.7/re.py", line 300, in _compile_repl return sre_parse.parse_template(repl, pattern) File "/usr/lib/python3.7/sre_parse.py", line 1024, in parse_template raise s.error('bad escape %s' % this, len(this))re.error: bad escape \s at position 0
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with analyzers/Abuse_Finder/abusefinder.py and reproduce the import failure shown in the traceback. Then inspect the referenced pythonwhois parse.py preprocessing call and its Python 3.7 compatibility. Done means the Abuse_Finder analyzer imports and runs without the reported bad escape error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100