Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Text' object has no attribute 'stylize_all' #6

Closed
MarcinK50 opened this issue Nov 12, 2020 · 5 comments
Closed

'Text' object has no attribute 'stylize_all' #6

MarcinK50 opened this issue Nov 12, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@MarcinK50
Copy link

Which Tool?
A clear and concise description of what the bug is.
information_gathering category

What is the error?
Stacktrace:

'Text' object has no attribute 'stylize_all'
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /home/marcin/.local/lib/python3.8/site-packages/fsociety/cli.py:133 in mainloop                  │
│                                                                                                  │
│   130 │   │   return func()                                                                      │
│   131 │   try:                                                                                   │
│   132 │   │   func = items[selected_command].cli                                                 │
│ ❱ 133 │   │   return func()                                                                      │
│   134 │   except Exception as error:                                                             │
│   135 │   │   console.print(str(error))                                                          │
│   136 │   │   console.print_exception()                                                          │
│                                                                                                  │
│ /home/marcin/.local/lib/python3.8/site-packages/fsociety/information_gathering/cli.py:17 in cli  │
│                                                                                                  │
│   14                                                                                             │
│   15                                                                                             │
│   16 def cli():                                                                                  │
│ ❱ 17 │   tools_cli(__name__, __tools__)                                                          │
│                                                                                                  │
│ /home/marcin/.local/lib/python3.8/site-packages/fsociety/core/menu.py:95 in tools_cli            │
│                                                                                                  │
│    92 │   │   args = [str(tool), tool.description]                                               │
│    93 │   │   if links:                                                                          │
│    94 │   │   │   text_link = Text(f"{tool.path}")                                               │
│ ❱  95 │   │   │   text_link.stylize_all(                                                         │
│    96 │   │   │   │   Style(link=f"https://github.com/{tool.path}"))                             │
│    97 │   │   │   args.append(text_link)                                                         │
│    98 │   │   table.add_row(*args)                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: 'Text' object has no attribute 'stylize_all'

fsociety info
Run fsociety --info in your terminal and copy the results here.

# Config File

version = 3.2.3
agreement = true
ssh_clone = false
os = linux
host_file = hosts.txt
usernames_file = usernames.txt

# Python Version
3.8.4

# Platform
Linux-5.7.0-kali1-amd64-x86_64-with-glibc2.29
@MarcinK50 MarcinK50 added the bug Something isn't working label Nov 12, 2020
@krissvecto
Copy link

for me its all the tools not just information_gathering

@thehappydinoa
Copy link
Member

Hey, this is an issue with Rich, I am updating it now. Thanks for reporting 😁

@thehappydinoa
Copy link
Member

Fixed in v3.2.4

@krissvecto
Copy link

┌───────────────────── Traceback (most recent call last) ─────────────────────┐
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\git\ │
init.py:83 in │
│ │
│ 80 │
│ 81 ################# │
│ 82 try: │
│ ❱ 83 │ refresh() │
│ 84 except Exception as exc: │
│ 85 │ raise ImportError('Failed to initialize: {0}'.format(exc)) from ex │
│ 86 ################# │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\git\ │
init.py:73 in refresh │
│ │
│ 70 │ global GIT_OK │
│ 71 │ GIT_OK = False │
│ 72 │ │
│ ❱ 73 │ if not Git.refresh(path=path): │
│ 74 │ │ return │
│ 75 │ if not FetchInfo.refresh(): │
│ 76 │ │ return │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\git\ │
│ cmd.py:278 in refresh │
│ │
│ 275 │ │ │ │ │ if mode in warn: │
│ 276 │ │ │ │ │ │ print("WARNING: %s" % err) │
│ 277 │ │ │ │ │ else: │
│ ❱ 278 │ │ │ │ │ │ raise ImportError(err) │
│ 279 │ │ │ │ else: │
│ 280 │ │ │ │ │ err = dedent("""\ │
│ 281 │ │ │ │ │ │ %s environment variable has been set but it │
└─────────────────────────────────────────────────────────────────────────────┘
ImportError: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet

During handling of the above exception, another exception occurred:

┌───────────────────── Traceback (most recent call last) ─────────────────────┐
│ c:\users\karl\appdata\local\programs\python\python38\lib\runpy.py:192 in │
│ _run_module_as_main │
│ │
│ 189 │ main_globals = sys.modules["main"].dict
│ 190 │ if alter_argv: │
│ 191 │ │ sys.argv[0] = mod_spec.origin │
│ ❱ 192 │ return run_code(code, main_globals, None, │
│ 193 │ │ │ │ │ "main", mod_spec) │
│ 194 │
│ 195 def run_module(mod_name, init_globals=None, │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\runpy.py:85 in │
run_code │
│ │
│ 82 │ │ │ │ │ loader = loader, │
│ 83 │ │ │ │ │ package = pkg_name, │
│ 84 │ │ │ │ │ spec = mod_spec) │
│ ❱ 85 │ exec(code, run_globals) │
│ 86 │ return run_globals │
│ 87 │
│ 88 def run_module_code(code, init_globals=None, │
│ │
│ C:\Users\karl\AppData\Local\Programs\Python\Python38\Scripts\fsociety.exe_ │
main
.py:5 in │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety_init
.py:1 in │
│ │
│ ❱ 1 from .cli import main as cli │
│ 2 │
│ 3 all = ["cli"] │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety\cli.py:23 in │
│ │
│ 20 ) │
│ 21 from fsociety.core.config import get_config, write_config, CONFIG_FIL │
│ 22 import fsociety.core.utilities │
│ ❱ 23 import fsociety.information_gathering │
│ 24 import fsociety.passwords │
│ 25 import fsociety.web_apps │
│ 26 import fsociety.obfuscation │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety\information_gathering_init.py:1 in │
│ │
│ ❱ 1 from .cli import cli, tools
│ 2 │
│ 3 all = ["cli", "tools"] + [str(tool) for tool in tools] │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety\information_gathering\cli.py:4 in │
│ │
│ 1 # Core │
│ 2 from fsociety.core.menu import tools_cli │
│ 3 │
│ ❱ 4 from .sqlmap import sqlmap │
│ 5 from .striker import striker │
│ 6 from .sublist3r import sublist3r │
│ 7 from .sherlock import sherlock │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety\information_gathering\sqlmap.py:3 in │
│ │
│ 1 import os │
│ 2 │
│ ❱ 3 from fsociety.core.repo import GitHubRepo │
│ 4 from fsociety.core.menu import confirm │
│ 5 │
│ 6 │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\fsoc │
│ iety\core\repo.py:7 in │
│ │
│ 4 from abc import ABCMeta, abstractmethod │
│ 5 from collections.abc import Iterable │
│ 6 │
│ ❱ 7 from git import Repo, RemoteProgress │
│ 8 from rich.progress import BarColumn, Progress │
│ 9 from rich.table import Table │
│ 10 │
│ │
│ c:\users\karl\appdata\local\programs\python\python38\lib\site-packages\git\ │
init.py:85 in │
│ │
│ 82 try: │
│ 83 │ refresh() │
│ 84 except Exception as exc: │
│ ❱ 85 │ raise ImportError('Failed to initialize: {0}'.format(exc)) from ex │
│ 86 ################# │
└─────────────────────────────────────────────────────────────────────────────┘
ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
- be included in your $PATH
- be set via $GIT_PYTHON_GIT_EXECUTABLE
- explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
- quiet|q|silence|s|none|n|0: for no warning or exception
- warn|w|warning|1: for a printed warning
- error|e|raise|r|2: for a raised exception

Example:
export GIT_PYTHON_REFRESH=quiet
my comp is a windows 8.1 64-bit and i got a similar error but it happens when i simply text fsociety to get it started in my cmd

@thehappydinoa
Copy link
Member

@krissvecto you need to install git into your $PATH. Please follow: https://www.atlassian.com/git/tutorials/install-git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants