Skip to content
This repository has been archived by the owner on Sep 7, 2024. It is now read-only.

Demonstration: CLI

Alb-310 edited this page Jan 14, 2023 · 1 revision

Contents

  1. Configure Geogramint
    1. Telegram's API
    2. Account settings
  2. Explanation of all commands
  3. Begin a scan
  4. Explanation of the results
    1. On the interface
    2. In the files
  5. PDF Reports

Configure Geogramint

Once Geogramint is installed, you will need to configure a few things before you can start using it. You will need a Telegram account. If you don't have one, create one first and then come back to us.

Telegram's API

To use Geogramint, you will need to obtain the API hash and API id linked to your account. Open my.telegram.org

Log in using the phone number linked to your account, then go to API development tools. Once you configured your "App", you will have access to the api_id and api_hash.

Back to Geogramint, now use the command set-config to fill all required informations.

Set the Extended Report option to your preference : if enabled, all detected entities will be displayed on the PDF reports, otherwise only detected entities up to 2000m radius.

Account settings

In order to use Geogramint, you will need to put a profile picture on your Telegram account and change some privacy settings. With Tejado's Telegram Nearby Map, we didn't have to make all of these changes, but Telegram has since made changes to its API. Perhaps they realized that some people who were practicing osint were using its Nearby feature for purposes other than its primary function.

After choosing a profile picture, go to Settings->Privacy and Security and enable Profile Photo to everybody.

Let's go back to Geogramint

Explanation of all commands

There is not many commands in Geogramint, everything is simple:

image

  • set-config: you should have already used it in the previous part, it is the button that allows you to set the configuration of Geogramint.
  • set-hash: allows you to modify the api_hash in your settings.
  • set-id: allows you to modify the api_id in your settings.
  • set-phone: allows you to modify the phone number in your settings.
  • set-report-settings: allows you to modify your report preference.
  • start-scan: it's the scan feature. ⚠️ To enter a negative latitude or longitude you must enclose the number in quotation marks and a space: " -40.21312"

image

  • reset-scan: executing this command will delete all the profile pictures downloaded to Geogramint/cache_telegram/users/ and Geogramint/cache_telegram/groups/.

Begin a scan

We will start by running a scan with the coordinates of Nicosia in Cyprus 35.174655830253165, 33.36142587267438.

If it's your first try, Geogramint will ask you for the phone number linked to your account and then your confirmation code.

Explanation of the results

On the interface

For all users in the area, Geogramint will display in your terminal Id, First Name, Last Name, Username, phone number and Distance. Some of those information may not be available due to the privacy settings of the user.

For groups in the area, Geogramint will display in your terminal the Id, Name and Distance. Some of those information may not be available due to the privacy settings of the group.

The users and groups in green were located within a radius of 500m around the point of origin. Those in yellow were located within a radius of 1km, and those in orange within 2km radius. Those in red, they were located within a radius of 3km or more around the point of origin.

In the files

Geogramint provides more details from a scan in Geogramint/cache_telegram/ (or in another place) depending on the options used with the start-scan command.

  • All detected users are available in Geogramint/cache_telegram/users.json and Geogramint/cache_telegram/users.csv, each user has his id, First name, Last name, Phone number and distance if available. For searches in countries with non-Latin alphabets, it is recommended to check the json or csv output in UTF-8 to get the correct spelling of the names.
  • All detected groups are available in Geogramint/cache_telegram/groups.json and Geogramint/cache_telegram/groups.csv, each group has his id, name and distance if available. For searches in countries with non-Latin alphabets, it is recommended to check the json or csv output in UTF-8 to get the correct spelling of the names.
  • All profile pictures of users and groups are available in Geogramint/cache_telegram/users/ and Geogramint/cache_telegram/groups/. They are named by the id of their corresponding user or group.

PDF Reports

Since v1.2, Geogramint allows to export the results as a pdf report :

By using the option --output-pdf, you will export the results in a pdf report format. In the pdf report, you will find all the data acquired by Geogramint. Depending on your settings, users whose location is >3000m will be displayed or not.