from binascii import hexlify, unhexlify
from Crypto.Cipher import AES
IV = 16*"\x00"
key = 16*"\x00"
picc = "CACDEC6C5455EE52BB1DA40470963113"
# ergibt c7048d66e22e6780050100a2495ed77a
myaes = AES.new(key,AES.MODE_CBC,IV)
okay = myaes.decrypt(unhexlify(picc))
counter= int("0x"+hexlify(okay[9:10])+hexlify(okay[8:9]),16)
print counter
ZnJvbSBiaW5hc2NpaSBpbXBvcnQgaGV4bGlmeSwgdW5oZXhsaWZ5CmZyb20gQ3J5cHRvLkNpcGhlciBpbXBvcnQgQUVTCklWICAgICA9IDE2KiJceDAwIgprZXkgICAgPSAxNioiXHgwMCIKcGljYyAgID0gIkNBQ0RFQzZDNTQ1NUVFNTJCQjFEQTQwNDcwOTYzMTEzIgojIGVyZ2lidCAgYzcwNDhkNjZlMjJlNjc4MDA1MDEwMGEyNDk1ZWQ3N2EKbXlhZXMgID0gQUVTLm5ldyhrZXksQUVTLk1PREVfQ0JDLElWKQpva2F5ICAgPSBteWFlcy5kZWNyeXB0KHVuaGV4bGlmeShwaWNjKSkKY291bnRlcj0gaW50KCIweCIraGV4bGlmeShva2F5Wzk6MTBdKStoZXhsaWZ5KG9rYXlbODo5XSksMTYpCnByaW50ICAgIGNvdW50ZXIK