MCPcopy Create free account
hub / github.com/EASY233/Finger / __init__

Method __init__

api/quake.py:13–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11
12class Quake:
13 def __init__(self):
14 self.headers = {
15 "User-Agent": random.choice(user_agents),
16 "X-QuakeToken": QuakeKey
17 }
18 if QuakeKey == "":
19 logging.warning("请先在config/config.py文件中配置quake的api")
20 exit(0)
21
22 try:
23 logging.info("[QUAKE Example]domain:example.com\n")
24 while 1:
25 self.keywords = input("请输入查询关键词:").strip()
26 self.size = input("请输入查询数量:").strip()
27 if self.keywords == "" or self.size == "":
28 logging.error("\n关键字或查询数量不能为空!")
29 elif self.size.isdigit() != True:
30 logging.error("\n查询数量非整数!")
31 else:
32 break
33 self.run()
34 except KeyboardInterrupt:
35 logging.error("\n用户取消输入!直接退出。")
36 exit(0)
37
38
39 def run(self):

Callers

nothing calls this directly

Calls 4

runMethod · 0.95
warningMethod · 0.80
infoMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected