()
| 2549 | raise SqlmapMissingDependence(errMsg) |
| 2550 | |
| 2551 | def _checkTor(): |
| 2552 | if not conf.checkTor: |
| 2553 | return |
| 2554 | |
| 2555 | infoMsg = "checking Tor connection" |
| 2556 | logger.info(infoMsg) |
| 2557 | |
| 2558 | try: |
| 2559 | page, _, _ = Request.getPage(url="https://check.torproject.org/api/ip", raise404=False) |
| 2560 | tor_status = json.loads(page) |
| 2561 | except (SqlmapConnectionException, TypeError, ValueError): |
| 2562 | tor_status = None |
| 2563 | |
| 2564 | if not tor_status or not tor_status.get("IsTor"): |
| 2565 | errMsg = "it appears that Tor is not properly set. Please try using options '--tor-type' and/or '--tor-port'" |
| 2566 | raise SqlmapConnectionException(errMsg) |
| 2567 | else: |
| 2568 | infoMsg = "Tor is properly being used" |
| 2569 | logger.info(infoMsg) |
| 2570 | |
| 2571 | def _basicOptionValidation(): |
| 2572 | if conf.limitStart is not None and not (isinstance(conf.limitStart, int) and conf.limitStart > 0): |
no test coverage detected
searching dependent graphs…