Skip to content

Commit 3bc0608

Browse files
committed
Finish POC cleanup
1 parent 59bc1a3 commit 3bc0608

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

lib/metasploit/framework/data_service.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ def active
3434
raise 'DataLService#active is not implemented';
3535
end
3636

37+
#
38+
# Hold metadata about a data service
39+
#
3740
class Metadata
3841
attr_reader :id
3942
attr_reader :name
@@ -45,14 +48,15 @@ def initialize (id, name, active)
4548
self.active = active
4649
end
4750

51+
#######
4852
private
53+
#######
54+
4955
attr_writer :id
5056
attr_writer :name
5157
attr_writer :active
5258

5359
end
54-
5560
end
56-
5761
end
5862
end

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
require 'msf/ui/console/command_dispatcher/resource'
2121
require 'msf/ui/console/command_dispatcher/modules'
2222
require 'msf/util/document_generator'
23-
require 'metasploit/framework/data_service/remote/msf_red/msf_red_service'
2423

2524
module Msf
2625
module Ui
@@ -108,7 +107,6 @@ def commands
108107
"?" => "Help menu",
109108
"banner" => "Display an awesome metasploit banner",
110109
"cd" => "Change the current working directory",
111-
"msf_red_connect" => "Connect to MSF Platform",
112110
"connect" => "Communicate with a host",
113111
"color" => "Toggle color",
114112
"exit" => "Exit the console",
@@ -263,20 +261,6 @@ def cmd_banner(*args)
263261

264262
end
265263

266-
def cmd_msf_red_connect(*args)
267-
while (arg = args.shift)
268-
case arg
269-
when '-u'
270-
username = args.shift
271-
when '-p'
272-
password = args.shift
273-
end
274-
end
275-
276-
msf_red_service = MSFRedService.new()
277-
msf_red_service.launch(username, password)
278-
end
279-
280264
def cmd_connect_help
281265
print_line "Usage: connect [options] <host> <port>"
282266
print_line

lib/msf/ui/console/command_dispatcher/db.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ def active?
8585
end
8686

8787
def cmd_set_data_service(service_id)
88-
framework.db.set_data_service(service_id)
88+
begin
89+
framework.db.set_data_service(service_id)
90+
rescue Exception => e
91+
print_error "Unable to set data service: #{e.message}"
92+
end
8993
end
9094

9195
def cmd_list_data_services()

0 commit comments

Comments
 (0)