File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ def __str__(self):
6666class Session (object ):
6767
6868 __AUTH_REQ = "<Authorize TargetService=\" %s\" Type=\" SRP\" />"
69- __SRP_REQ = "<SRPRequest ClientKey=\" %s\" Cipher=\" RC4 \" Username=\" %s\" />" #Why is this hard coded...
69+ __SRP_REQ = "<SRPRequest ClientKey=\" %s\" Cipher=\" %s \" Username=\" %s\" />"
7070
7171 __SERVICE_REQ = "<Request Service=\" %s\" %s/>"
7272 __SERVICE_CONN = "<Connect Service=\" %s\" %s/>"
@@ -104,15 +104,14 @@ def port(self):
104104
105105 # NOTE: This routine works only for agents ... see the sql module for a
106106 # still-in-progress example of opening an authorized engine session
107- def authorize (self , account = "domain" , password = None ):
107+ def authorize (self , account = "domain" , password = None , cipher = 'RC4' ):
108108 if not password :
109109 raise SessionException ("A password is required for authorization" )
110110
111111 cp = ClientPassword ()
112112 key = cp .genClientKey ()
113-
114113 self .send (Session .__AUTH_REQ % self .__service )
115- response = self .__sendAndReceive (Session .__SRP_REQ % (key , account ))
114+ response = self .__sendAndReceive (Session .__SRP_REQ % (key , cipher , account ))
116115
117116 root = ElementTree .fromstring (response )
118117 if root .tag != "SRPResponse" :
You can’t perform that action at this time.
0 commit comments