From f6ed7dfb58eb3cb74a63e6bd563f7e3d225908b2 Mon Sep 17 00:00:00 2001 From: m-1-k-3 Date: Fri, 13 Jan 2012 10:41:53 +0100 Subject: [PATCH] else included --- scripts/resource/autocrawler.rc | 4 +++- scripts/resource/portscan.rc | 39 +++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 scripts/resource/portscan.rc diff --git a/scripts/resource/autocrawler.rc b/scripts/resource/autocrawler.rc index 32c8691451..8e4f08e930 100644 --- a/scripts/resource/autocrawler.rc +++ b/scripts/resource/autocrawler.rc @@ -7,8 +7,10 @@ # some basic jobhandling to not kill our own machine is included - check the maxjobs and threadspercrawler variables -if (framework.datastore['VERBOSE'] == "true") +if (framework.datastore['VERBOSE'] == "true") #we look in the global datastore for a global VERBOSE option and use it verbose = "true" +else + verbose = "false" end threadspercrawler = "4" diff --git a/scripts/resource/portscan.rc b/scripts/resource/portscan.rc new file mode 100644 index 0000000000..d00dfd789a --- /dev/null +++ b/scripts/resource/portscan.rc @@ -0,0 +1,39 @@ +# portscan.rc +# Author: m-1-k-3 (Web: http://www.s3cur1ty.de / Twitter: @s3cur1ty_de) + +# This Metasploit RC-File could be used to portscan the network via nmap or via the internal portscanner module +# it also uses the udp_sweep module +# RHOSTS is used from the global datastore + + + +if (framework.datastore['RHOSTS'] == nil) + print_status("you have to set RHOSTS globally ... exiting") + return +end + +if (framework.datastore['THREADS'] == nil) #default to 100 Threads + run_single("setg THREADS 100") +end + +if (framework.datastore['NMAP'] == nil) #default usage of nmap as portscanner + nmap = "true" +end + +print_line("") +print_line("starting portscanners ...") +print_line("") +print_line("Module: udp_sweep") +run_single("use auxiliary/scanner/discovery/udp_sweep") +run_single("run -j") + +if ( nmap == "true") + print_line("Module: db_nmap") + run_single("db_nmap -v -n -PN -P0 -O -sSV #{framework.datastore['RHOSTS']}") +else + print_line("Module: portscan/tcp") + run_single("use auxiliary/scanner/portscan/tcp") + run_single("set PORTS 7,21,22,23,25,43,50,53,67,68,79,80,109,110,111,123,135,137,138,139,143,161,264,265,389,443,445,500,631,901,995,1241,1352,1433,1434,1521,1720,1723,3306,3389,3780,4662,5800,5801,5802,5803,5900,5901,5902,5903,6000,6666,8000,8080,8443,10000,10043,27374,27665") + run_single("run -j") +end +