0

Does Python change my string??

enter image description here

The related question is I was using a little shellcode in my python but failed

PS: I was doubting what's is the end charecter of Python String or C string, if the string have the end charecter, how to deal with it? Does this related to this question?

1
  • 4
    Don't you think \x49 is the same as I? Commented Oct 30, 2012 at 0:18

1 Answer 1

6
>>> chr(int('49', 16))
'I'

Actually, \x49 is I.


A word of explanation about this:

\x49 means "Char with code 49 in hex. 49 in hex is int('49', 16): 73. 73 is the ASCII character code for I, which you can verify with: ord('I'): 73.

Sign up to request clarification or add additional context in comments.

2 Comments

OK I got it. Can you explain what happend here? stackoverflow.com/questions/13125651/…
@Eout Yes, please see the answer there : )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.