mirror of
https://github.com/shmilylty/OneForAll.git
synced 2026-08-25 20:37:48 +08:00
添加结果排序
This commit is contained in:
+3
-1
@@ -1,6 +1,7 @@
|
||||
import json
|
||||
from threading import Thread
|
||||
from queue import Queue
|
||||
from operator import attrgetter
|
||||
|
||||
import tqdm
|
||||
import requests
|
||||
@@ -243,7 +244,8 @@ def run_request(domain, data, port):
|
||||
new_data = gen_new_data(req_data, resp_list)
|
||||
count = utils.count_alive(new_data)
|
||||
logger.log('INFOR', f'Found that {domain} has {count} alive subdomains')
|
||||
return new_data
|
||||
sorted_data = utils.sort_by_subdomain(new_data)
|
||||
return sorted_data
|
||||
|
||||
|
||||
def save_db(name, data):
|
||||
|
||||
@@ -723,3 +723,7 @@ def decode_resp_text(resp):
|
||||
# 最后尝试自动解码
|
||||
content = str(content, errors='replace')
|
||||
return content
|
||||
|
||||
|
||||
def sort_by_subdomain(data):
|
||||
return sorted(data, key=lambda item: item.get('subdomain'))
|
||||
|
||||
Reference in New Issue
Block a user