Skip to content

Commit

Permalink
Merge pull request #133 from CybercentreCanada/update/more-fp-tlds
Browse files Browse the repository at this point in the history
Update/more fp tlds [dev]
  • Loading branch information
cccs-kevin authored Feb 8, 2024
2 parents 0201d6b + 42f9387 commit 7a9509e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
18 changes: 10 additions & 8 deletions assemblyline_service_utilities/common/dynamic_service_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
# The following lists of domains and top-level domains are used for finding false-positives
# when extracting domains from text blobs
COMMON_FP_DOMAINS = ["example.com"]
COMMON_FP_TLDS_THAT_ARE_FILE_EXTS = [".dot", ".js", ".one", ".pub", ".py", ".sh", ".zip"]
COMMON_FP_TLDS_THAT_ARE_FILE_EXTS = [".dot", ".js", ".one", ".ps", ".pub", ".py", ".sh", ".win", ".zip"]
COMMON_FP_TLDS_THAT_ARE_JS_COMMANDS = [
".as",
".author",
Expand Down Expand Up @@ -873,14 +873,16 @@ def as_primitives(self) -> Dict[str, Any]:
:return: The dictionary representation of the object
"""
return {
key: value
if (
not isinstance(value, Process)
and not isinstance(value, ObjectID)
and not isinstance(value, NetworkDNS)
and not isinstance(value, NetworkHTTP)
key: (
value
if (
not isinstance(value, Process)
and not isinstance(value, ObjectID)
and not isinstance(value, NetworkDNS)
and not isinstance(value, NetworkHTTP)
)
else value.as_primitives()
)
else value.as_primitives()
for key, value in self.__dict__.items()
}

Expand Down
2 changes: 1 addition & 1 deletion assemblyline_service_utilities/testing/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ def _file_compare(ih: IssueHelper, f_type, original, new):

# Prune out items in the lists where nothing changed
for file in list(original):
if file in original and file in new:
if file in new:
original.remove(file)
new.remove(file)

Expand Down

0 comments on commit 7a9509e

Please sign in to comment.