forked from p34709852/monkey
Agent: Modify backdoor user PBA's commands to request for headers only
when checking for internet connection
This commit is contained in:
parent
81fb015e6b
commit
4288063408
|
@ -67,16 +67,16 @@ class CommunicateAsBackdoorUser(PBA):
|
|||
format_string = (
|
||||
'powershell.exe -command "[Net.ServicePointManager]::SecurityProtocol = ['
|
||||
"Net.SecurityProtocolType]::Tls12; "
|
||||
'Invoke-WebRequest {url} -UseBasicParsing"'
|
||||
'Invoke-WebRequest {url} -UseBasicParsing -method HEAD"'
|
||||
)
|
||||
else:
|
||||
# if curl works, we're good.
|
||||
# If curl doesn't exist or fails and wget work, we're good.
|
||||
# And if both don't exist: we'll call it a win.
|
||||
if shutil.which("curl") is not None:
|
||||
format_string = "curl {url}"
|
||||
format_string = "curl {url} --head"
|
||||
else:
|
||||
format_string = "wget -O/dev/null -q {url}"
|
||||
format_string = "wget -O/dev/null -q {url} --method=HEAD"
|
||||
return format_string.format(url=url)
|
||||
|
||||
def send_result_telemetry(self, exit_status, commandline, username):
|
||||
|
|
Loading…
Reference in New Issue