hi,
I have this script in python


Code:

#!/usr/bin/env python
from Crypto.Cipher import DES3

def desEncrypt(key, data):
d = des4me(key)
return d.encrypt(data)

def des4me(key):
return DES3.new(key, DES3.MODE_ECB)

A='\x00\x11\x22\x33\xA8\x44\x55\x66\x92\x77\x88\xA C\x99\x94\x88\x11'
B='\x0c\xef\x83\x44\x34\x00\x00\xca'
print desEncrypt(A,B)


The result is in hex d2b3 1881 f6fc d951
And i want to to make the same output with openssl in a bash shell
I've tried with


Code:

A=$(echo -ne "\x00\x11\x22\x33\xA8\x44\x55\x66\x92\x77\x88\xAC\x 99\x94\x88\x11")
B=$(echo -ne "\x0c\xef\x83\x44\x34\x00\x00\xca")
echo -ne "$A"|openssl des-ede3 -nosalt -nopad -pass pass:$B|xxd


but the result is not the same.
I think that des-ede3 is the correct translation of DES3.MODE_ECB.
I don't understand my error..
Please help me (isn't a homework!!)
Best regards