1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-02 07:40:19 +02:00

Update basic_discovery.rc

This commit is contained in:
samsepi0x0 2023-02-16 03:53:21 +05:30 committed by GitHub
parent 86e8f5c484
commit 12c739b881
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,6 +80,10 @@ print_line("starting discovery scanners ... stage 1")
print_line("============================================")
print_line("")
# Temp variable to store space separated RHOSTS
nmap_rhosts = framework.datastore['RHOSTS'].gsub(',',' ')
run_single("set RHOSTS #{nmap_rhosts}")
print_line("")
print_line("starting portscanners ...")
print_line("")
@ -87,15 +91,14 @@ print_line("udp_sweep")
run_single("use auxiliary/scanner/discovery/udp_sweep")
run_single("run -j")
# Removed commas before the nmap scan.
if ( nmap == 1 )
print_line("Module: db_nmap")
if (verbose == 1)
print_line("Using Nmap with the following options: -v -n #{nmapopts} #{framework.datastore['RHOSTS'].gsub(',',' ')}")
run_single("db_nmap -v -n #{nmapopts} #{framework.datastore['RHOSTS'].gsub(',',' ')}")
print_line("Using Nmap with the following options: -v -n #{nmapopts} #{nmap_rhosts}")
run_single("db_nmap -v -n #{nmapopts} #{nmap_rhosts}")
else
print_line("Using Nmap with the following options: -n #{nmapopts} #{framework.datastore['RHOSTS'].gsub(',',' ')}")
run_single("db_nmap -n #{nmapopts} #{framework.datastore['RHOSTS'].gsub(',',' ')}")
print_line("Using Nmap with the following options: -n #{nmapopts} #{nmap_rhosts}")
run_single("db_nmap -n #{nmapopts} #{nmap_rhosts}")
end
else
print_line("Module: portscan/tcp")
@ -614,7 +617,7 @@ framework.db.workspace.hosts.each do |host|
jobwaiting(maxjobs,verbose)
print_line("Module: titanftp_xcrc_traversal")
run_single("use auxiliary/admin/ftp/titanftp_xcrc_traversal")
run_single("use auxiliary/scanner/ftp/titanftp_xcrc_traversal")
if(verbose == 1)
infos(serv,host)
end