Omit parentheses for no argument get_db calls

GSoC/Meterpreter_Web_Console
Matthew Kienow 2018-03-21 18:03:27 -04:00
parent 975948439d
commit 8d660084fc
No known key found for this signature in database
GPG Key ID: 40787F8B1EAC6E41
2 changed files with 7 additions and 7 deletions

View File

@ -21,7 +21,7 @@ module VulnAttemptServlet
lambda {
begin
opts = parse_json_request(request, false)
data = get_db().vuln_attempts(params.symbolize_keys)
data = get_db.vuln_attempts(params.symbolize_keys)
set_json_response(data)
rescue Exception => e
set_error_on_response(e)
@ -34,8 +34,8 @@ module VulnAttemptServlet
begin
job = lambda { |opts|
vuln_id = opts.delete(:vuln_id)
vuln = get_db().vulns(id: vuln_id).first
get_db().report_vuln_attempt(vuln, opts)
vuln = get_db.vulns(id: vuln_id).first
get_db.report_vuln_attempt(vuln, opts)
}
exec_report_job(request, &job)
rescue Exception => e

View File

@ -23,7 +23,7 @@ module VulnServlet
lambda {
begin
opts = parse_json_request(request, false)
data = get_db().vulns(params.symbolize_keys)
data = get_db.vulns(params.symbolize_keys)
includes = [:host, :vulns_refs, :refs, :module_refs]
set_json_response(data, includes)
rescue Exception => e
@ -36,7 +36,7 @@ module VulnServlet
lambda {
begin
job = lambda { |opts|
get_db().report_vuln(opts)
get_db.report_vuln(opts)
}
exec_report_job(request, &job)
rescue Exception => e
@ -51,7 +51,7 @@ module VulnServlet
opts = parse_json_request(request, false)
tmp_params = params.symbolize_keys
opts[:id] = tmp_params[:id] if tmp_params[:id]
data = get_db().update_vuln(opts)
data = get_db.update_vuln(opts)
set_json_response(data)
rescue Exception => e
set_error_on_response(e)
@ -63,7 +63,7 @@ module VulnServlet
lambda {
begin
opts = parse_json_request(request, false)
data = get_db().delete_vuln(opts)
data = get_db.delete_vuln(opts)
set_json_response(data)
rescue Exception => e
set_error_on_response(e)