mxrch / GHunt

🕵️‍♂️ Offensive Google framework.
Other
15.65k stars 1.3k forks source link

Where to put the cookies check_and_gen.py is looking for? #219

Closed petersasi closed 1 year ago

petersasi commented 3 years ago

I am trying to run this on an Ubuntu 20.04.2 LTS so do not really have GUI to start Chrome in this Ubuntu. However I do have Chrome and Firefox authenticated into a Google Account on the Windows 10 running this WSL Ubuntu. Where shall I copy the cookies for the script to find them and generate properly?

petersasi commented 3 years ago

Currently the scripts falis for me with:

# python check_and_gen.py
Traceback (most recent call last):I'm downloading and installing it for you...
  File "check_and_gen.py", line 102, in <module>
    driverpath        = get_driverpath()
  File "/home/sape/GHunt/lib/utils.py", line 101, in get_driverpath
    path = chromedriver_autoinstaller.install(cwd=True)
  File "/usr/local/lib/python3.8/dist-packages/chromedriver_autoinstaller/__init__.py", line 15, in install
    chromedriver_filepath = utils.download_chromedriver(cwd)
  File "/usr/local/lib/python3.8/dist-packages/chromedriver_autoinstaller/utils.py", line 166, in download_chromedriver
    chrome_version = get_chrome_version()
  File "/usr/local/lib/python3.8/dist-packages/chromedriver_autoinstaller/utils.py", line 107, in get_chrome_version
    with subprocess.Popen([executable_name, '--version'], stdout=subprocess.PIPE) as proc:
  File "/usr/lib/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'google-chrome'
famasoon commented 3 years ago

Maybe same issue https://github.com/mxrch/GHunt/issues/195 . I think you should use Docker that will install google-chrome ( and chromedriver) automatically (Please see the README for instructions on how to install with Docker)

kernelXDA commented 3 years ago

sudo apt update sudo apt upgrade

apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg \ lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg echo \

"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io apt-cache madison docker-ce sudo apt-get install docker-ce=< xxxxxxxxx > docker-ce-cli=< xxxxxxxxx >

sudo service docker start

ls -l /var/run/docker.sock srw-rw---- 1 root docker 0 Apr 10 21:02 /var/run/docker.sock

sudo systemctl mask docker.service docker.service masked enabled

sudo dpkg -l | grep systemd sudo apt-get install --reinstall systemd sudo apt update

sudo sytemctl unmask docker.service

xprotector commented 1 year ago

python3: can't open file '/home/xor/GHunt/check_and_gen.py': [Errno 2] No such file or directory