From 6d4beb819b91cf211bf4cf5be14105b3ed5ff960 Mon Sep 17 00:00:00 2001 From: Tuhinshubhra Date: Sun, 26 Aug 2018 07:05:19 +0530 Subject: [PATCH 1/2] Added CMS and Version detection XMB --- CHANGELOG | 2 ++ VersionDetect/detect.py | 4 ++++ VersionDetect/xmb.py | 28 ++++++++++++++++++++++++++++ cmseekdb/cmss.py | 6 ++++++ cmseekdb/header.py | 4 ++++ cmseekdb/sc.py | 4 ++++ 6 files changed, 48 insertions(+) create mode 100644 VersionDetect/xmb.py diff --git a/CHANGELOG b/CHANGELOG index b4c018bb..82794a9f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -15,6 +15,7 @@ Version 1.1.0 [] - Vanilla - uKnowva - XenForo + - XMB - Version detection added for: - Burning Board - Discourse @@ -26,6 +27,7 @@ Version 1.1.0 [] - SMF - Vanilla - uKnowva + - XMB - New detection methods added for: - phpwind Version 1.0.9 [21-08-2018] diff --git a/VersionDetect/detect.py b/VersionDetect/detect.py index f869676b..0bb0c790 100644 --- a/VersionDetect/detect.py +++ b/VersionDetect/detect.py @@ -177,3 +177,7 @@ def start(id, url, ua, ga, source, ga_content): import VersionDetect.uknva as uknvaverdetect uknvaver = uknvaverdetect.start(ga_content) return uknvaver + elif id == 'xmb': + import VersionDetect.xmb as xmbverdetect + xmbver = xmbverdetect.start(source) + return xmbver diff --git a/VersionDetect/xmb.py b/VersionDetect/xmb.py new file mode 100644 index 00000000..576144a7 --- /dev/null +++ b/VersionDetect/xmb.py @@ -0,0 +1,28 @@ +#!/usr/bin/python3 +# -*- coding: utf-8 -*- +# This is a part of CMSeeK, check the LICENSE file for more information +# Copyright (c) 2018 Tuhinshubhra + +# XMB version detection +# Rev 1 + +import cmseekdb.basic as cmseek +import re + +def start(source): + regex = re.findall(r'' in hstring or 'Powered by XMB' in hstring: + # XMB + return ['1', 'xmb'] + #################################################### # REGEX DETECTIONS STARTS FROM HERE # From c75c5b92f9c0a025094a60eb5069481b7766ce89 Mon Sep 17 00:00:00 2001 From: Tuhinshubhra Date: Sun, 26 Aug 2018 07:21:12 +0530 Subject: [PATCH 2/2] :hammer: liltweak --- cmseekdb/basic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmseekdb/basic.py b/cmseekdb/basic.py index 0944998f..6b697adc 100644 --- a/cmseekdb/basic.py +++ b/cmseekdb/basic.py @@ -158,14 +158,14 @@ def process_url(target): return '0' elif "://" in target and "http" in target: if not target.endswith('/'): - if '.php' in target or '.html' in target or '.asp' in target or '.aspx' in target or '.htm' in target: + if '.php' in target or '.html' in target or '.asp' in target or '.aspx' in target or '.htm' in target or '.py' in target or '.pl' in target: target = target else: target = target + '/' else: target = 'http://' + target if not target.endswith('/'): - if '.php' in target or '.html' in target or '.asp' in target or '.aspx' in target or '.htm' in target: + if '.php' in target or '.html' in target or '.asp' in target or '.aspx' in target or '.htm' in target or '.py' in target or '.pl' in target: target = target else: target = target + '/'