增加open容错处理

This commit is contained in:
Jing Ling
2020-01-10 15:26:41 +08:00
parent d99cf64ae8
commit 2ff7d45348
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ class BruteSRV(Module):
def gen_names(self):
path = data_storage_path.joinpath('srv_prefixes.json')
with open(path) as file:
with open(path, encoding='utf-8', errors='ignore') as file:
prefixes = json.load(file)
names = map(lambda prefix: prefix + self.domain, prefixes)