Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite selfextract #2397

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/cuckoo/common/web_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,9 @@ def perform_search(term, value, search_limit=False, user_id=False, privs=False,
elif term == "configs":
# check if family name is string only maybe?
query_val = {f"{search_term_map[term]}.{value}": {"$exist": True}, "$options": "i"}
# ToDo proper implementation here
# elif term == "extracted_tool":
# query_val = {"$exist": True}
elif term == "ttp":
if validate_ttp(value):
query_val = value.upper()
Expand Down
8 changes: 4 additions & 4 deletions tests/test_file_extra_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def test_generic_file_extractors(self):
duplicated,
tests=True,
)
assert data_dictionary["extracted_files_tool"] == "MsiExtract"
assert len(data_dictionary["extracted_files"]) == 2
assert "MsiExtract" in data_dictionary["selfextract"].keys()
assert len(data_dictionary["selfextract"]["MsiExtract"]["extracted_files"]) == 2

@pytest.mark.skipif(
not (self_extraction_dir / "5b354397f6393ed777639b7d40dec3f37215dcb5078c63993e8a9703e819e2bc.inno").exists(),
Expand All @@ -60,8 +60,8 @@ def test_generic_file_extractors_no_tests(self):
results,
duplicated,
)
assert data_dictionary["extracted_files_tool"] == "InnoExtract"
assert len(data_dictionary["extracted_files"]) == 1
assert "InnoExtract" in data_dictionary["selfextract"].keys()
assert len(data_dictionary["selfextract"]["InnoExtract"]["extracted_files"]) == 1

@pytest.mark.skip(reason="Not implemented yet")
def test_batch_extract(self):
Expand Down
Loading