mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-26 04:47:48 +08:00
addr字段改为ip2location 添加ip2region字段
This commit is contained in:
+7
-5
@@ -79,7 +79,8 @@ class Database(object):
|
||||
f'ttl text,'
|
||||
f'cidr text,'
|
||||
f'asn text,'
|
||||
f'addr text,'
|
||||
f'ip2region text,'
|
||||
f'ip2location text,'
|
||||
f'resolver text,'
|
||||
f'module text,'
|
||||
f'source text,'
|
||||
@@ -106,11 +107,11 @@ class Database(object):
|
||||
f'id, type, alive, resolve, request, new, url, subdomain,'
|
||||
f'port, level, cname, content, public, status, reason,'
|
||||
f'title, banner, header, response, times, ttl, cidr, asn,'
|
||||
f'addr, resolver, module, source, elapse, find, brute, valid) '
|
||||
f'ip2region, ip2location, resolver, module, source, elapse, find, brute, valid) '
|
||||
f'values (:id, :type, :alive, :resolve, :request, :new,'
|
||||
f':url, :subdomain, :port, :level, :cname, :content,'
|
||||
f':public, :status, :reason, :title, :banner, :header,'
|
||||
f':response, :times, :ttl, :cidr, :asn, :addr, :resolver,'
|
||||
f':response, :times, :ttl, :cidr, :asn, :ip2region, :ip2location, :resolver,'
|
||||
f':module, :source, :elapse, :find, :brute, :valid)', results)
|
||||
except Exception as e:
|
||||
logger.log('ERROR', e)
|
||||
@@ -234,8 +235,9 @@ class Database(object):
|
||||
table_name = table_name.replace('.', '_')
|
||||
query = f'select id, type, new, alive, request, resolve, url, ' \
|
||||
f'subdomain, level, cname, content, public, port, status, ' \
|
||||
f'reason, title, banner, times, ttl, cidr, asn, addr, resolver, ' \
|
||||
f'module, source, elapse, find, brute, valid from "{table_name}"'
|
||||
f'reason, title, banner, times, ttl, cidr, asn, ip2region, ' \
|
||||
f'ip2location, resolver, module, source, elapse, find, brute, valid ' \
|
||||
f'from "{table_name}"'
|
||||
if alive and limit:
|
||||
if limit in ['resolve', 'request']:
|
||||
where = f' where {limit} = 1'
|
||||
|
||||
Reference in New Issue
Block a user