Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Version 1.1.0 []
- Vanilla
- uKnowva
- XenForo
- XMB
- Version detection added for:
- Burning Board
- Discourse
Expand All @@ -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]
Expand Down
4 changes: 4 additions & 0 deletions VersionDetect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 28 additions & 0 deletions VersionDetect/xmb.py
Original file line number Diff line number Diff line change
@@ -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'<!-- Powered by XMB (\d.*?) ', source)
if regex != []:
if regex[0] != '' and regex[0] != ' ':
version = regex[0]
cmseek.success('XMB version ' + cmseek.bold + cmseek.fgreen + version + cmseek.cln + ' detected')
return version
else:
regex = re.findall(r'Powered by XMB (\d.*?) ', source)
if regex != []:
if regex[0] != '' and regex[0] != ' ':
version = regex[0]
cmseek.success('XMB version ' + cmseek.bold + cmseek.fgreen + version + cmseek.cln + ' detected')
return version

cmseek.error('Version detection failed!')
return '0'
4 changes: 2 additions & 2 deletions cmseekdb/basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '/'
Expand Down
6 changes: 6 additions & 0 deletions cmseekdb/cmss.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,4 +734,10 @@
'url':'https://xenforo.com/',
'vd':'0',
'deeps':'0'
}
xmb = {
'name':'XMB',
'url':'https://www.xmbforum.com/',
'vd':'1',
'deeps':'0'
}
4 changes: 4 additions & 0 deletions cmseekdb/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ def check(h):
# REGEX DETECTIONS STARTS FROM HERE #
####################################################

xmb_regex = re.search(r'Set-Cookie: xmblv(a|b)=(\d.*?)\n',hstring)
if xmb_regex != None:
return ['1', 'xmb']

wind_regex = re.search(r'Set-Cookie: [a-zA-Z0-9]{5}_(lastpos|lastvisit)=', hstring)
if wind_regex != None:
return ['1', 'pwind']
Expand Down
4 changes: 4 additions & 0 deletions cmseekdb/sc.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ def check(s, site): ## Check if no generator meta tag available
# XenForo
return ['1', 'xf']

elif '<!-- Powered by XMB' in hstring or '<!-- The XMB Group -->' in hstring or 'Powered by XMB' in hstring:
# XMB
return ['1', 'xmb']


####################################################
# REGEX DETECTIONS STARTS FROM HERE #
Expand Down