297 Private slot to process the IP address report data. |
297 Private slot to process the IP address report data. |
298 |
298 |
299 @param reply reference to the network reply |
299 @param reply reference to the network reply |
300 @type QNetworkReply |
300 @type QNetworkReply |
301 """ |
301 """ |
|
302 from .VirusTotalIpReportDialog import VirusTotalIpReportDialog |
|
303 |
302 if reply.error() == QNetworkReply.NetworkError.NoError: |
304 if reply.error() == QNetworkReply.NetworkError.NoError: |
303 result = json.loads(str(reply.readAll(), "utf-8")) |
305 result = json.loads(str(reply.readAll(), "utf-8")) |
304 if result["response_code"] == 0: |
306 if result["response_code"] == 0: |
305 EricMessageBox.information( |
307 EricMessageBox.information( |
306 None, |
308 None, |
322 try: |
324 try: |
323 urls = result["detected_urls"] |
325 urls = result["detected_urls"] |
324 except KeyError: |
326 except KeyError: |
325 urls = [] |
327 urls = [] |
326 |
328 |
327 from .VirusTotalIpReportDialog import VirusTotalIpReportDialog |
|
328 |
|
329 self.__ipReportDlg = VirusTotalIpReportDialog( |
329 self.__ipReportDlg = VirusTotalIpReportDialog( |
330 self.__lastIP, owner, resolutions, urls |
330 self.__lastIP, owner, resolutions, urls |
331 ) |
331 ) |
332 self.__ipReportDlg.show() |
332 self.__ipReportDlg.show() |
333 self.__replies.remove(reply) |
333 self.__replies.remove(reply) |
362 Private slot to process the IP address report data. |
362 Private slot to process the IP address report data. |
363 |
363 |
364 @param reply reference to the network reply |
364 @param reply reference to the network reply |
365 @type QNetworkReply |
365 @type QNetworkReply |
366 """ |
366 """ |
|
367 from .VirusTotalDomainReportDialog import VirusTotalDomainReportDialog |
|
368 |
367 if reply.error() == QNetworkReply.NetworkError.NoError: |
369 if reply.error() == QNetworkReply.NetworkError.NoError: |
368 result = json.loads(str(reply.readAll(), "utf-8")) |
370 result = json.loads(str(reply.readAll(), "utf-8")) |
369 if result["response_code"] == 0: |
371 if result["response_code"] == 0: |
370 EricMessageBox.information( |
372 EricMessageBox.information( |
371 None, |
373 None, |
420 with contextlib.suppress(KeyError): |
422 with contextlib.suppress(KeyError): |
421 webutationData["safety"] = webutation["Safety score"] |
423 webutationData["safety"] = webutation["Safety score"] |
422 with contextlib.suppress(KeyError): |
424 with contextlib.suppress(KeyError): |
423 webutationData["verdict"] = webutation["Verdict"] |
425 webutationData["verdict"] = webutation["Verdict"] |
424 |
426 |
425 from .VirusTotalDomainReportDialog import VirusTotalDomainReportDialog |
|
426 |
|
427 self.__domainReportDlg = VirusTotalDomainReportDialog( |
427 self.__domainReportDlg = VirusTotalDomainReportDialog( |
428 self.__lastDomain, |
428 self.__lastDomain, |
429 resolutions, |
429 resolutions, |
430 urls, |
430 urls, |
431 subdomains, |
431 subdomains, |