forked from Tuhinshubhra/CMSeeK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvanilla.py
More file actions
24 lines (21 loc) · 726 Bytes
/
vanilla.py
File metadata and controls
24 lines (21 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# This is a part of CMSeeK, check the LICENSE file for more information
# Copyright (c) 2018 - 2020 Tuhinshubhra
# Vanilla version detection
# Rev 1
import cmseekdb.basic as cmseek
import re
def start(url, ua):
kurama = cmseek.getsource(url, ua)
header = kurama[2].split('\n')
regex = []
for tail in header:
if 'X-Garden-Version: Vanilla' in tail:
regex = re.findall(r'X-Garden-Version: Vanilla (\d.*)', tail)
if regex != []:
cmseek.success('Vanilla version ' + cmseek.bold + cmseek.fgreen + regex[0] + cmseek.cln + ' detected')
return regex[0]
else:
cmseek.error('Version detection failed!')
return '0'