Skip to content
This repository
Browse code

Add an option to the schemadump modules to not display output to the

screen
  • Loading branch information...
commit c386e1ce31607ee74a4496a251a5671be687296f 1 parent 0be83da
dmaloney-r7 authored May 17, 2012
6  modules/auxiliary/scanner/mssql/mssql_schemadump.rb
@@ -33,6 +33,10 @@ def initialize
33 33
 			'Author'         => ['TheLightCosine <thelightcosine[at]gmail.com>'],
34 34
 			'License'        => MSF_LICENSE
35 35
 		)
  36
+
  37
+		register_options([
  38
+			OptBool.new('DISPLAY_RESULTS', [true, "Display the Results to the Screen", true])
  39
+			])
36 40
 	end
37 41
 
38 42
 	def run_host(ip)
@@ -69,7 +73,7 @@ def run_host(ip)
69 73
 					:proto => 'tcp'
70 74
 					)
71 75
 		store_loot('mssql_schema', "text/plain", datastore['RHOST'], output, "#{datastore['RHOST']}_mssql_schema.txt", "MS SQL Schema", this_service)
72  
-		print_good output
  76
+		print_good output if datastore['DISPLAY_RESULTS']
73 77
 	end
74 78
 
75 79
 	def get_mssql_schema
7  modules/auxiliary/scanner/mysql/mysql_schemadump.rb
@@ -30,6 +30,11 @@ def initialize
30 30
 			'Author'         => ['TheLightCosine <thelightcosine[at]gmail.com>'],
31 31
 			'License'        => MSF_LICENSE
32 32
 		)
  33
+
  34
+		register_options([
  35
+			OptBool.new('DISPLAY_RESULTS', [true, "Display the Results to the Screen", true])
  36
+			])
  37
+
33 38
 	end
34 39
 
35 40
 	def run_host(ip)
@@ -58,7 +63,7 @@ def run_host(ip)
58 63
 					:proto => 'tcp'
59 64
 					)
60 65
 		store_loot('mysql_schema', "text/plain", datastore['RHOST'], output, "#{datastore['RHOST']}_mysql_schema.txt", "MySQL Schema", this_service)
61  
-		print_good output
  66
+		print_good output if datastore['DISPLAY_RESULTS']
62 67
 	end
63 68
 
64 69
 
3  modules/auxiliary/scanner/postgres/postgres_schemadump.rb
@@ -32,6 +32,7 @@ def initialize
32 32
 		)
33 33
 		register_options([
34 34
 			OptString.new('DATABASE', [ true, 'The database to authenticate against', 'postgres']),
  35
+			OptBool.new('DISPLAY_RESULTS', [true, "Display the Results to the Screen", true])
35 36
 			])
36 37
 		deregister_options('SQL', 'RETURN_ROWSET', 'VERBOSE')
37 38
 
@@ -58,7 +59,7 @@ def run_host(ip)
58 59
 					:proto => 'tcp'
59 60
 					)
60 61
 		store_loot('postgres_schema', "text/plain", datastore['RHOST'], output, "#{datastore['RHOST']}_postgres_schema.txt", "Postgres SQL Schema", this_service)
61  
-		print_good output
  62
+		print_good output if datastore['DISPLAY_RESULTS']
62 63
 	end
63 64
 
64 65
 	def get_schema

0 notes on commit c386e1c

Please sign in to comment.
Something went wrong with that request. Please try again.