UT: Remove Drupal exploiter references

This commit is contained in:
Shreya Malviya 2022-04-08 13:47:25 +05:30
parent ffbf0f440e
commit 909ac6d9c6
5 changed files with 5 additions and 9 deletions

View File

@ -54,7 +54,6 @@
{"name": "WmiExploiter", "supported_os": ["windows"], "options": {}} {"name": "WmiExploiter", "supported_os": ["windows"], "options": {}}
], ],
"vulnerability": [ "vulnerability": [
{"name": "DrupalExploiter", "supported_os": ["linux", "windows"], "options": {}},
{"name": "HadoopExploiter", "supported_os": ["linux", "windows"], "options": {}}, {"name": "HadoopExploiter", "supported_os": ["linux", "windows"], "options": {}},
{"name": "ShellShockExploiter", "supported_os": ["linux"], "options": {}}, {"name": "ShellShockExploiter", "supported_os": ["linux"], "options": {}},
{"name": "Struts2Exploiter", "supported_os": ["linux", "windows"], "options": {}}, {"name": "Struts2Exploiter", "supported_os": ["linux", "windows"], "options": {}},

View File

@ -54,7 +54,6 @@
"WebLogicExploiter", "WebLogicExploiter",
"HadoopExploiter", "HadoopExploiter",
"MSSQLExploiter", "MSSQLExploiter",
"DrupalExploiter",
"PowerShellExploiter", "PowerShellExploiter",
"Log4ShellExploiter" "Log4ShellExploiter"
], ],

View File

@ -8,8 +8,7 @@
"Struts2Exploiter", "Struts2Exploiter",
"WebLogicExploiter", "WebLogicExploiter",
"HadoopExploiter", "HadoopExploiter",
"MSSQLExploiter", "MSSQLExploiter"
"DrupalExploiter"
] ]
}, },
"credentials": { "credentials": {

View File

@ -94,9 +94,9 @@ NODE_DICT = {
"exploits": [ "exploits": [
{ {
"exploitation_result": True, "exploitation_result": True,
"exploiter": "DrupalExploiter", "exploiter": "Log4ShellExploiter",
"info": { "info": {
"display_name": "Drupal Server", "display_name": "Log4j",
"started": datetime.datetime(2021, 2, 19, 9, 0, 14, 950000), "started": datetime.datetime(2021, 2, 19, 9, 0, 14, 950000),
"finished": datetime.datetime(2021, 2, 19, 9, 0, 14, 950000), "finished": datetime.datetime(2021, 2, 19, 9, 0, 14, 950000),
"vulnerable_urls": [], "vulnerable_urls": [],
@ -135,12 +135,12 @@ NODE_DICT_FAILED_EXPLOITS["exploits"][1]["exploitation_result"] = False
def test_get_exploits_used_on_node__2_exploits(): def test_get_exploits_used_on_node__2_exploits():
exploits = get_exploits_used_on_node(NODE_DICT) exploits = get_exploits_used_on_node(NODE_DICT)
assert sorted(exploits) == sorted(["Zerologon Exploiter", "Drupal Server Exploiter"]) assert sorted(exploits) == sorted(["Zerologon Exploiter", "Log4Shell Exploiter"])
def test_get_exploits_used_on_node__duplicate_exploits(): def test_get_exploits_used_on_node__duplicate_exploits():
exploits = get_exploits_used_on_node(NODE_DICT_DUPLICATE_EXPLOITS) exploits = get_exploits_used_on_node(NODE_DICT_DUPLICATE_EXPLOITS)
assert exploits == ["Drupal Server Exploiter"] assert exploits == ["Log4Shell Exploiter"]
def test_get_exploits_used_on_node__failed(): def test_get_exploits_used_on_node__failed():

View File

@ -199,7 +199,6 @@ def test_format_config_for_agent__exploiters(flat_monkey_config):
}, },
], ],
"vulnerability": [ "vulnerability": [
{"name": "DrupalExploiter", "supported_os": [], "options": {}},
{"name": "HadoopExploiter", "supported_os": ["linux", "windows"], "options": {}}, {"name": "HadoopExploiter", "supported_os": ["linux", "windows"], "options": {}},
{"name": "Log4ShellExploiter", "supported_os": ["linux", "windows"], "options": {}}, {"name": "Log4ShellExploiter", "supported_os": ["linux", "windows"], "options": {}},
{"name": "Struts2Exploiter", "supported_os": [], "options": {}}, {"name": "Struts2Exploiter", "supported_os": [], "options": {}},