Module ImportFrom alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias Assign NameStore Call NameLoad Assign NameStore BinOpMult Str Num Assign NameStore Str Assign NameStore Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Str Str Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call NameLoad Call NameLoad NameLoad Num NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr Str If CompareIn Str NameLoad body Return NameLoad Return NameLoad decorator_list FunctionDef arguments args defaults body Assign NameStore BinOpMult Str BinOpSub Num BinOpMod Call NameLoad NameLoad Num Assign NameStore BinOpSub BinOpFloorDiv BinOpAdd Call NameLoad NameLoad Call NameLoad NameLoad Num Num AugAssignAdd NameStore BinOpMult Str Num Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad BinOpMult Str Num Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad NameLoad Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign SubscriptStore NameLoad Index NameLoad NameLoad Assign NameStore Str For NameStore NameLoad body AugAssignAdd NameStore NameLoad Return NameLoad decorator_list Expr Str If CompareEq NameLoad Str body If Call NameLoad Call NameLoad Str body Raise Call NameLoad Str Assign NameStore Call NameLoad If Call NameLoad NameLoad body Print Str orelse Raise Call NameLoad Str
N/A prob11 generateAESKey prob10 aes_cbc_enc aes_cbc_dec prob9 addPKCS7Padding prob15 checkAndRemovePKCS7Padding prob8 chunks prob2 hex_xor prob1 rawToHex hexToRaw N/A global_aes_key N/A generateAESKey N/A global_iv N/A 16 N/A prefix comment1=cooking%20MCs;userdata= N/A suffix ;comment2=%20like%20a%20pound%20of%20bacon padAndEncryptString N/A N/A s N/A N/A N/A s N/A N/A N/A N/A s replace ; ';' replace = '=' N/A strInput N/A N/A prefix s suffix N/A rawInput N/A bytes strInput UTF-8 N/A rawOutput N/A aes_cbc_enc N/A addPKCS7Padding rawInput 16 global_aes_key global_iv N/A rawOutput N/A decryptAndCheckAdmin N/A N/A cip N/A N/A N/A rawPlain N/A checkAndRemovePKCS7Padding N/A aes_cbc_dec cip global_aes_key global_iv N/A strPlain N/A N/A N/A str rawPlain rstrip b' N/A N/A ;admin=true; strPlain N/A N/A True N/A False N/A generateEncryptedAdminProfile N/A N/A N/A N/A N/A s N/A A N/A 16 N/A N/A len prefix 16 N/A myIVBlock N/A N/A N/A N/A len prefix N/A len s 16 1 N/A s N/A X 16 N/A cip N/A padAndEncryptString s N/A allBlocks N/A chunks cip 16 N/A myIV N/A allBlocks N/A myIVBlock N/A hexIV N/A rawToHex myIV N/A hexKnown N/A rawToHex N/A X 16 N/A hexDesired N/A rawToHex ;admin=true;XXXX N/A newHexIV N/A hex_xor hexIV N/A hex_xor hexKnown hexDesired N/A newIV N/A hexToRaw newHexIV N/A N/A allBlocks N/A myIVBlock newIV N/A myCipher N/A b allBlocks N/A N/A myCipher b N/A myCipher N/A N/A Because the IV (previous cipher block) is xor'd against the ECB-decryption of
the current block to produce plaintext. 

original_plaintext = ECB_decrypt ^ IV, thus, if the IV has an error (IV ^ error):
new_plaintext = ECB_decrypt ^ (IV & error) = (ECB_decrypt ^ IV)^ error = original_plaintext ^ error

The wikipedia pictures makes this clear: http://en.wikipedia.org/wiki/File:Cbc_decryption.png  N/A N/A __name__ __main__ N/A N/A N/A decryptAndCheckAdmin N/A padAndEncryptString ;admin=true; N/A N/A N/A Exception padding quote failure N/A cip N/A generateEncryptedAdminProfile N/A N/A decryptAndCheckAdmin cip N/A N/A Problem 16 success N/A N/A N/A Exception Generate admin faulre