Phunter icon indicating copy to clipboard operation
Phunter copied to clipboard

Encoding error while running script

Open LeKrang opened this issue 2 years ago • 1 comments

Hello,

First off thank you for providing this tool. 👍

When running the script I get the following encoding error

Traceback (most recent call last): File "C:\Opsec\Phunter\phunter.py", line 8, in asyncio.run(parser()) File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 190, in run return runner.run(main) ^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 654, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "C:\Opsec\Phunter\lib\cli.py", line 87, in parser await lookup(args.target) File "C:\Opsec\Phunter\lib\lookup.py", line 48, in lookup print(f"{WHITE}\U0001f4de Phone number: {BLUE}{phone_number}{WHITE}") File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2544.0_x64__qbz5n2kfra8p0\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode character '\U0001f4de' in position 19: character maps to

Running : python3 phunter.py -t +1333333333 (example)

It doesn't seem to like the encoding of the printf

LeKrang avatar Apr 06 '24 17:04 LeKrang

Hello, thank you for notifying me of this error. I've never had it and I don't know how to reproduce it, so I don't know what you could do to fix it. I have two pieces of advice to give you:

  • change virtual environment (test on vm, subsystem, sandbox etc...)
  • test with another terminal (cmder or others...)

N0rz3 avatar Apr 06 '24 18:04 N0rz3