0

I am trying to carry out a padding oracle attack. I am aware that I have to modify the bytes from 00 to the point where it succeeds, to find the correct padding. But, how do I represent 00-FF in python? When I try representing it as a part of the string, 00 is taken as 2 bytes.

P.S - This is a homework problem.

halfling
  • 11
  • 1
  • Related: [What does the 'b' character do in front of a string literal?](http://stackoverflow.com/questions/6269765/what-does-the-b-character-do-in-front-of-a-string-literal) – Artjom B. Mar 10 '15 at 09:46

1 Answers1

2

Doing '\x00\x00\xff' or "0000ff".decode('hex') should work.

mmmonk
  • 41
  • 6