File tree Expand file tree Collapse file tree 4 files changed +17
-7
lines changed
modules/auxiliary/scanner/snmp Expand file tree Collapse file tree 4 files changed +17
-7
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,10 @@ def inspect
75
75
def to_s
76
76
if realm && realm_key == Metasploit ::Model ::Realm ::Key ::ACTIVE_DIRECTORY_DOMAIN
77
77
"#{ self . realm } \\ #{ self . public } :#{ self . private } "
78
- else
78
+ elsif self . private
79
79
"#{ self . public } :#{ self . private } #{ at_realm } "
80
+ else
81
+ self . public
80
82
end
81
83
end
82
84
Original file line number Diff line number Diff line change @@ -566,7 +566,6 @@ def print_brute(opts={})
566
566
else
567
567
level = opts [ :level ] . to_s . strip
568
568
end
569
-
570
569
host_ip = opts [ :ip ] || opts [ :rhost ] || opts [ :host ] || ( rhost rescue nil ) || datastore [ 'RHOST' ]
571
570
host_port = opts [ :port ] || opts [ :rport ] || ( rport rescue nil ) || datastore [ 'RPORT' ]
572
571
msg = opts [ :msg ] || opts [ :message ] || opts [ :legacy_msg ]
Original file line number Diff line number Diff line change @@ -12,34 +12,43 @@ module Auxiliary::Report
12
12
13
13
optionally_include_metasploit_credential_creation
14
14
15
+ def db_warning_given?
16
+ if @warning_issued
17
+ true
18
+ else
19
+ @warning_issued = true
20
+ false
21
+ end
22
+ end
23
+
15
24
def create_cracked_credential ( opts = { } )
16
25
if active_db?
17
26
super ( opts )
18
- else
27
+ elsif ! db_warning_given?
19
28
vprint_warning ( 'No active DB -- Credential data will not be saved!' )
20
29
end
21
30
end
22
31
23
32
def create_credential ( opts = { } )
24
33
if active_db?
25
34
super ( opts )
26
- else
35
+ elsif ! db_warning_given?
27
36
vprint_warning ( 'No active DB -- Credential data will not be saved!' )
28
37
end
29
38
end
30
39
31
40
def create_credential_login ( opts = { } )
32
41
if active_db?
33
42
super ( opts )
34
- else
43
+ elsif ! db_warning_given?
35
44
vprint_warning ( 'No active DB -- Credential data will not be saved!' )
36
45
end
37
46
end
38
47
39
48
def invalidate_login ( opts = { } )
40
49
if active_db?
41
50
super ( opts )
42
- else
51
+ elsif ! db_warning_given?
43
52
vprint_warning ( 'No active DB -- Credential data will not be saved!' )
44
53
end
45
54
end
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ def run_batch(batch)
85
85
print_good "#{ ip } :#{ rport } - LOGIN SUCCESSFUL: #{ result . credential } (Access level: #{ result . access_level } )"
86
86
else
87
87
invalidate_login ( credential_data )
88
- vprint_error "#{ ip } :#{ rport } - LOGIN FAILED: #{ result . credential } (#{ result . status } : #{ result . proof } )"
88
+ print_error "#{ ip } :#{ rport } - LOGIN FAILED: #{ result . credential } (#{ result . status } )"
89
89
end
90
90
end
91
91
end
You can’t perform that action at this time.
0 commit comments