添加专业工具中合并数据库功能
This commit is contained in:
parent
895a393a8b
commit
01c57d489a
@ -11,7 +11,7 @@ import os
|
|||||||
from flask import Flask, request, render_template, g, Blueprint, send_file
|
from flask import Flask, request, render_template, g, Blueprint, send_file
|
||||||
from pywxdump import analyzer, read_img_dat, read_audio
|
from pywxdump import analyzer, read_img_dat, read_audio
|
||||||
from pywxdump.api.rjson import ReJson, RqJson
|
from pywxdump.api.rjson import ReJson, RqJson
|
||||||
from pywxdump import read_info, VERSION_LIST, batch_decrypt, BiasAddr
|
from pywxdump import read_info, VERSION_LIST, batch_decrypt, BiasAddr, merge_db
|
||||||
|
|
||||||
# app = Flask(__name__, static_folder='../ui/web/dist', static_url_path='/')
|
# app = Flask(__name__, static_folder='../ui/web/dist', static_url_path='/')
|
||||||
|
|
||||||
@ -219,6 +219,7 @@ def decrypt():
|
|||||||
wxinfos = batch_decrypt(key, wxdb_path, out_path=out_path)
|
wxinfos = batch_decrypt(key, wxdb_path, out_path=out_path)
|
||||||
return ReJson(0, str(wxinfos))
|
return ReJson(0, str(wxinfos))
|
||||||
|
|
||||||
|
|
||||||
@api.route('/api/biasaddr', methods=["GET", 'POST'])
|
@api.route('/api/biasaddr', methods=["GET", 'POST'])
|
||||||
def biasaddr():
|
def biasaddr():
|
||||||
"""
|
"""
|
||||||
@ -232,10 +233,29 @@ def biasaddr():
|
|||||||
wxdbPath = request.json.get("wxdbPath", "")
|
wxdbPath = request.json.get("wxdbPath", "")
|
||||||
if not mobile or not name or not account:
|
if not mobile or not name or not account:
|
||||||
return ReJson(1002)
|
return ReJson(1002)
|
||||||
rdata = BiasAddr(account,mobile, name, key, wxdbPath).run()
|
rdata = BiasAddr(account, mobile, name, key, wxdbPath).run()
|
||||||
return ReJson(0, str(rdata))
|
return ReJson(0, str(rdata))
|
||||||
|
|
||||||
|
|
||||||
|
@api.route('/api/merge', methods=["GET", 'POST'])
|
||||||
|
def merge():
|
||||||
|
"""
|
||||||
|
合并
|
||||||
|
:return:
|
||||||
|
"""
|
||||||
|
wxdb_path = request.json.get("dbPath")
|
||||||
|
if not wxdb_path:
|
||||||
|
return ReJson(1002)
|
||||||
|
out_path = request.json.get("outPath")
|
||||||
|
if not out_path:
|
||||||
|
return ReJson(1002)
|
||||||
|
rdata = merge_db(wxdb_path, out_path)
|
||||||
|
return ReJson(0, str(rdata))
|
||||||
|
|
||||||
|
|
||||||
# END 这部分为专业工具的api
|
# END 这部分为专业工具的api
|
||||||
|
|
||||||
|
|
||||||
@api.route('/')
|
@api.route('/')
|
||||||
def index():
|
def index():
|
||||||
return render_template('index.html')
|
return render_template('index.html')
|
||||||
|
Loading…
Reference in New Issue
Block a user