(self)
| 22 | return ip_list |
| 23 | |
| 24 | def getAttributable(self): |
| 25 | ips = self.ipCollection() |
| 26 | try: |
| 27 | for ip in ips: |
| 28 | addr = [] |
| 29 | data = str(self.searcher.binarySearch(ip)["region"].decode('utf-8')).split("|") |
| 30 | isp = data[4].replace("0", "") |
| 31 | data.pop(4) |
| 32 | data.pop(1) |
| 33 | for ad in data: |
| 34 | if ad != "0" and ad not in addr and "" != ad: |
| 35 | addr.append(ad) |
| 36 | address = ','.join(addr) |
| 37 | for value in Webinfo.result: |
| 38 | if value['ip'] == ip: |
| 39 | Webinfo.result[Webinfo.result.index(value)]["address"] = address |
| 40 | Webinfo.result[Webinfo.result.index(value)]["isp"] = isp |
| 41 | except Exception as e: |
| 42 | pass |
| 43 |
no test coverage detected