Skip to content

Commit

Permalink
✨ Added --only-cms argument ( issue #99 )
Browse files Browse the repository at this point in the history
  • Loading branch information
Tuhinshubhra committed May 14, 2020
1 parent f48db76 commit d1a96d3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions cmseek.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

Expand Down
7 changes: 5 additions & 2 deletions cmseekdb/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions cmseekdb/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d1a96d3

Please sign in to comment.