|
@@ -25,11 +25,9 @@ if data_db_load == 'Y':
|
|
|
conn = load_db.__enter__()
|
|
conn = load_db.__enter__()
|
|
|
curs = conn.cursor()
|
|
curs = conn.cursor()
|
|
|
else:
|
|
else:
|
|
|
- print('----')
|
|
|
|
|
print('You can use [9, 11, 19]')
|
|
print('You can use [9, 11, 19]')
|
|
|
|
|
|
|
|
# Main
|
|
# Main
|
|
|
-print('----')
|
|
|
|
|
print('1. Backlink reset')
|
|
print('1. Backlink reset')
|
|
|
print('2. reCAPTCHA delete')
|
|
print('2. reCAPTCHA delete')
|
|
|
print('3. Ban delete')
|
|
print('3. Ban delete')
|
|
@@ -54,17 +52,13 @@ print('22. Delete body top')
|
|
|
print('23. Delete body bottom')
|
|
print('23. Delete body bottom')
|
|
|
print('24. SQLite to MySQL')
|
|
print('24. SQLite to MySQL')
|
|
|
|
|
|
|
|
-print('----')
|
|
|
|
|
what_i_do = input('Select : ')
|
|
what_i_do = input('Select : ')
|
|
|
-
|
|
|
|
|
if what_i_do == '1':
|
|
if what_i_do == '1':
|
|
|
- print('----')
|
|
|
|
|
go_num = input('All delete (Y) [Y, N] : ')
|
|
go_num = input('All delete (Y) [Y, N] : ')
|
|
|
if not go_num == 'N':
|
|
if not go_num == 'N':
|
|
|
curs.execute(db_change("delete from back"))
|
|
curs.execute(db_change("delete from back"))
|
|
|
conn.commit()
|
|
conn.commit()
|
|
|
|
|
|
|
|
- print('----')
|
|
|
|
|
try:
|
|
try:
|
|
|
go_num = int(input('Count (100) : '))
|
|
go_num = int(input('Count (100) : '))
|
|
|
except ValueError:
|
|
except ValueError:
|
|
@@ -72,7 +66,6 @@ if what_i_do == '1':
|
|
|
|
|
|
|
|
num = 0
|
|
num = 0
|
|
|
|
|
|
|
|
- print('----')
|
|
|
|
|
print('Load...')
|
|
print('Load...')
|
|
|
|
|
|
|
|
curs.execute(
|
|
curs.execute(
|
|
@@ -86,11 +79,9 @@ if what_i_do == '1':
|
|
|
)
|
|
)
|
|
|
title = curs.fetchall()
|
|
title = curs.fetchall()
|
|
|
|
|
|
|
|
- print('----')
|
|
|
|
|
print('Rest : ' + str(len(title)))
|
|
print('Rest : ' + str(len(title)))
|
|
|
print('Start : ' + title[0][0])
|
|
print('Start : ' + title[0][0])
|
|
|
time.sleep(1)
|
|
time.sleep(1)
|
|
|
- print('----')
|
|
|
|
|
|
|
|
|
|
for name in title:
|
|
for name in title:
|
|
|
num += 1
|
|
num += 1
|
|
@@ -108,7 +99,6 @@ elif what_i_do == '2':
|
|
|
curs.execute(db_change("delete from other where name = 'recaptcha'"))
|
|
curs.execute(db_change("delete from other where name = 'recaptcha'"))
|
|
|
curs.execute(db_change("delete from other where name = 'sec_re'"))
|
|
curs.execute(db_change("delete from other where name = 'sec_re'"))
|
|
|
elif what_i_do == '3':
|
|
elif what_i_do == '3':
|
|
|
- print('----')
|
|
|
|
|
user_data = input('IP or Name : ')
|
|
user_data = input('IP or Name : ')
|
|
|
|
|
|
|
|
curs.execute(
|
|
curs.execute(
|
|
@@ -128,34 +118,27 @@ elif what_i_do == '3':
|
|
|
|
|
|
|
|
curs.execute(db_change("update rb set ongoing = '' where block = ?"), [user_data])
|
|
curs.execute(db_change("update rb set ongoing = '' where block = ?"), [user_data])
|
|
|
elif what_i_do == '4':
|
|
elif what_i_do == '4':
|
|
|
- print('----')
|
|
|
|
|
host = input('Host : ')
|
|
host = input('Host : ')
|
|
|
|
|
|
|
|
curs.execute(db_change("update other set data = ? where name = 'host'"), [host])
|
|
curs.execute(db_change("update other set data = ? where name = 'host'"), [host])
|
|
|
elif what_i_do == '5':
|
|
elif what_i_do == '5':
|
|
|
- print('----')
|
|
|
|
|
port = int(input('Port : '))
|
|
port = int(input('Port : '))
|
|
|
|
|
|
|
|
curs.execute(db_change("update other set data = ? where name = 'port'"), [port])
|
|
curs.execute(db_change("update other set data = ? where name = 'port'"), [port])
|
|
|
elif what_i_do == '6':
|
|
elif what_i_do == '6':
|
|
|
- print('----')
|
|
|
|
|
skin = input('Skin name : ')
|
|
skin = input('Skin name : ')
|
|
|
|
|
|
|
|
curs.execute(db_change("update other set data = ? where name = 'skin'"), [skin])
|
|
curs.execute(db_change("update other set data = ? where name = 'skin'"), [skin])
|
|
|
elif what_i_do == '7':
|
|
elif what_i_do == '7':
|
|
|
- print('----')
|
|
|
|
|
user_name = input('User name : ')
|
|
user_name = input('User name : ')
|
|
|
-
|
|
|
|
|
- print('----')
|
|
|
|
|
user_pw = input('User password : ')
|
|
user_pw = input('User password : ')
|
|
|
- hashed = pw_encode(user_pw)
|
|
|
|
|
|
|
|
|
|
|
|
+ hashed = pw_encode(user_pw)
|
|
|
curs.execute(db_change("update user_set set data = ? where id = ? and name = 'pw'"), [
|
|
curs.execute(db_change("update user_set set data = ? where id = ? and name = 'pw'"), [
|
|
|
hashed,
|
|
hashed,
|
|
|
user_name
|
|
user_name
|
|
|
])
|
|
])
|
|
|
elif what_i_do == '8':
|
|
elif what_i_do == '8':
|
|
|
- print('----')
|
|
|
|
|
new_ver = input('Insert version (0000000) : ')
|
|
new_ver = input('Insert version (0000000) : ')
|
|
|
|
|
|
|
|
if new_ver == '':
|
|
if new_ver == '':
|
|
@@ -166,10 +149,7 @@ elif what_i_do == '9':
|
|
|
if os.path.exists(os.path.join('data', 'set.json')):
|
|
if os.path.exists(os.path.join('data', 'set.json')):
|
|
|
os.remove(os.path.join('data', 'set.json'))
|
|
os.remove(os.path.join('data', 'set.json'))
|
|
|
elif what_i_do == '10':
|
|
elif what_i_do == '10':
|
|
|
- print('----')
|
|
|
|
|
user_name = input('User name : ')
|
|
user_name = input('User name : ')
|
|
|
-
|
|
|
|
|
- print('----')
|
|
|
|
|
new_name = input('New name : ')
|
|
new_name = input('New name : ')
|
|
|
|
|
|
|
|
curs.execute(
|
|
curs.execute(
|
|
@@ -192,29 +172,24 @@ elif what_i_do == '12':
|
|
|
elif what_i_do == '14':
|
|
elif what_i_do == '14':
|
|
|
curs.execute(db_change('delete from other where name = "head"'))
|
|
curs.execute(db_change('delete from other where name = "head"'))
|
|
|
elif what_i_do == '15':
|
|
elif what_i_do == '15':
|
|
|
- print('----')
|
|
|
|
|
user_name = input('User name : ')
|
|
user_name = input('User name : ')
|
|
|
|
|
|
|
|
curs.execute(db_change("update user_set set data = 'owner' where id = ? and name = 'acl'"), [user_name])
|
|
curs.execute(db_change("update user_set set data = 'owner' where id = ? and name = 'acl'"), [user_name])
|
|
|
elif what_i_do == '16':
|
|
elif what_i_do == '16':
|
|
|
- print('----')
|
|
|
|
|
user_name = input('User name : ')
|
|
user_name = input('User name : ')
|
|
|
|
|
|
|
|
curs.execute(db_change('select data from user_set where name = "2fa" and id = ?'), [user_name])
|
|
curs.execute(db_change('select data from user_set where name = "2fa" and id = ?'), [user_name])
|
|
|
if curs.fetchall():
|
|
if curs.fetchall():
|
|
|
curs.execute(db_change("update user_set set data = '' where name = '2fa' and id = ?"), [user_name])
|
|
curs.execute(db_change("update user_set set data = '' where name = '2fa' and id = ?"), [user_name])
|
|
|
elif what_i_do == '17':
|
|
elif what_i_do == '17':
|
|
|
- print('----')
|
|
|
|
|
markup = input('Markup name : ')
|
|
markup = input('Markup name : ')
|
|
|
|
|
|
|
|
curs.execute(db_change("update other set data = ? where name = 'markup'"), [markup])
|
|
curs.execute(db_change("update other set data = ? where name = 'markup'"), [markup])
|
|
|
elif what_i_do == '18':
|
|
elif what_i_do == '18':
|
|
|
- print('----')
|
|
|
|
|
wiki_access_password = input('Password : ')
|
|
wiki_access_password = input('Password : ')
|
|
|
|
|
|
|
|
curs.execute(db_change("update other set data = ? where name = 'wiki_access_password'"), [wiki_access_password])
|
|
curs.execute(db_change("update other set data = ? where name = 'wiki_access_password'"), [wiki_access_password])
|
|
|
elif what_i_do == '19':
|
|
elif what_i_do == '19':
|
|
|
- print('----')
|
|
|
|
|
up_data = input('Insert branch (beta) [stable, beta, dev] : ')
|
|
up_data = input('Insert branch (beta) [stable, beta, dev] : ')
|
|
|
|
|
|
|
|
if not up_data in ['stable', 'beta', 'dev']:
|
|
if not up_data in ['stable', 'beta', 'dev']:
|
|
@@ -240,13 +215,11 @@ elif what_i_do == '19':
|
|
|
else:
|
|
else:
|
|
|
print('Error : update failed')
|
|
print('Error : update failed')
|
|
|
elif what_i_do == '20':
|
|
elif what_i_do == '20':
|
|
|
- print('----')
|
|
|
|
|
domain = input('Domain (EX : 2du.pythonanywhere.com) : ')
|
|
domain = input('Domain (EX : 2du.pythonanywhere.com) : ')
|
|
|
|
|
|
|
|
curs.execute(db_change('delete from other where name = "domain"'))
|
|
curs.execute(db_change('delete from other where name = "domain"'))
|
|
|
curs.execute(db_change('insert into other (name, data, coverage) values ("domain", ?, "")'), [domain])
|
|
curs.execute(db_change('insert into other (name, data, coverage) values ("domain", ?, "")'), [domain])
|
|
|
elif what_i_do == '21':
|
|
elif what_i_do == '21':
|
|
|
- print('----')
|
|
|
|
|
tls_v = input('TLS (http) [http, https] : ')
|
|
tls_v = input('TLS (http) [http, https] : ')
|
|
|
if not tls_v in ['http', 'https']:
|
|
if not tls_v in ['http', 'https']:
|
|
|
tls_v = 'http'
|
|
tls_v = 'http'
|
|
@@ -288,5 +261,4 @@ if data_db_load == 'Y':
|
|
|
except:
|
|
except:
|
|
|
pass
|
|
pass
|
|
|
|
|
|
|
|
-print('----')
|
|
|
|
|
print('OK')
|
|
print('OK')
|