Skip to content

Commit

Permalink
[intelowlproject#160][IMP] Add proxy support on IntelOwl class
Browse files Browse the repository at this point in the history
  • Loading branch information
Ektoplasma committed Nov 5, 2022
1 parent 99e6b1a commit 5a8ac30
Showing 1 changed file with 4 additions and 0 deletions.
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

0 comments on commit 5a8ac30

Please sign in to comment.