2010-05-11, 07:14 AM
Martyn,
Thanks for figuring this out for us.. but what do I do with the AES.py and Setup.py files ?
I tried simply copying them into the libs folder and replacing the _AESEncrypt function GBPVR_Connect.py but it still doesn't work for me
GBPvr script says "unable to connect to GBPVr"
XBMC.log says that it can't import aes.
Help
Marcus
Thanks for figuring this out for us.. but what do I do with the AES.py and Setup.py files ?
I tried simply copying them into the libs folder and replacing the _AESEncrypt function GBPVR_Connect.py but it still doesn't work for me
GBPvr script says "unable to connect to GBPVr"
XBMC.log says that it can't import aes.
Help
Marcus
martynw Wrote:Hey Ton,
I found a pure Python module that does AES encryption and have been attempting to get myGBPVR to work on my original XBoxes with XBMC.
I've got as far as (I think) correctly encrypting the credentials and passing them in the requests, but I'm getting errors from GBPVR with regards to "Padding", so I'm guessing something isn't quite right.
Would you be willing to take a look at that for me? Or even take a look at using the Python module instead of using PyCrypto?
The module is at http://code.google.com/p/slowaes/source/...unk/python
My (poor) code to replace the _AESEncrypt routine is:
Code:def _AESEncrypt(self, clear_bytes, key_bytes, iv_bytes):
import aes
try:
mode = aes.AESModeOfOperation.modeOfOperation["CBC"]
key_bytes = map(ord, key_bytes)
key_size = len(key_bytes)
clear_bytes = aes.append_PKCS7_padding(clear_bytes)
iv_bytes = map(ord, iv_bytes)
aes_cypher = aes.AESModeOfOperation()
(mode, orig_len, encrypted) = aes_cypher.encrypt(clear_bytes,mode,key_bytes,key_size,iv_bytes)
return ''.join(map(chr, encrypted))
except:
import traceback
traceback.print_exc()
return
Cheers,
Martyn