mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
Update database.py
This commit is contained in:
+4
-4
@@ -147,7 +147,7 @@ class Database(object):
|
|||||||
"""
|
"""
|
||||||
Clear the table
|
Clear the table
|
||||||
|
|
||||||
:param str table_name: 表名
|
:param str table_name: table name
|
||||||
"""
|
"""
|
||||||
table_name = table_name.replace('.', '_')
|
table_name = table_name.replace('.', '_')
|
||||||
logger.log('TRACE', f'Clearing data in table {table_name}')
|
logger.log('TRACE', f'Clearing data in table {table_name}')
|
||||||
@@ -230,9 +230,9 @@ class Database(object):
|
|||||||
"""
|
"""
|
||||||
table_name = table_name.replace('.', '_')
|
table_name = table_name.replace('.', '_')
|
||||||
query = f'select id, type, new, alive, request, resolve, url, ' \
|
query = f'select id, type, new, alive, request, resolve, url, ' \
|
||||||
f'subdomain, level, cname, content, public, port, status, ' \
|
f'subdomain, level, cname, content, public, port, status, ' \
|
||||||
f'reason, title, banner, times, ttl, resolver, module, ' \
|
f'reason, title, banner, times, ttl, resolver, module, ' \
|
||||||
f'source, elapse, find, brute, valid from "{table_name}"'
|
f'source, elapse, find, brute, valid from "{table_name}"'
|
||||||
if alive and limit:
|
if alive and limit:
|
||||||
if limit in ['resolve', 'request']:
|
if limit in ['resolve', 'request']:
|
||||||
where = f' where {limit} = 1'
|
where = f' where {limit} = 1'
|
||||||
|
|||||||
Reference in New Issue
Block a user