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

Method run

lib/identify.py:23–43  ·  view source on GitHub ↗
(self, datas)

Source from the content-addressed store, hash-verified

21 self._prepare_app()
22
23 def run(self, datas):
24 self.datas = datas
25 cms = self._has_app()
26 self.datas["cms"] = ','.join(set(cms))
27 _url = "://{0}".format(urlsplit(self.datas['url']).netloc) # 添加://降低误报率
28 _webinfo = str(Webinfo.result)
29 if _url in _webinfo and self.datas["title"] in _webinfo:
30 pass
31 else:
32 results = {"url": self.datas["url"], "cms": self.datas["cms"], "title": self.datas["title"],
33 "status": self.datas["status"], "Server": self.datas['Server'],
34 "size": self.datas["size"], "iscdn": self.datas["iscdn"], "ip": self.datas["ip"],
35 "address": self.datas["address"], "isp": self.datas["isp"]}
36 if cms:
37 Webinfo.result.insert(0, results)
38 else:
39 Webinfo.result.append(results)
40 Msg = "{0} {1} {2} {4} {3}".format(color.green(self.datas['cms']),
41 color.blue(self.datas['Server']), self.datas['title'],
42 color.yellow(self.datas['status']), self.datas["url"])
43 logging.success(Msg)
44
45 def _prepare_app(self):
46 for line in self.obj:

Callers 1

responseMethod · 0.45

Calls 5

_has_appMethod · 0.95
greenMethod · 0.80
blueMethod · 0.80
yellowMethod · 0.80
successMethod · 0.80

Tested by

no test coverage detected