File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,11 @@ def check_multiple(hosts)
122
122
# Checks to see if a target is vulnerable.
123
123
#
124
124
def cmd_check ( *args )
125
+ if args . first =~ /^\- h$/i
126
+ cmd_check_help
127
+ return
128
+ end
129
+
125
130
ip_range_arg = args . shift || mod . datastore [ 'RHOSTS' ] || framework . datastore [ 'RHOSTS' ] || ''
126
131
opt = Msf ::OptAddressRange . new ( 'RHOSTS' )
127
132
@@ -162,6 +167,32 @@ def cmd_check(*args)
162
167
end
163
168
end
164
169
170
+ def cmd_check_help
171
+ print_line ( 'Usage: check [option] [IP Range]' )
172
+ print_line
173
+ print_line ( 'Options:' )
174
+ print_line ( '-h You are looking at it.' )
175
+ print_line
176
+ print_line ( 'Examples:' )
177
+ print_line ( '' )
178
+ print_line ( 'Normally, if a RHOST is already specified, you can just run check.' )
179
+ print_line ( 'But here are different ways to use the command:' )
180
+ print_line
181
+ print_line ( 'Against a single host:' )
182
+ print_line ( 'check 192.168.1.123' )
183
+ print_line
184
+ print_line ( 'Against a range of IPs:' )
185
+ print_line ( 'check 192.168.1.1-192.168.1.254' )
186
+ print_line
187
+ print_line ( 'Against a range of IPs loaded from a file:' )
188
+ print_line ( 'check file:///tmp/ip_list.txt' )
189
+ print_line
190
+ print_line ( 'Multi-threaded checks:' )
191
+ print_line ( '1. set THREADS 10' )
192
+ print_line ( '2. check' )
193
+ print_line
194
+ end
195
+
165
196
def report_vuln ( instance )
166
197
framework . db . report_vuln (
167
198
workspace : instance . workspace ,
You can’t perform that action at this time.
0 commit comments