quentinhardy / odat

ODAT: Oracle Database Attacking Tool
1.6k stars 345 forks source link

passwordguesser returned UnicodeDecodeError #36

Closed brianwoo closed 4 years ago

brianwoo commented 4 years ago

I ran into the UnicodeDecodeError when I ran odat on the passswordguesser module:

root@kali:~/Projects/odat# ./odat.py passwordguesser -s 10.10.10.82 -d XE --accounts-file accounts/accounts_small.txt

Traceback (most recent call last): File "./odat.py", line 562, in main() File "./odat.py", line 557, in main arguments.func(args) File "/root/Projects/odat/PasswordGuesser.py", line 182, in runPasswordGuesserModule args['print'].title("Searching valid accounts on the {0} server, port {1}".format(args['server'],args['port'])) File "/root/Projects/odat/Output.py", line 31, in title m = m.encode(encoding='UTF-8',errors='ignore') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 43: ordinal not in range(128)

sgstudent2019 commented 4 years ago

Hey there @brianwoo,

I was just facing the same issue (while doing HTB's Silo) as you did.

When you ran the command ./odat.py passwordguesser -s 10.10.10.82 -d XE --accounts-file accounts/accounts_small.txt, the Python version used was very likely to be 2+ (based on my experience here).

To get around the issue, explicitly use Python 3+. Thus, the command that you should be running is python3 odat.py passwordguesser -s 10.10.10.82 -d XE --accounts-file accounts/accounts_small.txt.

P.S. Don't forget to install the cx_Oracle module using pip3 first! P.S.S. If you're doing OSCP as well, I would really love to hear from you (as I'm looking for someone to exchange tips and pointers with)!.

quentinhardy commented 4 years ago

Odat on the default branch master-python3 is compatible with python 3 only. You has to use the python3 command (with dependencies - see readme.md) or you can use standalone version (see Release).

The new version of Odat checks the python version now (https://github.com/quentinhardy/odat/commit/d0cabc6ec9c7a9795a5c70270986253bee4e675d)