Skip to content

Commit a928e5f

Browse files
committed
Whitespace
1 parent a57f04a commit a928e5f

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

lib/msf/core/db.rb

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def report_session(opts)
699699
if session.via_exploit == "exploit/multi/handler" and sess_data[:datastore]['ParentModule']
700700
mod_fullname = sess_data[:datastore]['ParentModule']
701701
mod_name = ::Mdm::ModuleDetail.find_by_fullname(mod_fullname).name
702-
else
702+
else
703703
mod_name = mod.name
704704
mod_fullname = mod.fullname
705705
end
@@ -719,7 +719,7 @@ def report_session(opts)
719719
vuln_info[:service] = service if service
720720

721721
vuln = framework.db.report_vuln(vuln_info)
722-
722+
723723
if session.via_exploit == "exploit/multi/handler" and sess_data[:datastore]['ParentModule']
724724
via_exploit = sess_data[:datastore]['ParentModule']
725725
else
@@ -738,7 +738,7 @@ def report_session(opts)
738738
}
739739

740740
framework.db.report_exploit_success(attempt_info)
741-
741+
742742
end
743743

744744
s
@@ -871,7 +871,7 @@ def report_exploit_success(opts)
871871
ref.to_s
872872
end
873873
})
874-
874+
875875
# Try find a matching vulnerability
876876
vuln = find_vuln_by_refs(ref_objs, host, svc)
877877
end
@@ -890,7 +890,7 @@ def report_exploit_success(opts)
890890
attempt_info[:loot_id] = opts[:loot_id] if opts[:loot_id]
891891

892892
vuln.vuln_attempts.create(attempt_info)
893-
893+
894894
# Correct the vuln's associated service if necessary
895895
if svc and vuln.service_id.nil?
896896
vuln.service = svc
@@ -909,12 +909,12 @@ def report_exploit_success(opts)
909909
attempt_info[:vuln_id] = vuln.id if vuln
910910
attempt_info[:session_id] = opts[:session_id] if opts[:session_id]
911911
attempt_info[:loot_id] = opts[:loot_id] if opts[:loot_id]
912-
912+
913913
if svc
914914
attempt_info[:port] = svc.port
915915
attempt_info[:proto] = svc.proto
916916
end
917-
917+
918918
if port and svc.nil?
919919
attempt_info[:port] = port
920920
attempt_info[:proto] = prot || "tcp"
@@ -937,7 +937,7 @@ def report_exploit_failure(opts)
937937

938938
timestamp = opts.delete(:timestamp)
939939
freason = opts.delete(:fail_reason)
940-
fdetail = opts.delete(:fail_detail)
940+
fdetail = opts.delete(:fail_detail)
941941
username = opts.delete(:username)
942942
mname = opts.delete(:module)
943943

@@ -968,7 +968,7 @@ def report_exploit_failure(opts)
968968
ref.to_s
969969
end
970970
})
971-
971+
972972
# Try find a matching vulnerability
973973
vuln = find_vuln_by_refs(ref_objs, host, svc)
974974
end
@@ -1003,7 +1003,7 @@ def report_exploit_failure(opts)
10031003
attempt_info[:port] = svc.port
10041004
attempt_info[:proto] = svc.proto
10051005
end
1006-
1006+
10071007
if port and svc.nil?
10081008
attempt_info[:port] = port
10091009
attempt_info[:proto] = prot || "tcp"
@@ -1018,7 +1018,7 @@ def report_vuln_attempt(vuln, opts)
10181018
::ActiveRecord::Base.connection_pool.with_connection {
10191019
return if not vuln
10201020
info = {}
1021-
1021+
10221022
# Opts can be keyed by strings or symbols
10231023
::Mdm::VulnAttempt.column_names.each do |kn|
10241024
k = kn.to_sym
@@ -1037,7 +1037,7 @@ def report_exploit_attempt(host, opts)
10371037
::ActiveRecord::Base.connection_pool.with_connection {
10381038
return if not host
10391039
info = {}
1040-
1040+
10411041
# Opts can be keyed by strings or symbols
10421042
::Mdm::VulnAttempt.column_names.each do |kn|
10431043
k = kn.to_sym
@@ -1623,7 +1623,7 @@ def report_vuln(opts)
16231623
# If a match is found on a vulnerability with no associated service,
16241624
# update that vulnerability with our service information. This helps
16251625
# prevent dupes of the same vuln found by both local patch and
1626-
# service detection.
1626+
# service detection.
16271627
if rids and rids.length > 0
16281628
vuln = find_vuln_by_refs(rids, host, service)
16291629
vuln.service = service if vuln
@@ -1651,7 +1651,7 @@ def report_vuln(opts)
16511651
else
16521652
vuln = host.vulns.find_by_name(name)
16531653
end
1654-
1654+
16551655
unless vuln
16561656

16571657
vinf = {
@@ -1660,7 +1660,7 @@ def report_vuln(opts)
16601660
:info => info
16611661
}
16621662

1663-
vinf[:service_id] = service.id if service
1663+
vinf[:service_id] = service.id if service
16641664
vuln = Mdm::Vuln.create(vinf)
16651665
end
16661666
end
@@ -1681,7 +1681,7 @@ def report_vuln(opts)
16811681

16821682
# Handle vuln_details parameters
16831683
report_vuln_details(vuln, details) if details
1684-
1684+
16851685
vuln
16861686
}
16871687
end
@@ -4196,9 +4196,9 @@ def import_nexpose_rawxml(args={}, &block)
41964196
# Takes an array of vuln hashes, as returned by the NeXpose rawxml stream
41974197
# parser, like:
41984198
# [
4199-
# {"id"=>"winreg-notes-protocol-handler", severity="8", "refs"=>[{"source"=>"BID", "value"=>"10600"}, ...]}
4200-
# {"id"=>"windows-zotob-c", severity="8", "refs"=>[{"source"=>"BID", "value"=>"14513"}, ...]}
4201-
# ]
4199+
# {"id"=>"winreg-notes-protocol-handler", severity="8", "refs"=>[{"source"=>"BID", "value"=>"10600"}, ...]}
4200+
# {"id"=>"windows-zotob-c", severity="8", "refs"=>[{"source"=>"BID", "value"=>"14513"}, ...]}
4201+
# ]
42024202
# and transforms it into a struct, containing :id, :refs, :title, and :severity
42034203
#
42044204
# Other attributes can be added later, as needed.
@@ -5095,7 +5095,7 @@ def nmap_msf_service_map(proto)
50955095
#
50965096
# This method normalizes an incoming service name to one of the
50975097
# the standard ones recognized by metasploit
5098-
#
5098+
#
50995099
def service_name_map(proto)
51005100
return proto unless proto.kind_of? String
51015101
case proto.downcase

0 commit comments

Comments
 (0)