Hi,

I've the intention to connect to bacula-dir in pure Python
using Python's library modules.
But I run in trouble with the hmac/base64 implementation,
which seems to be different from bacula ones.

Code Sniplet:
----8><-----------8><----

     HELLO = r"Hello %s calling\n"
...
     def login(self, username, password):
         pw = md5.md5(password).hexdigest()

         self._send(self.HELLO % username)
         response = self._recv()

         m = self.RXP_RESP.search(response)
         print m.group("challenge")
         challenge = hmac.new(m.group("challenge"), pw).digest()
         self._send(base64.b64encode(challenge.digest())[:-2] + "\n")
         print self._recv()

----8><-----------8><----

self._send and self._recieve add/strip the datalength prefix on socket
data stream.
Any suggestions?

Regards
        Holger Müller

-- 
Holger Müller                             [email protected]
dass IT GmbH                              Phone: +49.221.3565666-95
http://www.dass-IT.de                     Fax: +49.221.3565666-10

Sitz der Gesellschaft: Köln | Amtsgericht Köln: HRB52500=20
Geschäftsführer: Stephan Dühr, M. Außendorf, J. Steffens, P. Storz



------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to