0xInfection / TIDoS-Framework

The Offensive Manual Web Application Penetration Testing Framework.
GNU General Public License v3.0
1.78k stars 392 forks source link

UnicodeEncodeError at several places #117

Closed 0xInfection closed 4 years ago

0xInfection commented 4 years ago

So I started to manually test TIDoS v2 on the dev branch, and found a few bugs (more possibly upcoming). This is the first one that I hit while trying to run sudo ./tidconsole.py.

Traceback (most recent call last):
  File "./tidconsole.py", line 779, in <module>
    main()
  File "./tidconsole.py", line 770, in main
    prnt.loadstyle()
  File "/home/pinaki/tidos-framework/core/methods/print.py", line 94, in loadstyle
    print(display)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u2019' in position 46: ordinal not in range(256)

Possible cause: image

Another place where I encountered this is right after adding a site using vicadd command.

 [?] Does this website use SSL? (y/n) :> n
 [?] Does the site use a custom port? (enter if not) :> 
 [*] Checking server status...
Traceback (most recent call last):
  File "tidconsole.py", line 779, in <module>
    main()
  File "tidconsole.py", line 774, in main
    TIDcon().cmdloop()
  File "tidconsole.py", line 52, in cmdloop
    super(TIDcon, self).cmdloop(intro=None)
  File "/usr/lib/python3.6/cmd.py", line 138, in cmdloop
    stop = self.onecmd(line)
  File "/usr/lib/python3.6/cmd.py", line 217, in onecmd
    return func(arg)
  File "tidconsole.py", line 392, in do_vicadd
    addtarget.inputin(inp)
  File "/home/pinaki/tidos-framework/core/methods/inputin.py", line 65, in inputin
    print(G + ' [+] Site seems to be up...'+C+color.TR2+C)
UnicodeEncodeError: 'latin-1' codec can't encode character '\ue0b0' in position 101: ordinal not in range(256)

I would suggest that we should stick with strict ASCII. This is because for terminals that don't support unicode, the tool will just spew illegible characters. Since these arts have been curated by you, so I would let you decide what to do with these.

I agree that unicode makes it look good, but they are an unnecessary cause of these troubles. Let me know what you think! :) P.S.: Great work with the ASCII arts!

VainlyStrain commented 4 years ago

Hi!

The issue (should) be resolved in the latest commit, thanks for reporting! As far as I know, I've caught all of the unicode characters, and "converted" them in similar-looking ascii chars. Please let me know if you find more of them, since I can't reproduce the error due to my environment supporting UTF 8 :+1:

0xInfection commented 4 years ago

Thanks, great work man. Keep it up!

0xInfection commented 4 years ago

Also @VainlyStrain, we should merge the dev branch into master and let people know that a new release is upcoming. What do you say?

VainlyStrain commented 4 years ago

I'm for it! I'll take care of it tomorrow*

*(basically, in some hours :wink: Nights have been rather short due to CTF)

SuperPower009 commented 3 years ago

Traceback (most recent call last): File "/root/tidos-framework/tidconsole.py", line 779, in main() File "/root/tidos-framework/tidconsole.py", line 770, in main prnt.loadstyle() File "/root/tidos-framework/core/methods/print.py", line 64, in loadstyle while thread.isAlive(): AttributeError: 'Thread' object has no attribute 'isAlive'

Salut a tous j'ai ce soucis lorsque j'essaie d'executer TIDoS-Framework comment resoudre le soucis cordialements....