重构:OneForAll入口逻辑更加清晰

This commit is contained in:
Jing Ling
2020-02-23 04:23:25 +08:00
parent 36bfa0b7a0
commit 094fedc22a
13 changed files with 287 additions and 159 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import threading
from common import utils
from common import resolve
from common.module import Module
from config import data_storage_path, logger
from config import data_storage_dir, logger
class BruteSRV(Module):
@@ -25,7 +25,7 @@ class BruteSRV(Module):
self.answers_que = queue.Queue()
def gen_names(self):
path = data_storage_path.joinpath('srv_prefixes.json')
path = data_storage_dir.joinpath('srv_prefixes.json')
with open(path, encoding='utf-8', errors='ignore') as file:
prefixes = json.load(file)
names = map(lambda prefix: prefix + self.domain, prefixes)