()
| 2523 | socks.wrapmodule(_http_client) |
| 2524 | |
| 2525 | def _setHttpOptions(): |
| 2526 | if conf.chunked and conf.data: |
| 2527 | if hasattr(_http_client.HTTPConnection, "_set_content_length"): |
| 2528 | _http_client.HTTPConnection._set_content_length = lambda self, *args, **kwargs: None |
| 2529 | else: |
| 2530 | def putheader(self, header, *values): |
| 2531 | if header != HTTP_HEADER.CONTENT_LENGTH: |
| 2532 | self._putheader(header, *values) |
| 2533 | |
| 2534 | if not hasattr(_http_client.HTTPConnection, "_putheader"): |
| 2535 | _http_client.HTTPConnection._putheader = _http_client.HTTPConnection.putheader |
| 2536 | |
| 2537 | _http_client.HTTPConnection.putheader = putheader |
| 2538 | |
| 2539 | if conf.http10: |
| 2540 | _http_client.HTTPConnection._http_vsn = 10 |
| 2541 | _http_client.HTTPConnection._http_vsn_str = 'HTTP/1.0' |
| 2542 | |
| 2543 | if conf.url and (conf.url.startswith("ws:/") or conf.url.startswith("wss:/")): |
| 2544 | try: |
| 2545 | from websocket import ABNF |
| 2546 | except ImportError: |
| 2547 | errMsg = "sqlmap requires third-party module 'websocket-client' " |
| 2548 | errMsg += "in order to use WebSocket functionality" |
| 2549 | raise SqlmapMissingDependence(errMsg) |
| 2550 | |
| 2551 | def _checkTor(): |
| 2552 | if not conf.checkTor: |
no test coverage detected
searching dependent graphs…