()
| 19 | return context |
| 20 | |
| 21 | def monkeypatch_ssl_create_default_context(): |
| 22 | if ssl.create_default_context != _insecure_create_default_context: |
| 23 | ssl._create_default_context = ssl.create_default_context |
| 24 | ssl.create_default_context = _insecure_create_default_context |
| 25 | |
| 26 | from impacket import LOG |
| 27 | LOG.debug('Monkeypatch [ssl.create_default_context] to allow connections to insecurely configured servers') |
| 28 | LOG.debug(' minimum_version = ssl.TLSVersion.MINIMUM_SUPPORTED') |
| 29 | LOG.debug(' set_ciphers("ALL:@SECLEVEL=0")') |
| 30 | LOG.debug(' verify_mode = ssl.CERT_NONE') |
| 31 | |
| 32 | # ----- |
| 33 |
no outgoing calls
no test coverage detected
searching dependent graphs…