### Install and Use Maigret with Docker Source: https://maigret.readthedocs.io/en/latest/installation Provides instructions for using the official Maigret Docker image, including pulling the latest development version and running it with a specified username and output options. Also includes steps for manually building the Docker image. ```shell # official image of the development version, updated from the github repo docker pull soxoj/maigret # usage docker run -v /mydir:/app/reports soxoj/maigret:latest username --html # manual build docker build -t maigret . ``` -------------------------------- ### Install Maigret Development Version from GitHub Source: https://maigret.readthedocs.io/en/latest/installation Installs the latest development version of Maigret directly from its GitHub repository. This method is recommended for the most up-to-date features and bug fixes. It supports installation via pip with and without poetry. ```shell git clone https://github.com/soxoj/maigret && cd maigret pip3 install . # OR pip3 install git+https://github.com/soxoj/maigret.git # usage maigret username # OR use poetry in case you plan to develop Maigret pip3 install poetry poetry run maigret ``` -------------------------------- ### Install Maigret from PyPI Source: https://maigret.readthedocs.io/en/latest/installation Installs the Maigret package from the Python Package Index (PyPI) using pip. Requires Python 3.10 or higher. The 'username' argument is used for basic usage after installation. ```shell # install from pypi pip3 install maigret # usage maigret username ``` -------------------------------- ### Install Maigret Development Version from GitHub Source: https://maigret.readthedocs.io/en/latest/_sources/installation.rst Installs the latest development version of Maigret directly from its GitHub repository. This method ensures you have the most up-to-date code. It can be done by cloning the repository and installing locally, or directly via pip. Poetry can be used for development. ```bash git clone https://github.com/soxoj/maigret && cd maigret pip3 install . # OR pip3 install git+https://github.com/soxoj/maigret.git # usage maigret username # OR use poetry in case you plan to develop Maigret pip3 install poetry poetry run maigret ``` -------------------------------- ### Run Maigret using Docker Source: https://maigret.readthedocs.io/en/latest/_sources/installation.rst Provides instructions for using Maigret via Docker. This includes pulling the official development image and running it with a volume mount for reports. It also covers building the Docker image manually from the repository. ```bash # official image of the development version, updated from the github repo docker pull soxoj/maigret # usage docker run -v /mydir:/app/reports soxoj/maigret:latest username --html # manual build docker build -t maigret . ``` -------------------------------- ### Install Maigret from PyPI using pip Source: https://maigret.readthedocs.io/en/latest/_sources/installation.rst Installs the Maigret package from the Python Package Index (PyPI) using pip. Requires Python 3.10+ and pip. This method may use an outdated sites database, potentially leading to false positives. Usage involves running 'maigret username' after installation. ```bash # install from pypi pip3 install maigret # usage maigret username ``` -------------------------------- ### Install Development Requirements with Poetry Source: https://maigret.readthedocs.io/en/latest/development Installs project dependencies including development tools using Poetry. This command is essential for setting up the local development environment. ```bash poetry install --with dev ``` -------------------------------- ### Example Site Configuration in JSON Source: https://maigret.readthedocs.io/en/latest/_sources/development.rst Illustrates a site's configuration within Maigret's data.json file. It includes tags, custom headers for authentication, and an activation mechanism with a specific URL, marks, and method. ```json { "Vimeo": { "tags": [ "us", "video" ], "headers": { "Authorization": "jwt eyJ0..." }, "activation": { "url": "https://vimeo.com/_rv/viewer", "marks": [ "Something strange occurred. Please get in touch with the app's creator." ], "method": "vimeo" }, "urlProbe": "https://api.vimeo.com/users/{username}?fields=name..." } } ``` -------------------------------- ### Maigret CLI: Search by Custom Tags Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username on sites associated with custom tags, like 'ucoz', which might represent specific platforms or user groups, often related to CIS countries in this example. ```console maigret machine42 --tags ucoz ``` -------------------------------- ### Maigret CLI: Generate HTML and PDF Reports Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username and generates both HTML and PDF reports of the findings. This allows for easy sharing and documentation of the search results. ```console maigret machine42 -HP ``` ```console maigret machine42 -a --html --pdf ``` -------------------------------- ### Maigret CLI: Search on Specific Site Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username on a single, specified website, such as Facebook. This is useful for targeted investigations. ```console maigret machine42 --site Facebook ``` -------------------------------- ### Maigret CLI: Search by Content Tags Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username on sites categorized under specific content tags, such as 'coding' for software development related platforms. This helps in finding accounts on niche websites. ```console maigret machine42 --tags coding ``` -------------------------------- ### Build Documentation Locally Source: https://maigret.readthedocs.io/en/latest/development These commands outline the process for manually updating and building the project's documentation. It involves making changes to reStructuredText files, installing dependencies, and running the Sphinx build command. ```bash pip install -r requirements.txt make singlehtml ``` -------------------------------- ### Run Maigret with Web Interface Source: https://maigret.readthedocs.io/en/latest/features Starts Maigret with a web interface, allowing users to view search results, graphs, and download reports. Requires specifying a port number. Accessible via a web browser. ```bash maigret --web 5000 ``` -------------------------------- ### Maigret CLI: Search on All Sites Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username across all websites included in the Maigret database. This option can yield more results but may also increase the chance of false positives. ```console maigret machine42 -a ``` -------------------------------- ### Maigret CLI: Search on Top Sites Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username on the top 500 most popular websites, as ranked by Alexa. This is the default behavior of the Maigret command-line tool. ```console maigret machine42 ``` -------------------------------- ### Maigret CLI: Search by Geographic Tags Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Searches for accounts with a given username on sites tagged with specific geographic regions, such as 'us' for United States or 'jp' for Japan. This allows for region-specific searches. ```console maigret machine42 --tags us,jp ``` -------------------------------- ### Maigret CLI: Parse URL and Search Source: https://maigret.readthedocs.io/en/latest/_sources/usage-examples.rst Extracts a username from a given profile URL (e.g., a Steam profile) and then initiates a search for that extracted username across the Maigret database. This automates the process of finding accounts from a profile link. ```console maigret --parse https://steamcommunity.com/profiles/76561199113454789 ``` -------------------------------- ### Vimeo Site Check Record Example Source: https://maigret.readthedocs.io/en/latest/development This JSON object represents the configuration for checking the Vimeo website. It includes tags, authentication headers, activation settings, URL probes, and username claim details. The 'activation' field specifies the URL, expected marks, and method for handling token expiration. ```json { "Vimeo": { "tags": [ "us", "video" ], "headers": { "Authorization": "jwt eyJ0..." }, "activation": { "url": "https://vimeo.com/_rv/viewer", "marks": [ "Something strange occurred. Please get in touch with the app's creator." ], "method": "vimeo" }, "urlProbe": "https://api.vimeo.com/users/{username}?fields=name...", "checkType": "status_code", "alexaRank": 148, "urlMain": "https://vimeo.com/", "url": "https://vimeo.com/{username}", "usernameClaimed": "blue", "usernameUnclaimed": "noonewouldeverusethis7" } } ``` -------------------------------- ### Vimeo JWT Token Activation Function Source: https://maigret.readthedocs.io/en/latest/development This Python function handles the Vimeo JWT token activation. It retrieves a new JWT token by making a GET request to the activation URL and updates the site's headers with the new token. Dependencies include the 'requests' library. ```python def vimeo(site, logger, cookies={}): headers = dict(site.headers) if "Authorization" in headers: del headers["Authorization"] import requests r = requests.get(site.activation["url"], headers=headers) jwt_token = r.json()["jwt"] site.headers["Authorization"] = "jwt " + jwt_token ``` -------------------------------- ### Integrate Maigret with Python Source: https://maigret.readthedocs.io/en/latest/features Illustrates how Maigret can be integrated into other applications using its Python package. This example points to the official Telegram bot as a reference for integration, suggesting that custom Python scripts can leverage Maigret's functionalities. ```python # Example usage (conceptual, refer to bot for specifics) # from maigret.api import Maigret # # m = Maigret() # results = m.search('username') # print(results) ``` -------------------------------- ### Extract Information from Steam Community URL using Maigret Source: https://maigret.readthedocs.io/en/latest/features Shows how to use the Maigret CLI to parse a Steam Community profile URL and extract user information like Steam ID, nickname, and username. This command assumes Maigret is installed and available in the system's PATH. ```bash maigret.py --parse https://steamcommunity.com/profiles/76561199113454789 Scanning webpage by URL https://steamcommunity.com/profiles/76561199113454789... ┣╸steam_id: 76561199113454789 ┣╸nickname: Pok ┗╸username: Machine42 ``` -------------------------------- ### Extract Information from Google Sheets URL using Maigret Source: https://maigret.readthedocs.io/en/latest/features Demonstrates how to use the Maigret CLI to parse a Google Sheets URL and extract information such as organization name, MIME type, creation and update timestamps, user's full name, email, and username. This requires the Maigret tool to be installed and accessible from the command line. ```bash maigret --parse https://docs.google.com/spreadsheets/d/1HtZKMLRXNsZ0HjtBmo0Gi03nUPiJIA4CC4jTYbCAnXw/edit#gid=0 Scanning webpage by URL https://docs.google.com/spreadsheets/d/1HtZKMLRXNsZ0HjtBmo0Gi03nUPiJIA4CC4jTYbCAnXw/edit#gid=0... ┣╸org_name: Gooten ┗╸mime_type: application/vnd.google-apps.ritz Scanning webpage by URL https://clients6.google.com/drive/v2beta/files/1HtZKMLRXNsZ0HjtBmo0Gi03nUPiJIA4CC4jTYbCAnXw?fields=alternateLink%2CcopyRequiresWriterPermission%2CcreatedDate%2Cdescription%2CdriveId%2CfileSize%2CiconLink%2Cid%2Clabels(starred%2C%20trashed)%2ClastViewedByMeDate%2CmodifiedDate%2Cshared%2CteamDriveId%2CuserPermission(id%2Cname%2CemailAddress%2Cdomain%2Crole%2CadditionalRoles%2CphotoLink%2Ctype%2CwithLink)%2Cpermissions(id%2Cname%2CemailAddress%2Cdomain%2Crole%2CadditionalRoles%2CphotoLink%2Ctype%2CwithLink)%2Cparents(id)%2Ccapabilities(canMoveItemWithinDrive%2CcanMoveItemOutOfDrive%2CcanMoveItemOutOfTeamDrive%2CcanAddChildren%2CcanEdit%2CcanDownload%2CcanComment%2CcanMoveChildrenWithinDrive%2CcanRename%2CcanRemoveChildren%2CcanMoveItemIntoTeamDrive)%2Ckind&supportsTeamDrives=true&enforceSingleParent=true&key=AIzaSyC1eQ1xj69IdTMeii5r7brs3R90eck-m7k... ┣╸created_at: 2016-02-16T18:51:52.021Z ┣╸updated_at: 2019-10-23T17:15:47.157Z ┣╸gaia_id: 15696155517366416778 ┣╸fullname: Nadia Burgess ┣╸email: nadia@gooten.com ┣╸image: https://lh3.googleusercontent.com/a-/AOh14GheZe1CyNa3NeJInWAl70qkip4oJ7qLsD8vDy6X=s64 ┗╸email_username: nadia ``` -------------------------------- ### Generate Import Flamegraph Source: https://maigret.readthedocs.io/en/latest/development Creates a flamegraph visualization of the project's imports to help estimate and optimize startup time. ```bash make speed ``` -------------------------------- ### Open HTML Coverage Report Source: https://maigret.readthedocs.io/en/latest/development Opens the generated HTML coverage report in the default web browser, allowing for detailed analysis of test coverage. ```bash open htmlcov/index.html ``` -------------------------------- ### Submit Account URL for Automatic Check Detection Source: https://maigret.readthedocs.io/en/latest/development Uses the Maigret CLI to automatically detect and suggest keywords for checking an account's presence on a given site. This is useful for fixing false positives. ```bash maigret --submit https://my.mail.ru/bk/alex ``` -------------------------------- ### Run Tests and Generate Coverage Report Source: https://maigret.readthedocs.io/en/latest/development Executes all project tests and generates an HTML coverage report, indicating the percentage of code exercised by the tests. The current coverage is 58%. ```bash make test ``` -------------------------------- ### Format Code with Black Source: https://maigret.readthedocs.io/en/latest/development Applies the Black code formatter to the project to ensure consistent code style across the entire codebase. ```bash make format ``` -------------------------------- ### Add and Commit Changes Source: https://maigret.readthedocs.io/en/latest/development These Git commands are used to stage specific changes and commit them with a descriptive message. This is part of the process for preparing a new project version for release. ```bash git add -p git commit -m 'Bump to YOUR VERSION' ``` -------------------------------- ### Committing and Pushing Changes Source: https://maigret.readthedocs.io/en/latest/_sources/development.rst These console commands are used to stage changes, commit them with a descriptive message, and push the changes to the remote repository. This is part of the workflow for updating the project, including version bumps and documentation changes. ```bash git add -p git commit -m 'Bump to YOUR VERSION' git push origin head ``` -------------------------------- ### Maigret Settings File Locations Source: https://maigret.readthedocs.io/en/latest/settings This snippet shows the order in which Maigret attempts to load configuration settings from JSON files. It searches for 'settings.json' in relative and absolute paths. Overrides are possible as later files can rewrite options from earlier ones. ```plaintext # relative path, based on installed package path resources/settings.json # absolute path, configuration file in home directory ~/.maigret/settings.json # relative path, based on current working directory settings.json ``` -------------------------------- ### Create New Git Branch Source: https://maigret.readthedocs.io/en/latest/development This command demonstrates how to create a new local Git branch for a new version of the project. It is a prerequisite for updating the project and publishing a new release. ```bash git checkout -b 0.4.0 ``` -------------------------------- ### Maigret CLI Search and Personal Info Extraction Source: https://maigret.readthedocs.io/en/latest/features Demonstrates running Maigret from the command line to search for a username and extract personal information. Displays results directly in the CLI and can be disabled with `--no-extracting`. ```python python3 -m maigret soxoj --timeout 5 ``` -------------------------------- ### Configure Git Hooks for Statistics Update Source: https://maigret.readthedocs.io/en/latest/development Sets up a local Git configuration to automatically activate the statistics update hook when making commits. Ensure commits are made from the maigret git repo folder for the hook to function correctly. ```bash git config --local core.hooksPath .githooks/ ``` -------------------------------- ### Run Linters and Typing Checks Source: https://maigret.readthedocs.io/en/latest/development Executes a series of checks including critical syntax error detection, Flake8 linting, and MyPy type checking to ensure code quality and correctness. ```bash make lint ``` -------------------------------- ### Debug Site Check Method with Response HTML Source: https://maigret.readthedocs.io/en/latest/development Debugs the checking mechanism for a specific site by capturing the response HTML to standard error. This helps in understanding why a check might be failing or producing incorrect results. ```bash maigret soxoj --site My.Mail.ru@bk.ru -d 2> response.txt ``` -------------------------------- ### Maigret Username Permutation Generation Source: https://maigret.readthedocs.io/en/latest/features Shows how to use Maigret to generate and search for username permutations. The `--permute` flag allows specifying multiple base usernames for generating variations. ```python python3 -m maigret --permute hope dream --timeout 5 ``` -------------------------------- ### Push Changes to Remote Source: https://maigret.readthedocs.io/en/latest/development This command pushes the locally committed changes to the remote repository's current branch. It is necessary before creating a pull request for merging. ```bash git push origin head ``` -------------------------------- ### Self-Check and Disable Site Checking Source: https://maigret.readthedocs.io/en/latest/development Performs a self-check on a specific site and disables its checking mechanism. This can be used to exclude problematic sites or sites that no longer function as expected. ```bash maigret --self-check --site My.Mail.ru@bk.ru ```