fsociety-team / fsociety

A Modular Penetration Testing Framework
https://fsociety.dev/
MIT License
1.36k stars 157 forks source link

I am having trouble running fsociety #262

Open TheMexiko opened 2 months ago

TheMexiko commented 2 months ago

Which Tool? Trying to run fsociety in cmd, and whenever I try to use any command I get a massive line of code

┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\git__init__.py:296 │ │ in │ │ │ │ 293 │ │ 294 │ │ 295 try: │ │ > 296 │ refresh() │ │ 297 except Exception as _exc: │ │ 298 │ raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc │ │ 299 │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\git__init__.py:287 │ │ in refresh │ │ │ │ 284 │ global GIT_OK │ │ 285 │ GIT_OK = False │ │ 286 │ │ │ > 287 │ if not Git.refresh(path=path): │ │ 288 │ │ return │ │ 289 │ if not FetchInfo.refresh(): # noqa: F405 │ │ 290 │ │ return # type: ignore[unreachable] │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\git\cmd.py:631 in │ │ refresh │ │ │ │ 628 │ │ │ │ │ if mode in warn: │ │ 629 │ │ │ │ │ │ _logger.critical(err) │ │ 630 │ │ │ │ │ else: │ │ > 631 │ │ │ │ │ │ raise ImportError(err) │ │ 632 │ │ │ │ else: │ │ 633 │ │ │ │ │ err = dedent( │ │ 634 │ │ │ │ │ │ """\ │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ ImportError: Bad git executable. The git executable must be specified in one of the following ways:

All git commands will error until this is rectified.

This initial message can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values:

Example: export GIT_PYTHON_REFRESH=quiet

The above exception was the direct cause of the following exception:

┌─────────────────────────────── Traceback (most recent call last) ────────────────────────────────┐ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\runpy.py:193 in _run_module_as_main │ │ │ │ 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, │ │ 196 │ │ │ run_name=None, alter_sys=False): │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\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, │ │ │ │ in :5 │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\fsociety__main.py: │ │ 11 in │ │ │ │ 8 from rich.text import Text │ │ 9 │ │ 10 import fsociety.core.utilities │ │ > 11 import fsociety.informationgathering │ │ 12 import fsociety.networking │ │ 13 import fsociety.obfuscation │ │ 14 import fsociety.passwords │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\fsociety\information │ │ gathering\init.py:1 in │ │ │ │ > 1 from .cli import tools, cli │ │ 2 │ │ 3 all = ["cli", "tools"] + [str(tool) for tool in tools] │ │ 4 │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\fsociety\information_ │ │ gathering\cli.py:4 in │ │ │ │ 1 # Core │ │ 2 from fsociety.core.menu import toolscli │ │ 3 │ │ > 4 from .gitgraber import gitgraber │ │ 5 from .hydrarecon import hydrarecon │ │ 6 from .s3scanner import s3scanner │ │ 7 from .sherlock import sherlock │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\fsociety\information │ │ gathering\gitgraber.py:4 in │ │ │ │ 1 import os │ │ 2 │ │ 3 from fsociety.core.menu import confirm, set_readline │ │ > 4 from fsociety.core.repo import GitHubRepo │ │ 5 │ │ 6 │ │ 7 class GitgraberRepo(GitHubRepo): │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\fsociety\core\repo.py │ │ :6 in │ │ │ │ 3 from shutil import rmtree, which │ │ 4 from typing import Dict, Iterable, List, Optional, Union │ │ 5 │ │ > 6 from git import RemoteProgress, Repo │ │ 7 from rich.progress import BarColumn, Progress, TaskID │ │ 8 from rich.table import Table │ │ 9 │ │ │ │ c:\users\zarad\appdata\local\programs\python\python37-32\lib\site-packages\git\init__.py:298 │ │ in │ │ │ │ 295 try: │ │ 296 │ refresh() │ │ 297 except Exception as _exc: │ │ > 298 │ raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc │ │ 299 │ │ 300 # } END initialize git executable path │ │ 301 │ └──────────────────────────────────────────────────────────────────────────────────────────────────┘ ImportError: Failed to initialize: Bad git executable. The git executable must be specified in one of the following ways:

All git commands will error until this is rectified.

This initial message can be silenced or aggravated in the future by setting the $GIT_PYTHON_REFRESH environment variable. Use one of the following values:

Example: export GIT_PYTHON_REFRESH=quiet

ethanknights commented 2 months ago

Start by installing git and ensure it's on your shell's path