Skip to content

Fix TypeError in line 8 in 2019/Inctf/Crypto/Single Byte/xor.py#2

Open
Anish-M-code wants to merge 1 commit intonaveenselvan:masterfrom
Anish-M-code:master
Open

Fix TypeError in line 8 in 2019/Inctf/Crypto/Single Byte/xor.py#2
Anish-M-code wants to merge 1 commit intonaveenselvan:masterfrom
Anish-M-code:master

Conversation

@Anish-M-code
Copy link
Copy Markdown

@Anish-M-code Anish-M-code commented Sep 6, 2021

@naveenselvan @AkashM398
TypeError: ord() expected string of length 1, but int found this error occured because contents of str1 was like b'\x13\x14\x19\x0e\x1c\x10\x01\x02J\x08%\x19N\x14]\x0e%\x18I%\x1fN\t\x13\x16\x03%\x18\x08J\x11I\x14\x07'

currently fixed issue by replacing str1 with str1.decode()

TypeError: ord() expected string of length 1, but int found this error occured because contents of str1 was like b'\x13\x14\x19\x0e\x1c\x10\x01\x02J\x08%\x19N\x14]\x0e%\x18I%\x1fN\t\x13\x16\x03%\x18\x08J\x11I\x14\x07' 

currently fixed issue by replacing str1 with str1.decode()
@naveenselvan
Copy link
Copy Markdown
Owner

Hi @Anish-M-code,
The code works via python2.

@Anish-M-code
Copy link
Copy Markdown
Author

@naveenselvan sorry i thought it was python3 , my fix makes it work for python 3 , feel free to close pull request if patch not required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants