Coder Social home page Coder Social logo

ghunt's Introduction


๐ŸŒ GHunt Online version : https://osint.industries


Python minimum version

๐Ÿ˜Š Description

GHunt (v2) is an offensive Google framework, designed to evolve efficiently.
It's currently focused on OSINT, but any use related with Google is possible.

Features :

  • CLI usage and modules
  • Python library usage
  • Fully async
  • JSON export
  • Browser extension to ease login

โœ”๏ธ Requirements

  • Python >= 3.10

โš™๏ธ Installation

$ pip3 install pipx
$ pipx ensurepath
$ pipx install ghunt

It will automatically use venvs to avoid dependency conflicts with other projects.

๐Ÿ’ƒ Usage

Login

First, launch the listener by doing ghunt login and choose between 1 of the 2 first methods :

$ ghunt login

[1] (Companion) Put GHunt on listening mode (currently not compatible with docker)
[2] (Companion) Paste base64-encoded cookies
[3] Enter manually all cookies

Choice =>

Then, use GHunt Companion to complete the login.

The extension is available on the following stores :

Firefoxย ย ย Chrome

Modules

Then, profit :

usage: ghunt [-h] {login,email,gaia,drive} ...

positional arguments:
  {login,email,gaia,drive}
    login   (--clean)         Authenticate GHunt to Google.
    email   (--json)          Get information on an email address.
    gaia    (--json)          Get information on a Gaia ID.
    drive   (--json)          Get information on a Drive file or folder.

options:
  -h, --help            show this help message and exit

๐Ÿ“„ You can also use --json with email, gaia and drive modules to export in JSON ! Example :

$ ghunt email <email_address> --json user_data.json

Have fun ๐Ÿฅฐ๐Ÿ’ž

๐Ÿง‘โ€๐Ÿ’ป Developers

๐Ÿ“• I started writing some docs here and examples here, feel free to contribute !

To use GHunt as a lib, you can't use pipx because it uses a venv.
So you should install GHunt with pip :

$ pip3 install ghunt

And now, you should be able to import ghunt in your projects !
You can right now play with the examples.

๐Ÿ“ฎ Details

Obvious disclaimer

This tool is for educational purposes only, I am not responsible for its use.

Less obvious disclaimer

This project is under AGPL Licence, and you have to respect it.
Use it only in personal, criminal investigations, pentesting, or open-source projects.

Thanks

Sponsors

Thanks to these awesome people for supporting me !

BlWaspย ย C3n7ral051nt4g3ncyย ย im-hanzouย ย gingeleskiย ย ItsMalwareย ย 


You like my work ?
Sponsor me on GitHub ! ๐Ÿค—

ghunt's People

Contributors

0xadam avatar 4383 avatar ahmadhany avatar ahmedh-i avatar anatolec avatar andrew-chen-wang avatar ant1k9 avatar christianboyle avatar ctrlsam avatar epieos avatar gh0u1l5 avatar henkpoley avatar hmikihth avatar itsignacioportal avatar kevinadhiguna avatar mancy avatar marin-m avatar mxrch avatar nikolozch avatar outime avatar saikrishna0506 avatar sayanthd avatar soxoj avatar titoesteves avatar tpetry avatar verdantfire avatar xceptions avatar yldbouk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ghunt's Issues

Problems when i run check_and_gen.py

Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.8/dist-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 95, in init
RemoteWebDriver.init(
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 152, in init
self.start_session(capabilities, browser_profile)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 249, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Chrome failed to start: exited abnormally. Initiating a Pull Request for this Issue.

The Script needs to be run as root on Linux Operating Systems. But Chrome has Issues running as Root. So I tried to fix this issue by adding the Line:

chrome_options.add_argument('--no-sandbox') At Line number:67 in check_and_gen.py
This is my First Pull request. So please don't mind if I did any Mistake.

โ”Œโ”€[โœ—]โ”€[sai@parrot]โ”€[/opt/GHunt]
โ””โ”€โ”€โ•ผ $sudo python3 check_and_gen.py
_Secure-3PSID => 2Ae_9ldNpD1B5cGCauBB-PRXgxjBikcEEu1-Vr10TrKozJ3QIdzoo2sTTwpel-dW2zcPg.
APISID => 1x9-ytFC6DDPjX5u/AZtxCR-puDLADgIcF
SAPISID => mkHYkN3dha68plj-/AmX0EEd2VU53DSmrW
HSID => A5-QEcCKO_s4AR7HB

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => AC4w5Vj_GOJbqQSfBSYuiHx1E1s9tWNM7A:1601740818709
Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.8/dist-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 95, in init
RemoteWebDriver.init(
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 152, in init
self.start_session(capabilities, browser_profile)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 249, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/webdriver.py", line 318, in execute
self.error_handler.check_response(response)
File "/usr/lib/python3/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Stuck on "Got the albums overview !"

Traceback (most recent call last): File "hunt.py", line 114, in <module> gpics(gaiaID, client, cookies, cfg) File "___\photos.py", line 97, in gpics out = get_source(gaiaID, client, cookies, cfg) File "___\lib\photos.py", line 82, in get_source result = wait.until(element_has_substring_or_substring((By.XPATH, "//body"), photos_trigger, no_photos_trigger)) File "___\wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:

General reformatting

Code could use a more standard way of arranging imports, spacing and other general stuff. I'll propose something in a PR.

KeyError In program

Traceback (most recent call last):
  File "hunt.py", line 117, in <module>
    confidence, locations = gmaps.get_confidence(reviews, cfg)
  File "C:\Users\hamza\Desktop\GHunt\lib\gmaps.py", line 233, in get_confidence
    location = sanitize_location(location)
  File "C:\Users\hamza\Desktop\GHunt\lib\utils.py", line 29, in sanitize_location
    town = location["municipality"]
KeyError: 'municipality'

Dockerize

I'll submit a PR soon so that a Docker image can be built easily and you can then decide if you want to merge it, build a GitHub action to automatically build it and upload it to Docker Hub, etc so it gets much easier to setup and use.

Timed out

Traceback (most recent call last):kedPeople request, it can takes a few minutes...
  File ".\check_and_gen.py", line 84, in <module>
    req = driver.wait_for_request('/v2/people/me/blockedPeople', timeout=120)
  File "C:\Users\Derpyhsi\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\seleniumwire\webdriver\request.py", line 75, in wait_for_request
    raise TimeoutException('Timed out after {}s waiting for request {}'.format(timeout, path))
selenium.common.exceptions.TimeoutException: Message: Timed out after 120s waiting for request /v2/people/me/blockedPeople

TypeError when searching for metadata

When searching for metadata, I got the following error:

Searching metadata...
[+] 1 device found !
Traceback (most recent call last):
File "hunt.py", line 114, in
gpics(gaiaID, client, cfg)
File "/home/dan/GHunt/lib/photos.py", line 42, in gpics
exifeater.output()
File "/home/dan/GHunt/lib/metadata.py", line 114, in output
dates = print_dates(data["History"]["Valid"])
File "/home/dan/GHunt/lib/metadata.py", line 94, in print_dates
dates["max"] = max(dates_list).strftime("%Y/%m/%d")
TypeError: '>' not supported between instances of 'NoneType' and 'datetime.datetime'

docker build fails due to chrome version

Dockerfile

ENV CHROMEDRIVER_VERSION 85.0.4183.87
ENV CHROME_VERSION 85.0.4183.121-1

Error Logs:

Warning: apt-key output should not be parsed (stdout is not a terminal)
OK
Get:1 http://dl.google.com/linux/chrome/deb stable InRelease [1811 B]
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster InRelease
Get:4 http://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1074 B]
Hit:5 http://deb.debian.org/debian buster-updates InRelease
Fetched 2885 B in 1s (5476 B/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
E: Version '85.0.4183.121-1' for 'google-chrome-stable' was not found
The command '/bin/sh -c groupadd -g ${GID} -r app && adduser --system --home /home/app --ingroup app --uid ${UID} app &&     chown -R app:app /usr/src/app &&     apt-get update &&     apt-get install -y curl unzip gnupg &&     curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list &&     apt-get update &&     apt-get install -y google-chrome-stable=${CHROME_VERSION} &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

'extendedData' not in infos

[+] 1 account found !

------------------------------

...

Traceback (most recent call last):
  File "hunt.py", line 79, in <module>
    isBot = infos["extendedData"]["hangoutsExtendedData"]["isBot"]
KeyError: 'extendedData'

list index out of range

Got this one:

Traceback (most recent call last):
File "hunt.py", line 97, in
data = ytb.get_channels(client, name, cfg)
File "/home/osint/GHunt/lib/youtube.py", line 64, in get_channels
from_youtube = youtube_channel_search(client, query)
File "/home/osint/GHunt/lib/youtube.py", line 15, in youtube_channel_search
data = json.loads(source.split('window["ytInitialData"] = ')[1].split('window["ytInitialPlayerResponse"]')[0].split(';\n')[0])
IndexError: list index out of range

could you fix it?

Seleniumwire fail in proxy?

When run sudo python3 hunt.py *@gmail.com or python3 hunt.py *@gmail.com i got error after "Google Photos : https:// "

Error making requestPhotos albums overview... Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/seleniumwire/proxy/proxy2.py", line 91, in proxy_request conn.request(self.command, path, req_body, dict(req.headers)) File "/usr/lib/python3.8/http/client.py", line 1255, in request self._send_request(method, url, body, headers, encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request self.endheaders(body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output self.send(msg) File "/usr/lib/python3.8/http/client.py", line 950, in send self.connect() File "/usr/local/lib/python3.8/dist-packages/seleniumwire/proxy/proxy2.py", line 368, in connect super().connect() File "/usr/lib/python3.8/http/client.py", line 1417, in connect super().connect() File "/usr/lib/python3.8/http/client.py", line 921, in connect self.sock = self._create_connection( File "/usr/lib/python3.8/socket.py", line 808, in create_connection raise err File "/usr/lib/python3.8/socket.py", line 796, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused ^CTraceback (most recent call last): File "hunt.py", line 119, in <module> gpics(gaiaID, client, cookies, cfg) File "/home/ubuntu/GHunt/lib/photos.py", line 105, in gpics results = re.compile(cfg["regexs"]["albums"]).findall(out["source"]) KeyboardInterrupt

My OS:
user@srv:~/GHunt$ uname -a Linux srv 5.4.0-48-generic #52-Ubuntu SMP Thu Sep 10 9:58:49 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

chrome crashed error __init__

I used sandboxed version of chrome & no sandbox version also.
when i tried this on Kali Linux 2020.3 i found the error mentioned below
The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => some-token-was-here:some-random-number
Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.8/site-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in init
RemoteWebDriver.init(
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

Chromedriver unexpectedly exited

  • Python: 3.6
  • Chrome Driver: 86.0.4240.22
[tobias@localhost GHunt]$ python3.6 check_and_gen.py
__Secure-3PSID => .....
APISID => ....
SAPISID => ....
HSID => ....

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => ....
Traceback (most recent call last):
  File "check_and_gen.py", line 77, in <module>
    driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
  File "/usr/local/lib/python3.6/site-packages/seleniumwire/webdriver/browser.py", line 86, in __init__
    super().__init__(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/chrome/webdriver.py", line 73, in __init__
    self.service.start()
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 98, in start
    self.assert_process_still_running()
  File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 111, in assert_process_still_running
    % (self.path, return_code)
selenium.common.exceptions.WebDriverException: Message: Service ./chromedriver unexpectedly exited. Status code was: 127

Type Error after generating the Google Docs Token

โ”Œโ”€[โœ—]โ”€[XYZ@parrot]โ”€[/opt/GHunt]
โ””โ”€โ”€โ•ผ $python3 check_and_gen.py
__Secure-3PSID => REDACTED
APISID => REDACTED
SAPISID => REDACTED
HSID => REDACTED

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => REDACTED
Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.8/dist-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
TypeError: init() got an unexpected keyword argument 'options'

โ”Œโ”€[โœ—]โ”€[XYZ@parrot]โ”€[/opt/GHunt]
โ””โ”€โ”€โ•ผ $python3 --version
Python 3.8.5

#After trying to run it with sudo, I got the Following Error:

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => REDACTED
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
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: 'chromedriver'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.8/dist-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
File "/usr/lib/python3/dist-packages/selenium/webdriver/chrome/webdriver.py", line 92, in init
self.service.start()
File "/usr/lib/python3/dist-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home

#I have the "chromedriver" executable in my current directory. And even added it to my PATH variable.

โ”Œโ”€[โœ—]โ”€[XYZ@parrot]โ”€[/opt/GHunt]
โ””โ”€โ”€โ•ผ $echo $PATH
/home/XYZ/.local/bin:/snap/bin:/usr/sandbox/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/share/games:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/GHunt/chromedriver

Chrome Start Error

Hi,

I got this error when I fill all cookies in check_and_gen.py

How I can fix this?

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => MyToken:1111111111111
Traceback (most recent call last):
File "check_and_gen.py", line 74, in
driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options)
File "/usr/local/lib/python3.7/site-packages/seleniumwire/webdriver/browser.py", line 86, in init
super().init(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 81, in init
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)

KeyError "village" in metadata stage of looking through Google Photos

During the search of metadata in Google Photos, the program will throw up a KeyError saying it can't find "village."

Traceback (most recent call last):
  File "hunt.py", line 114, in <module>
    gpics(gaiaID, client, cookies, cfg)
  File "C:\Users\<snip>\Downloads\GHunt-master\GHunt-master\lib\photos.py", line 134, in gpics
    exifeater.feed(img)
  File "C:\Users\<snip>\Downloads\GHunt-master\GHunt-master\lib\metadata.py", line 55, in feed
    location = self.get_GPS(img)
  File "C:\Users\<snip>\Downloads\GHunt-master\GHunt-master\lib\metadata.py", line 49, in get_GPS
    return f'{location["village"]}, {location["country"]}'
KeyError: 'village'

Poking through the code, I had it print out what the location was for the photos:

debug: {'amenity': '', 'road': '', 'city': 'Las Vegas', 'county': 'Clark County', 'state': 'Nevada', 'postcode': '<5 digit post code>', 'country': 'United States of America', 'country_code': 'us'}

debug: {'amenity': '', 'road': '', 'suburb': '', 'town': 'Paradise', 'county': 'Clark County', 'state': 'Nevada', 'postcode': '<5 digit post code>', 'country': 'United States of America', 'country_code': 'us'}

The classification of whether it's a city, village, town, or others depends on where the photo is taken. The code looks for the hardcoded "village" tag, can't find one cause the photo isnt taken in a village, and throws up a TypeError.

PermissionError: [Errno 13] Permission denied: 'resources/data.txt'

After this command sudo docker run -v $(pwd)/resources:/usr/src/app/resources -ti ghunt check_and_gen.py i got this error:

__Secure-3PSID => ******************************************
APISID => ******************************************
SAPISID => ******************************************
HSID => ******************************************

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token...

Google Docs Token => *****************************************
Authorization Token => *****************************************
Hangouts Token => ********************************************
Traceback (most recent call last):
  File "check_and_gen.py", line 96, in <module>
    with open(cfg['data_path'], 'w') as f:
PermissionError: [Errno 13] Permission denied: 'resources/data.txt'

Version not supported

Hey,
I'm on Windows 10
When I try to execute the command "python hunt.py [email protected]" on CMD, it doesn't give any output.
So I tried to execute hunt.py. It gives :
C:\Users\*****\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\__init__.py:89: RequestsDependencyWarning: urllib3 (1.25.10) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
And the python console closes itself.
I can't fix it myself. Can anyone Help me ?

chromedriver

Directory
/home/user/GHunt

Installed requirements and dependencies.
Operating System: Linux Ubuntu OS Subsystem --> Windows 10

Error:!
The chromedriver is missing.
Please put it in the GHunt directory.

image

Any tips to make it work with sublinux? I am guessing this could either be an issue with the headless browser or something else. Tried adding the tokens manually to the to data.txt file I create manually as it doesnt generate but need the right format to test.

Thoughts?

Unsupported Protocol

image
When I execute the file check_and_gen.py and I put the cookies values I have this error.

Better message for expired cookies in hunt mode

$ python hunt.py [email protected]
Invalid Gmail address.
$ python check_and_gen.py
[+] Detected stored cookies, checking it

[-] Seems like the cookies are invalid, try regenerating them.

I think it would be better to says something more explicit than "Invalid Gmail address."

Report more information for further analysing

Currently GHunt only reports which Google services were queried and which information was retrieved. Analogous to the output of the Google ID (gaia_id) it would be nice to output different Google IDs for further research.

One use would be e.g. #75 so that attempts could be made to get the data. And to be able to work more constructively on extensions by providing the information where to find additional data for GHunt.

Httpx Error on Debian10

after running this pip install httpx on Debian 10 (Buster) this error shown :
Collecting httpx[http2] Could not find a version that satisfies the requirement httpx[http2] (from versions: ) No matching distribution found for httpx[http2]

How to use with php ?

It is working Charm with Python Command on terminal but how to use it with php I tried with Execute Commands but it didn't work. Please Help me to install with webpage

"Contributions by" not in gmaps_source

[+] 1 account found !

------------------------------

Traceback (most recent call last):
  File "hunt.py", line 70, in <module>
    name = gmaps_source.split("Contributions by")[1].split('"')[0].strip()
IndexError: list index out of range

Error while retrieving photos in wait.until(element_has_substring_or_substring((By.XPATH, "//body")

With b1a2a56

Google Photos : XXX
Traceback (most recent call last):              
  File "hunt.py", line 114, in <module>
    gpics(gaiaID, client, cookies, cfg)
  File "/GHunt/lib/photos.py", line 97, in gpics
    out = get_source(gaiaID, client, cookies, cfg)
  File "/GHunt/lib/photos.py", line 82, in get_source
    result = wait.until(element_has_substring_or_substring((By.XPATH, "//body"), photos_trigger, no_photos_trigger))
  File "/home/xxx/.local/lib/python3.7/site-packages/selenium/webdriver/support/wait.py", line 80, in until
    raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message: 

No module named 'sniffio'

hi, I've problem, can you help?

python3 hunt.py -h
Traceback (most recent call last):
File "hunt.py", line 7, in
import httpx
File "/usr/local/lib/python3.8/dist-packages/httpx/init.py", line 2, in
from ._api import delete, get, head, options, patch, post, put, request, stream
File "/usr/local/lib/python3.8/dist-packages/httpx/_api.py", line 3, in
from ._client import Client, StreamContextManager
File "/usr/local/lib/python3.8/dist-packages/httpx/_client.py", line 7, in
import httpcore
File "/usr/local/lib/python3.8/dist-packages/httpcore/init.py", line 2, in
from ._async.connection_pool import AsyncConnectionPool
File "/usr/local/lib/python3.8/dist-packages/httpcore/_async/connection_pool.py", line 5, in
from .._backends.auto import AsyncLock, AsyncSemaphore
File "/usr/local/lib/python3.8/dist-packages/httpcore/_backends/auto.py", line 4, in
import sniffio
ModuleNotFoundError: No module named 'sniffio'

Problem when load coockies.

Hi, I have a problem loading cookies. I run check_and_gen.py and when it asks for each of the cookies I paste them without the quotes and when I enter the last one it gives me these errors.

========================================================
Traceback (most recent call last):
File "C: \ Python \ lib \ site-packages \ httpx \ _exceptions.py", line 339, in map_exceptions
yield
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 854, in _send_single_request
(status_code, headers, stream, ext) = transport.request (
File "C: \ Python \ lib \ site-packages \ httpcore \ _sync \ connection_pool.py", line 200, in request
response = connection.request (
File "C: \ Python \ lib \ site-packages \ httpcore \ _sync \ connection.py", line 100, in request
return self.connection.request (method, url, headers, stream, ext)
File "C: \ Python \ lib \ site-packages \ httpcore \ _sync \ http11.py", line 72, in request
) = self._receive_response (timeout)
File "C: \ Python \ lib \ site-packages \ httpcore \ _sync \ http11.py", line 133, in _receive_response
event = self._receive_event (timeout)
File "C: \ Python \ lib \ site-packages \ httpcore \ _sync \ http11.py", line 163, in _receive_event
data = self.socket.read (self.READ_NUM_BYTES, timeout)
File "C: \ Python \ lib \ site-packages \ httpcore \ _backends \ sync.py", line 62, in read
return self.sock.recv (n)
File "C: \ Python \ lib \ contextlib.py", line 131, in exit
self.gen.throw (type, value, traceback)
File "C: \ Python \ lib \ site-packages \ httpcore \ _exceptions.py", line 12, in map_exceptions
raise to_exc (exc) from None
httpcore.ReadTimeout: The read operation timed out

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

Traceback (most recent call last):
File "C: \ Python \ GHunt \ check_and_gen.py", line 38, in
req = httpx.get ("https://docs.google.com/document/u/0/?usp=direct_url", cookies = cookies, headers = headers,
File "C: \ Python \ lib \ site-packages \ httpx \ _api.py", line 181, in get
return request (
File "C: \ Python \ lib \ site-packages \ httpx \ _api.py", line 93, in request
return client.request (
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 721, in request
return self.send (
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 753, in send
response = self._send_handling_auth (
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 791, in _send_handling_auth
response = self._send_handling_redirects (
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 823, in _send_handling_redirects
response = self._send_single_request (request, timeout)
File "C: \ Python \ lib \ site-packages \ httpx \ _client.py", line 854, in _send_single_request
(status_code, headers, stream, ext) = transport.request (
File "C: \ Python \ lib \ contextlib.py", line 131, in exit
self.gen.throw (type, value, traceback)
File "C: \ Python \ lib \ site-packages \ httpx \ _exceptions.py", line 356, in map_exceptions
raise mapped_exc (message, ** kwargs) from exc # type: ignore
httpx.ReadTimeout: The read operation timed out

Have to go to GHunt directory to run hunt.py or check_and_gen.py

I set up GHunt by cloning this repo, copying chromedriver to GHunt directory and generating a working data.txt. After that, I made 2 aliases:

alias ghunt='python3 <path-to-hunt.py>'
alias ghunt-gen='python3 <path-to-check_and_gen.py>'

but these aliases won't work unless I call them in the GHunt directory, otherwise Ghunt would complain about missing chromedriver or cookies.

Maybe it would be a good idea if Ghunt can fallback to use config in a dedicated config dir like ~/.config/GHunt or the dir which hunt.py is located in?

Cannot find Chrome binary

[+] The cookies seems valid ! Generating the Google Docs and Hangouts token... Google Docs Token => AC4w5VhkP2mR4i2Ec4Wda-41iFSZ2W-zZQ:1602119868718 Traceback (most recent call last): File ".\check_and_gen.py", line 75, in driver = webdriver.Chrome(executable_path=driverpath, seleniumwire_options=options, options=chrome_options) File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\seleniumwire\webdriver\browser.py", line 86, in init super().init(*args, **kwargs) File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\chrome\webdriver.py", line 76, in init RemoteWebDriver.init( File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 157, in init self.start_session(capabilities, browser_profile) File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 252, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\whatever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

Extract profile photos from google accounts

Google profiles very often have a stored photo for a profile. It would be really great if GHunt could try to extract these profile photos or report the URLs found to the images (are there possibly different sizes?).

Google Maps Reviews for example have the profile name and the profile photo in the upper right corner. Maybe there are more sites that export profile pictures without having to find information about the user (YouTube channel, Maps Reviews, ...).

Unfortunately I have no idea in which screens there are photos available and which ones can be queried, because GHunt only exports found information and not debug information which sources were checked.

groupadd: GID '20' already exists

Hey!

I'm running the docker build command on Mac.
I have this error:

Step 7/13 : RUN groupadd -g ${GID} -r app && adduser --system --home /home/app --ingroup app --uid ${UID} app &&     chown -R app:app /usr/src/app &&     apt-get update &&     apt-get install -y curl unzip gnupg &&     curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list &&     apt-get update &&     apt-get install -y google-chrome-stable=${CHROME_VERSION} &&     rm -rf /var/lib/apt/lists/*
 ---> Running in 11057b3da1f4
groupadd: GID '20' already exists
The command '/bin/sh -c groupadd -g ${GID} -r app && adduser --system --home /home/app --ingroup app --uid ${UID} app &&     chown -R app:app /usr/src/app &&     apt-get update &&     apt-get install -y curl unzip gnupg &&     curl -sS -o - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&     echo "deb [arch=amd64]  http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list &&     apt-get update &&     apt-get install -y google-chrome-stable=${CHROME_VERSION} &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 4

FYI: the USER variable is set

KeyError: 'twoColumnSearchResultsRenderer'

On calling python3 hunt.py [email protected] :

Unable to fetch connected Google services.
Traceback (most recent call last):
  File "hunt.py", line 97, in <module>
    data = ytb.get_channels(client, name, cfg)
  File "/home/andreas/Desktop/GHunt/lib/youtube.py", line 64, in get_channels
    from_youtube = youtube_channel_search(client, query)
  File "/home/andreas/Desktop/GHunt/lib/youtube.py", line 16, in youtube_channel_search
    channels = data["contents"]["twoColumnSearchResultsRenderer"]["primaryContents"]["sectionListRenderer"]["contents"][0]["itemSectionRenderer"]["contents"]
KeyError: 'twoColumnSearchResultsRenderer'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.