Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#160][IMP] Add proxy support on IntelOwl class #181

Closed
wants to merge 12 commits into from
Closed
4 changes: 4 additions & 0 deletions pyintelowl/pyintelowl.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ def __init__(
certificate: str = None,
logger: logging.Logger = None,
cli: bool = False,
proxies: dict = None
):
self.token = token
self.instance = instance_url
self.certificate = certificate
self.cli = cli
self.proxies = proxies
if logger:
self.logger = logger
else:
Expand All @@ -45,6 +47,8 @@ def session(self) -> requests.Session:
session = requests.Session()
if self.certificate is not True:
session.verify = self.certificate
if self.proxies:
session.proxies.update(self.proxies)
session.headers.update(
{
"Authorization": f"Token {self.token}",
Expand Down