Python error : TypeError: unsupported operand type(s) for +=: 'dict' and 'str'

Posted by user2962401 on Stack Overflow See other posts from Stack Overflow or by user2962401
Published on 2014-06-09T21:20:50Z Indexed on 2014/06/09 21:24 UTC
Read the original article Hit count: 2250

Filed under:

I am getting the error

TypeError: unsupported operand type(s) for +=: 'dict' and 'str'

on this line of code :

payload += "\x00" * (509 - len(payload))

the payload is: 'S\x96#:\x04\x04R\x1alD\x02\x04\x04V;\x15&\x06\x10 \x01'

and what it should do is pad the payload until the length of the payload is 509 bytes long, but I do not understand this error, what does it mean and how can I solve it?

© Stack Overflow or respective owner

Related posts about python