|
0 |
From: Sophie Brun <[email protected]>
|
|
1 |
Date: Wed, 4 Nov 2020 16:45:50 +0100
|
|
2 |
Subject: Remove the update option
|
|
3 |
|
|
4 |
Last-Update: 2020-11-04
|
|
5 |
|
|
6 |
Update must always be done with apt.
|
|
7 |
---
|
|
8 |
cmseek.py | 11 +++---
|
|
9 |
cmseekdb/basic.py | 115 +++++++++++++++++++++++++++---------------------------
|
|
10 |
2 files changed, 62 insertions(+), 64 deletions(-)
|
|
11 |
|
|
12 |
diff --git a/cmseek.py b/cmseek.py
|
|
13 |
index d7cc1a0..28b9506 100644
|
|
14 |
--- a/cmseek.py
|
|
15 |
+++ b/cmseek.py
|
|
16 |
@@ -24,7 +24,7 @@ parser = argparse.ArgumentParser(prog='cmseek.py',add_help=False)
|
|
17 |
parser.add_argument('-h', '--help', action="store_true")
|
|
18 |
parser.add_argument('-v', '--verbose', action="store_true")
|
|
19 |
parser.add_argument("--version", action="store_true")
|
|
20 |
-parser.add_argument("--update", action="store_true")
|
|
21 |
+#parser.add_argument("--update", action="store_true")
|
|
22 |
parser.add_argument('-r', "--random-agent", action="store_true")
|
|
23 |
parser.add_argument('--user-agent')
|
|
24 |
parser.add_argument('--googlebot', action="store_true")
|
|
25 |
@@ -67,8 +67,8 @@ if args.follow_redirect:
|
|
26 |
if args.no_redirect:
|
|
27 |
cmseek.redirect_conf = '2'
|
|
28 |
|
|
29 |
-if args.update:
|
|
30 |
- cmseek.update()
|
|
31 |
+#if args.update:
|
|
32 |
+# cmseek.update()
|
|
33 |
|
|
34 |
if args.batch:
|
|
35 |
#print('Batch true')
|
|
36 |
@@ -158,15 +158,14 @@ print ("======= ==============================")
|
|
37 |
print (" [1] CMS detection and Deep scan")
|
|
38 |
print (" [2] Scan Multiple Sites")
|
|
39 |
print (" [3] Bruteforce CMSs")
|
|
40 |
-print (" [U] Update CMSeeK")
|
|
41 |
print (" [R] Rebuild Cache (Use only when you add any custom module)")
|
|
42 |
print (" [0] Exit CMSeeK :( \n")
|
|
43 |
|
|
44 |
selone = input("Enter Your Desired Option: ").lower()
|
|
45 |
if selone == 'r':
|
|
46 |
cmseek.update_brute_cache()
|
|
47 |
-elif selone == 'u':
|
|
48 |
- cmseek.update()
|
|
49 |
+#elif selone == 'u':
|
|
50 |
+# cmseek.update()
|
|
51 |
elif selone == '0':
|
|
52 |
cmseek.bye()
|
|
53 |
|
|
54 |
diff --git a/cmseekdb/basic.py b/cmseekdb/basic.py
|
|
55 |
index 5127add..15deb1f 100644
|
|
56 |
--- a/cmseekdb/basic.py
|
|
57 |
+++ b/cmseekdb/basic.py
|
|
58 |
@@ -138,8 +138,7 @@ USER AGENT:
|
|
59 |
OUTPUT:
|
|
60 |
-v, --verbose Increase output verbosity
|
|
61 |
|
|
62 |
-VERSION & UPDATING:
|
|
63 |
- --update Update CMSeeK (Requires git)
|
|
64 |
+VERSION:
|
|
65 |
--version Show CMSeeK version and exit
|
|
66 |
|
|
67 |
HELP & MISCELLANEOUS:
|
|
68 |
@@ -382,65 +381,65 @@ def update_brute_cache():
|
|
69 |
warning('Could not find any modules! either there are no modules or someone messed with em!')
|
|
70 |
bye()
|
|
71 |
|
|
72 |
-def update():
|
|
73 |
+#def update():
|
|
74 |
# Check For Update
|
|
75 |
- clearscreen()
|
|
76 |
- banner("Update Menu")
|
|
77 |
- global cmseek_version
|
|
78 |
- my_version = int(cmseek_version.replace('.',''))
|
|
79 |
- info("Checking for updates")
|
|
80 |
- get_version = getsource('https://raw.githubusercontent.com/Tuhinshubhra/CMSeeK/master/current_version',randomua('generate'))
|
|
81 |
- if get_version[0] != '1':
|
|
82 |
- error('Could not get latest version, Error: ' + get_version[1])
|
|
83 |
- bye()
|
|
84 |
- else:
|
|
85 |
- latest_version = get_version[1].replace('\n','')
|
|
86 |
- serv_version = int(latest_version.replace('.',''))
|
|
87 |
- info("CMSeeK Version: " + cmseek_version)
|
|
88 |
- success("Latest Version: " + latest_version)
|
|
89 |
- if my_version > serv_version:
|
|
90 |
- print('\n')
|
|
91 |
- error("Either you or me (The Developer) messed things up.\n" + cln + "[↓] Download the proper version from: " + fgreen + bold + GIT_URL)
|
|
92 |
- elif my_version == serv_version:
|
|
93 |
- print('\n')
|
|
94 |
- result("CMSeeK is up to date, Thanks for checking update tho.. It's a good practise",'')
|
|
95 |
- else:
|
|
96 |
- print('\n')
|
|
97 |
- #success("Update available!")
|
|
98 |
- success("Update available!")
|
|
99 |
- update_me = input("[#] Do you want to update now? (y/n): ")
|
|
100 |
- if update_me.lower() == 'y':
|
|
101 |
- print(bold + fgreen + "[↓]" + cln + " Downloading Update...")
|
|
102 |
- succes = False
|
|
103 |
- try:
|
|
104 |
- global cmseek_dir
|
|
105 |
- lock_file = os.path.join(cmseek_dir, "/.git/index.lock")
|
|
106 |
- if os.path.isfile(lock_file):
|
|
107 |
- statement("Removing index.lock file from .git directory")
|
|
108 |
- # Solve the index.lock issue
|
|
109 |
- os.remove(lock_file)
|
|
110 |
- subprocess.run(("git checkout . && git pull %s HEAD") % GIT_URL, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
111 |
- #os.system("git checkout . && git pull %s HEAD" % GIT_URL)
|
|
112 |
- vt = open('current_version', 'r')
|
|
113 |
- v_test = int(vt.read().replace('\n','').replace('.',''))
|
|
114 |
+# clearscreen()
|
|
115 |
+# banner("Update Menu")
|
|
116 |
+# global cmseek_version
|
|
117 |
+# my_version = int(cmseek_version.replace('.',''))
|
|
118 |
+# info("Checking for updates")
|
|
119 |
+# get_version = getsource('https://raw.githubusercontent.com/Tuhinshubhra/CMSeeK/master/current_version',randomua('generate'))
|
|
120 |
+# if get_version[0] != '1':
|
|
121 |
+# error('Could not get latest version, Error: ' + get_version[1])
|
|
122 |
+# bye()
|
|
123 |
+# else:
|
|
124 |
+# latest_version = get_version[1].replace('\n','')
|
|
125 |
+# serv_version = int(latest_version.replace('.',''))
|
|
126 |
+# info("CMSeeK Version: " + cmseek_version)
|
|
127 |
+# success("Latest Version: " + latest_version)
|
|
128 |
+# if my_version > serv_version:
|
|
129 |
+# print('\n')
|
|
130 |
+# error("Either you or me (The Developer) messed things up.\n" + cln + "[↓] Download the proper version from: " + fgreen + bold + GIT_URL)
|
|
131 |
+# elif my_version == serv_version:
|
|
132 |
+# print('\n')
|
|
133 |
+# result("CMSeeK is up to date, Thanks for checking update tho.. It's a good practise",'')
|
|
134 |
+# else:
|
|
135 |
+# print('\n')
|
|
136 |
+# #success("Update available!")
|
|
137 |
+# success("Update available!")
|
|
138 |
+# update_me = input("[#] Do you want to update now? (y/n): ")
|
|
139 |
+# if update_me.lower() == 'y':
|
|
140 |
+# print(bold + fgreen + "[↓]" + cln + " Downloading Update...")
|
|
141 |
+# succes = False
|
|
142 |
+# try:
|
|
143 |
+# global cmseek_dir
|
|
144 |
+# lock_file = os.path.join(cmseek_dir, "/.git/index.lock")
|
|
145 |
+# if os.path.isfile(lock_file):
|
|
146 |
+# statement("Removing index.lock file from .git directory")
|
|
147 |
+# # Solve the index.lock issue
|
|
148 |
+# os.remove(lock_file)
|
|
149 |
+# subprocess.run(("git checkout . && git pull %s HEAD") % GIT_URL, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
150 |
+# #os.system("git checkout . && git pull %s HEAD" % GIT_URL)
|
|
151 |
+# vt = open('current_version', 'r')
|
|
152 |
+# v_test = int(vt.read().replace('\n','').replace('.',''))
|
|
153 |
# print(v_test)
|
|
154 |
# print(serv_version)
|
|
155 |
- if v_test == serv_version:
|
|
156 |
- # Check if update successful
|
|
157 |
- succes = True
|
|
158 |
- except:
|
|
159 |
- print("Unexpected error:", sys.exc_info()[0])
|
|
160 |
- raise
|
|
161 |
- error("Automatic Update Failed! Pleae download manually from: " + cln + GIT_URL)
|
|
162 |
- if succes == True:
|
|
163 |
- result("CMSeeK Updated To Latest Version! Enjoy", "")
|
|
164 |
- else:
|
|
165 |
- warning(bold + orange + "Update might be not successful.. Download manually from: " + cln + GIT_URL)
|
|
166 |
- else:
|
|
167 |
- print('\n')
|
|
168 |
- warning("Automatic Update Terminated!")
|
|
169 |
- info("Update Manually from: " + fgreen + bold + GIT_URL + cln)
|
|
170 |
- bye()
|
|
171 |
+# if v_test == serv_version:
|
|
172 |
+# # Check if update successful
|
|
173 |
+# succes = True
|
|
174 |
+# except:
|
|
175 |
+# print("Unexpected error:", sys.exc_info()[0])
|
|
176 |
+# raise
|
|
177 |
+# error("Automatic Update Failed! Pleae download manually from: " + cln + GIT_URL)
|
|
178 |
+# if succes == True:
|
|
179 |
+# result("CMSeeK Updated To Latest Version! Enjoy", "")
|
|
180 |
+# else:
|
|
181 |
+# warning(bold + orange + "Update might be not successful.. Download manually from: " + cln + GIT_URL)
|
|
182 |
+# else:
|
|
183 |
+# print('\n')
|
|
184 |
+# warning("Automatic Update Terminated!")
|
|
185 |
+# info("Update Manually from: " + fgreen + bold + GIT_URL + cln)
|
|
186 |
+# bye()
|
|
187 |
|
|
188 |
|
|
189 |
def savebrute(url,adminurl,username,password):
|