-
-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Docinfo oletools #2143
Docinfo oletools #2143
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things to consider. View full project report here.
@@ -168,6 +172,25 @@ def analyze_for_follina_cve(self) -> List[str]: | |||
hits += re.findall(r"mhtml:(https?://.*?)!", target) | |||
return hits | |||
|
|||
def analyze_for_cve(self) -> Dict: | |||
pattern = r"CVE-\d{4}-\d{4,7}" | |||
cve = dict() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cve = dict() | |
cve = {} |
Using dict literal syntax is simpler and computationally quicker. Read more.
if matches := re.findall(pattern, clsid_text): | ||
for match in matches: | ||
if match in cve: | ||
if clsid in cve[match]: | ||
cve[match][clsid].append(clsid_text) | ||
cve[match][clsid] = list(set(cve[match][clsid])) # uniq | ||
else: | ||
cve[match][clsid] = [clsid_text] | ||
else: | ||
cve[match] = {clsid: [clsid_text]} | ||
return cve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would take all texts where there is at least the "CVE" word, then I would extract the CVE numbers if they are available. In this way you can extract even the cases when the descripion just says "probable related to CVEs..."
Description
Type of change
Checklist
develop
_monkeypatch()
was used in its class to apply the necessary decorators.dumpplugin
command and added it in the project as a data migration. ("How to share a plugin with the community")test_files.zip
and you added the default tests for that mimetype in test_classes.py.FREE_TO_USE_ANALYZERS
playbook by following this guide.Black
,Flake
,Isort
) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.tests
folder). All the tests (new and old ones) gave 0 errors.