Do not display urllib3 warning if there is no certificate verification
This commit is contained in:
parent
5762ea189c
commit
ded5a06ac3
1 changed files with 3 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
from __future__ import absolute_import, print_function
|
from __future__ import absolute_import, print_function
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
import urllib3
|
||||||
try:
|
try:
|
||||||
from urllib.parse import urlparse, urljoin
|
from urllib.parse import urlparse, urljoin
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
|
@ -168,6 +169,8 @@ class Browser(object):
|
||||||
session.proxies = self.PROXIES
|
session.proxies = self.PROXIES
|
||||||
|
|
||||||
session.verify = not self.logger.settings['ssl_insecure'] and self.VERIFY
|
session.verify = not self.logger.settings['ssl_insecure'] and self.VERIFY
|
||||||
|
if not session.verify:
|
||||||
|
urllib3.disable_warnings()
|
||||||
|
|
||||||
# defines a max_retries. It's mandatory in case a server is not
|
# defines a max_retries. It's mandatory in case a server is not
|
||||||
# handling keep alive correctly, like the proxy burp
|
# handling keep alive correctly, like the proxy burp
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue