|
|
@@ -634,6 +634,21 @@ def update(ver_num, set_data):
|
|
|
curs.execute(db_change("drop index history_index"))
|
|
|
curs.execute(db_change("create index history_index on history (title, ip)"))
|
|
|
|
|
|
+ if ver_num < 3500359:
|
|
|
+ # 마지막 편집 따로 기록하도록
|
|
|
+ # create_data['data_set'] = ['doc_name', 'doc_rev', 'set_name', 'set_data']
|
|
|
+ print("Update 3500359...")
|
|
|
+
|
|
|
+ curs.execute(db_change("select title from data"))
|
|
|
+ db_data = curs.fetchall()
|
|
|
+ for for_a in db_data:
|
|
|
+ curs.execute(db_change("select date from history where title = ? order by date desc limit 1"), [for_a[0]])
|
|
|
+ db_data_2 = curs.fetchall()
|
|
|
+ if db_data_2:
|
|
|
+ curs.execute(db_change("insert into data_set (doc_name, doc_rev, set_name, set_data) values (?, '', 'last_edit', ?)"), [for_a[0], db_data_2[0][0]])
|
|
|
+
|
|
|
+ print("Update 3500359 complete")
|
|
|
+
|
|
|
conn.commit()
|
|
|
|
|
|
# 아이피 상태인 이메일 제거 예정
|
|
|
@@ -2003,7 +2018,10 @@ def ip_pas(raw_ip, type_data = 0):
|
|
|
else:
|
|
|
ip = ip.exploded
|
|
|
ip = re.sub(r'\.([^.]*)\.([^.]*)$', '.*.*', ip)
|
|
|
-
|
|
|
+
|
|
|
+ # ip = hashlib.sha3_224(bytes(raw_ip, 'utf-8')).hexdigest()
|
|
|
+ # ip = ip[0:4] + '-' + ip[4:8] + '-' + ip[8:12] + '-' + ip[12:16]
|
|
|
+
|
|
|
change_ip = 1
|
|
|
except:
|
|
|
ip = raw_ip
|