diff --git a/CHANGELOG b/CHANGELOG index 8a15a915..1fe94951 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -20,6 +20,7 @@ Version 1.1.3 [] - improved logging for WordPress deep scan - Switched to wpvulns.com for wordpress vulnerabilities - Added `--light-scan` argument + - Added (`--only-cms`, `-o`) argument Version 1.1.2 [19-05-2019] - Added new CMS: diff --git a/cmseek.py b/cmseek.py index 3fced36f..d7cc1a05 100644 --- a/cmseek.py +++ b/cmseek.py @@ -38,6 +38,7 @@ parser.add_argument('--strict-cms') parser.add_argument('--skip-scanned', action="store_true") parser.add_argument('--light-scan', action="store_true") +parser.add_argument('-o', '--only-cms', action="store_true") args = parser.parse_args() if args.clear_result: @@ -50,6 +51,10 @@ # Suggestion #99 cmseek.light_scan = True +if args.only_cms: + # Suggestion #99 + cmseek.only_cms = True + if args.verbose: cmseek.verbose = True diff --git a/cmseekdb/basic.py b/cmseekdb/basic.py index ed3a20da..e88f1e53 100644 --- a/cmseekdb/basic.py +++ b/cmseekdb/basic.py @@ -29,7 +29,8 @@ 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. +light_scan = False # When enabled, we don't perform deep-scan only detect CMS and version. +only_cms = False # When enabled, we just detect the CMS no version or deepscan is performed. # all the color codes goes here white = "\033[97m" @@ -120,9 +121,11 @@ def help(): CMS IDs. separated by comma "," --skip-scanned Skips target if it's CMS was previously detected. - + --light-scan Skips Deep Scan. Does CMS and version detection only. + -o, --only-cms Only detect CMS, ignore deep scan and version detection. + 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 fa9c7190..6390b479 100644 --- a/cmseekdb/core.py +++ b/cmseekdb/core.py @@ -130,11 +130,13 @@ 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' and not cmseek.light_scan: + + if cms_info['deeps'] == '1' and not cmseek.light_scan and not cmseek.only_cms: # 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 - elif cms_info['vd'] == '1': + + elif cms_info['vd'] == '1' and not cmseek.only_cms: cmseek.success('Starting version detection') cms_version = '0' # Failsafe measure cms_version = version_detect.start(cms, site, cua, ga, scode, ga_content, headers)