Skip to content

Commit 020a28f

Browse files
committed
Unify data service command
1 parent 5a899d5 commit 020a28f

16 files changed

+116
-96
lines changed

lib/metasploit/framework/data_service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def initialize (id, name, active)
5252
private
5353
#######
5454

55-
attr_writer :id
55+
attr_writer :id
5656
attr_writer :name
5757
attr_writer :active
5858

lib/metasploit/framework/data_service/proxy/credential_data_proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def create_credential(opts)
55
data_service = self.get_data_service()
66
data_service.create_credential(opts)
77
rescue Exception => e
8-
elog "Call to #{data_service.class}#create_credential threw exception: #{e.message}"
8+
elog "Problem creating credential: #{e.message}"
99
end
1010
end
1111

@@ -14,7 +14,7 @@ def creds(opts = {})
1414
data_service = self.get_data_service
1515
data_service.creds(opts)
1616
rescue Exception => e
17-
elog "Call to #{data_service.class}#credentials threw exception: #{e.message}"
17+
elog "Problem retrieving credentials: #{e.message}"
1818
end
1919
end
2020
end

lib/metasploit/framework/data_service/proxy/event_data_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def report_event(opts)
55
data_service = self.get_data_service()
66
data_service.report_event(opts)
77
rescue Exception => e
8-
elog "Call to #{data_service.class}#report_event threw exception: #{e.message}"
8+
elog "Problem reporting event: #{e.message}"
99
end
1010
end
1111

lib/metasploit/framework/data_service/proxy/exploit_data_proxy.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def report_exploit_attempt(host, opts)
55
data_service = self.get_data_service()
66
data_service.report_exploit_attempt(host, opts)
77
rescue Exception => e
8-
elog "Call to #{data_service.class}#report_exploit_attempt threw exception: #{e.message}"
8+
elog "Problem reporting exploit attempt: #{e.message}"
99
end
1010
end
1111

@@ -14,7 +14,7 @@ def report_exploit_failure(opts)
1414
data_service = self.get_data_service()
1515
data_service.report_exploit_failure(opts)
1616
rescue Exception => e
17-
elog "Call to #{data_service.class}#report_exploit_failure threw exception: #{e.message}"
17+
elog "Problem reporting exploit failure: #{e.message}"
1818
end
1919
end
2020

@@ -23,7 +23,7 @@ def report_exploit_success(opts)
2323
data_service = self.get_data_service()
2424
data_service.report_exploit_success(opts)
2525
rescue Exception => e
26-
elog "Call to #{data_service.class}#report_exploit_success threw exception: #{e.message}"
26+
elog "Problem reporting exploit success: #{e.message}"
2727
end
2828
end
2929
end

lib/metasploit/framework/data_service/proxy/host_data_proxy.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def hosts(wspace = workspace, non_dead = false, addresses = nil)
99
opts[:addresses] = addresses
1010
data_service.hosts(opts)
1111
rescue Exception => e
12-
elog "Call to #{data_service.class}#hosts threw exception: #{e.message}"
12+
elog "Problem retrieving hosts: #{e.message}"
1313
end
1414
end
1515

@@ -26,7 +26,7 @@ def report_host(opts)
2626
data_service = self.get_data_service()
2727
data_service.report_host(opts)
2828
rescue Exception => e
29-
elog "Call to #{data_service.class}#report_host threw exception: #{e.message}"
29+
elog "Problem reporting host: #{e.message}"
3030
end
3131
end
3232

@@ -35,7 +35,7 @@ def report_hosts(hosts)
3535
data_service = self.get_data_service()
3636
data_service.report_hosts(hosts)
3737
rescue Exception => e
38-
elog "Call to #{data_service.class}#report_hosts threw exception: #{e.message}"
38+
elog "Problem reporting hosts: #{e.message}"
3939
end
4040
end
4141

@@ -44,7 +44,7 @@ def delete_host(opts)
4444
data_service = self.get_data_service()
4545
data_service.delete_host(opts)
4646
rescue Exception => e
47-
elog "Call to #{data_service.class}#delete_host threw exception: #{e.message}"
47+
elog "Problem removing host: #{e.message}"
4848
end
4949
end
5050

lib/metasploit/framework/data_service/proxy/loot_data_proxy.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def report_loot(opts)
88
end
99
data_service.report_loot(opts)
1010
rescue Exception => e
11-
elog "Call to #{data_service.class}#report_loot threw exception: #{e.message}"
11+
elog "Problem reporting loot: #{e.message}"
1212
end
1313
end
1414

@@ -18,7 +18,7 @@ def loots(wspace, opts = {})
1818
opts[:wspace] = wspace
1919
data_service.loot(opts)
2020
rescue Exception => e
21-
elog "Call to #{data_service.class}#loots threw exception: #{e.message}"
21+
elog "Problem retrieving loot: #{e.message}"
2222
end
2323
end
2424

lib/metasploit/framework/data_service/proxy/nmap_data_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def import_nmap_xml_file(args = {})
55
data_service = self.get_data_service()
66
data_service.import_nmap_xml_file(args)
77
rescue Exception => e
8-
elog "Call to #{data_service.class}#import_nmap_xml_file threw exception: #{e.message}"
8+
elog "Problem importing NMAP XML: #{e.message}"
99
end
1010
end
1111
end

lib/metasploit/framework/data_service/proxy/note_data_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def report_note(opts)
44
data_service = self.get_data_service()
55
data_service.report_note(opts)
66
rescue Exception => e
7-
elog "Call to #{data_service.class}#report_note threw exception: #{e.message}"
7+
elog "Problem reporting note: #{e.message}"
88
end
99
end
1010
end

lib/metasploit/framework/data_service/proxy/service_data_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ def report_service(opts)
55
data_service = self.get_data_service()
66
data_service.report_service(opts)
77
rescue Exception => e
8-
elog "Call to #{data_service.class}#report_service threw exception: #{e.message}"
8+
elog "Problem reporting service: #{e.message}"
99
end
1010
end
1111

lib/metasploit/framework/data_service/proxy/session_data_proxy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ def report_session(opts)
44
data_service = self.get_data_service()
55
data_service.report_session(opts)
66
rescue Exception => e
7-
elog "Call to #{data_service.class}#report_session threw exception: #{e.message}"
7+
elog "Problem reporting session: #{e.message}"
88
end
99
end
1010
end

0 commit comments

Comments
 (0)