Skip to content

not working on Python 3.7  #18

@art3mHQ

Description

@art3mHQ

Not working properly on Python 3.7
even with this patch #16

eg:
art3mk@akmac:xortool$ xortool encryptedtext -l 24 -c 20
2 possible key(s) of length 24:
\n\x0c\x1a\x1e\x11\x10\x11\x06\x12\x16\x05\x1a\r\x0c\x16\x0c\r\x16\x18\x17\x0b\x08\x1e\x06
\n\x0c\x1a\x1e\x11\x10\x11\x06\x12\x16\x05\x1a\r\x0c\x16\x0c\r\x16\x18\x17\x0b2\x1e\x06
Traceback (most recent call last):
File "/usr/local/bin/xortool", line 381, in
main()
File "/usr/local/bin/xortool", line 71, in main
produce_plaintexts(ciphertext, probable_keys, key_char_used)
File "/usr/local/bin/xortool", line 349, in produce_plaintexts
key_repr = alphanum(key)
File "/usr/local/lib/python3.7/site-packages/xortool/routine.py", line 95, in alphanum
if char in (string.letters + string.digits):
AttributeError: module 'string' has no attribute 'letters'

after changing "letters" to "ascii_letters"

art3mk@akmac:xortool$ xortool encryptedtext -l 24 -c 20
2 possible key(s) of length 24:
\n\x0c\x1a\x1e\x11\x10\x11\x06\x12\x16\x05\x1a\r\x0c\x16\x0c\r\x16\x18\x17\x0b\x08\x1e\x06
\n\x0c\x1a\x1e\x11\x10\x11\x06\x12\x16\x05\x1a\r\x0c\x16\x0c\r\x16\x18\x17\x0b2\x1e\x06
Traceback (most recent call last):
File "/usr/local/bin/xortool", line 381, in
main()
File "/usr/local/bin/xortool", line 71, in main
produce_plaintexts(ciphertext, probable_keys, key_char_used)
File "/usr/local/bin/xortool", line 349, in produce_plaintexts
key_repr = alphanum(key)
File "/usr/local/lib/python3.7/site-packages/xortool/routine.py", line 97, in alphanum
lst[index] = char.encode("hex")
LookupError: 'hex' is not a text encoding; use codecs.encode() to handle arbitrary codecs

xortool_out folder files are empty (just headers in there)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions