bee-san / pyWhat

🐸 Identify anything. pyWhat easily lets you identify emails, IP addresses, and more. Feed it a .pcap file or some text and it'll tell you what it is! 🧙‍♀️
MIT License
6.53k stars 350 forks source link

Exception when using --json with email input #126

Closed ghost closed 3 years ago

ghost commented 3 years ago

Input: pywhat root@gmail.com --json

Output:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/bin/pywhat", line 8, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pywhat/what.py", line 208, in main
    p.print_json(identified_output)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pywhat/printer.py", line 82, in print_json
    self.console.print(json.dumps(text))
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rich/console.py", line 1555, in print
    renderables = self._collect_renderables(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rich/console.py", line 1420, in _collect_renderables
    self.render_str(
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rich/console.py", line 1311, in render_str
    rich_text = render_markup(text, style=style, emoji=emoji_enabled)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/rich/markup.py", line 148, in render
    raise MarkupError(
rich.errors.MarkupError: closing tag '[/?#]' at position 10409 doesn't match any open tag
ottsch commented 3 years ago

Same