From f48db763730fbcca4bbbd943f54ed0a56ea656da Mon Sep 17 00:00:00 2001 From: r3dhax0r <28696468+Tuhinshubhra@users.noreply.github.com> Date: Thu, 14 May 2020 07:58:32 +0530 Subject: [PATCH] :sparkles: Added --light-scan argument ( issue #99 ) --- CHANGELOG | 1 + cmseek.py | 5 +++++ cmseekdb/basic.py | 3 +++ cmseekdb/core.py | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d847e6cb..8a15a915 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,7 @@ Version 1.1.3 [] - improved logging for joomla scans - improved logging for WordPress deep scan - Switched to wpvulns.com for wordpress vulnerabilities + - Added `--light-scan` argument Version 1.1.2 [19-05-2019] - Added new CMS: diff --git a/cmseek.py b/cmseek.py index 149da011..3fced36f 100644 --- a/cmseek.py +++ b/cmseek.py @@ -37,6 +37,7 @@ parser.add_argument('-i', '--ignore-cms') parser.add_argument('--strict-cms') parser.add_argument('--skip-scanned', action="store_true") +parser.add_argument('--light-scan', action="store_true") args = parser.parse_args() if args.clear_result: @@ -45,6 +46,10 @@ if args.help: cmseek.help() +if args.light_scan: + # Suggestion #99 + cmseek.light_scan = True + if args.verbose: cmseek.verbose = True diff --git a/cmseekdb/basic.py b/cmseekdb/basic.py index abe791fd..ed3a20da 100644 --- a/cmseekdb/basic.py +++ b/cmseekdb/basic.py @@ -29,6 +29,7 @@ strict_cms = [] # add cms ids that you want to detect.. no other cmses will be detected when any id is provided. report_index = {} # Contains previous scan results skip_scanned = False # When set to true CMSeeK witll ignore target whose CMS had been previously detected! +light_scan = False # When enabled, we don't perform deep-scan. # all the color codes goes here white = "\033[97m" @@ -120,6 +121,8 @@ def help(): --skip-scanned Skips target if it's CMS was previously detected. + --light-scan Skips Deep Scan. Does CMS and version detection only. + RE-DIRECT: --follow-redirect Follows all/any redirect(s) --no-redirect Skips all redirects and tests the input target(s) diff --git a/cmseekdb/core.py b/cmseekdb/core.py index 38655c4d..fa9c7190 100644 --- a/cmseekdb/core.py +++ b/cmseekdb/core.py @@ -130,7 +130,7 @@ def main_proc(site,cua): cmseek.update_log('cms_id', cms) # update log cmseek.statement('Getting CMS info from database') # freaking typo cms_info = getattr(cmsdb, cms) - if cms_info['deeps'] == '1': + if cms_info['deeps'] == '1' and not cmseek.light_scan: # cmseek.success('Starting ' + cmseek.bold + cms_info['name'] + ' deep scan' + cmseek.cln) advanced.start(cms, site, cua, ga, scode, ga_content, detection_method, headers) return