From 08871923cd41aa3d5f3cd3e855c3ac9b32f4cda4 Mon Sep 17 00:00:00 2001 From: h00die Date: Thu, 12 Dec 2024 11:25:16 +0000 Subject: [PATCH] minor bugs in obsidian module --- modules/exploits/multi/local/obsidian_plugin_persistence.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/exploits/multi/local/obsidian_plugin_persistence.rb b/modules/exploits/multi/local/obsidian_plugin_persistence.rb index bc5e2d3a9f7d8..abeaf1aad4172 100644 --- a/modules/exploits/multi/local/obsidian_plugin_persistence.rb +++ b/modules/exploits/multi/local/obsidian_plugin_persistence.rb @@ -89,7 +89,7 @@ def find_vaults ] # snap package end - config_files << datastore['CONFIG'] unless datastore['CONFIG'].empty? + config_files.unshift(datastore['CONFIG']) unless datastore['CONFIG'].empty? config_files.each do |config_file| next unless file?(config_file) @@ -204,7 +204,7 @@ def exploit plugin = plugin_name print_status("Using plugin name: #{plugin}") vaults = find_vaults - fail_with(Failure::NotFound, 'No vaults found') unless find_vaults.empty? + fail_with(Failure::NotFound, 'No vaults found') if find_vaults.empty? vaults.each_value do |vault| print_status("Uploading plugin to vault #{vault['path']}") # avoid mkdir function because that registers it for delete, and we don't want that for