Intelligence X SDK

repository·master·Indexed 19 days ago

https://github.com/intelligencex/sdk

A public SDK providing programmatic access to the Intelligence X search engine and data archive. It includes a Python library and CLI utility (intelx.py) for OSINT tasks, a Go client (ixapi), and manual installation guides for Maltego transforms and entities. The SDK supports searching, retrieving results, downloading files, and exporting data from intelx.io.

Tokens
24.1K
Snippets
90
Records
117
Agent score
68%

What's inside intelligencex-sdk

  1. Understand API rate limits and credits

    master

    Intelligence X uses a credit-based system and rate limiting to manage API usage:

    • Rate Limit: Unless specified otherwise in your license, do not exceed 1 request per second.
    • Credits: Usage is tracked as "credits per day per function". Credits reset at midnight UTC.
    • Error Codes:
      • 401 Unauthorized: Your API key does not have access to the requested function.
      • 402 Payment Required: You have exhausted your daily credits for that function.
    • Timeouts: Technical limitations and timeouts vary by API instance and license agreement.
  2. Understand Buckets and Items

    master

    The Intelligence X data is organized into a hierarchy:

    • Buckets: Data categories (e.g., darknet.tor, web.public). If your license grants access to a bucket like web, you automatically have access to all sub-buckets (e.g., web.public.kp).
    • Items: Individual results within a bucket. Each item is uniquely identified by a System ID (a UUID). For example, different historical copies of the same website are treated as distinct items with different System IDs.
  3. Update Intelligence X Maltego Transforms

    master

    There is currently no automatic update feature for the Maltego transforms. To update to a newer version:

    1. Remove the existing transforms and entities from Maltego using the uninstallation steps.
    2. Remove the existing transform bindings.
    3. Re-run the manual installation process.
  4. Uninstall Intelligence X Maltego Transforms and Entities

    master

    To completely remove Intelligence X components from Maltego, follow these steps:

    1. Remove Entities

    Navigate to Entities > Manage Entities, search for "intelx", and click the "X" icon next to each entity to remove them.

    2. Remove Transforms

    Navigate to Transforms > Transform Manager, search for "Intelligence", select all relevant transforms, right-click, and select Delete.

    3. Cleanup Files

    Delete the intelx-maltego directory from your local file system.

    Note: Alternatively, you can perform a Maltego factory reset to remove all entities and transforms automatically.

  5. Use intelx as a Python library

    master

    To integrate Intelligence X into your Python project, import the intelx class from intelxapi. If no API key is provided, it defaults to the public API (which has limited functionality).

    from intelxapi import intelx
    
    # Initialize with your API key
    client = intelx('00000000-0000-0000-0000-000000000000')
    
    # Perform a search
    results = client.search('hackerone.com')
  6. Install Intelligence X Maltego Transforms manually

    master

    Since the Intelligence X transforms are not currently in the Transform Hub marketplace, you must perform a manual installation. This process involves setting up the Python environment, copying the transform files, installing dependencies, and running an installation script to generate a configuration file.

    Prerequisites

    • Python: version 3 or higher.
    • Intelligence X API Key: Obtainable from intelx.io.
    • intelx Python Package: Must be installed in your Python environment.
    • maltego-trx: This will be installed automatically during the process.

    Installation Steps

    1. Prepare the Python environment: Clone the SDK and install the intelx package:

      git clone https://github.com/IntelligenceX/SDK
      pip install ./SDK/Python
    2. Setup the directory and dependencies (Windows example): Create a directory (ensure no whitespaces in the path, except for the Python executable path) and copy the transform files:

      mkdir C:\intelx-maltego
      xcopy /E "./SDK/Maltego Transform" C:\intelx-maltego\
      cd C:\intelx-maltego
      pip install -r requirements.txt
    3. Run the installation script: Execute install.py and follow the prompts to provide your Python executable path and your Intelligence X API Key:

      C:\intelx-maltego>python install.py

      The script will generate a configuration file named intelx.mtz (e.g., C:\intelx-maltego/intelx.mtz).

    4. Import into Maltego: In Maltego, navigate to Maltego > Import / Export > Import Config and select the generated intelx.mtz file.

    git clone https://github.com/IntelligenceX/SDK
    pip install ./SDK/Python
    
    mkdir C:\intelx-maltego
    xcopy /E "./SDK/Maltego Transform" C:\intelx-maltego\
    cd C:\intelx-maltego
    pip install -r requirements.txt
    python install.py
  7. Use intelx.py CLI for quick searches

    master

    The intelx.py command-line utility allows for rapid OSINT tasks.

    Common Commands:

    • Basic Search: intelx.py -search <query>
    • Search in specific buckets: intelx.py -search <query> -buckets "pastes, darknet.tor"
    • Limit results: intelx.py -search <query> -limit 100
    • View specific item: intelx.py -search <item_id> --view
    • Export search results: intelx.py -search <query> --exportfromsearch --exportfileformat <format_id>
    • Download files: Use -download <item_id> -bucket <bucket_name> -name <filename> to stream raw bytes (e.g., PDFs, ZIPs).
    • Identity Portal:
      • Export accounts: intelx.py -identity <domain> --exportaccounts
      • Data leaks: intelx.py -identity <domain> --dataleaks
    # Example: Download a specific item
    intelx.py -download 29a97791-1138-40b3-8cf1-de1764e9d09c -bucket leaks.private.general -name test.txt
    
    # Example: Export search results
    intelx.py -search email@email.com --exportfromsearch --exportfileformat 1 -limit 5 -buckets "pastes,leaks.private.general, leaks.logs, whois, usenet"
  8. Use Intelligence X via direct URL search

    master

    If you do not wish to use the API/SDK, you can perform searches by constructing a direct URL to the Intelligence X website using the s query parameter.

    URL Format: https://intelx.io/?s=[search term]

    Examples:

    • https://intelx.io/?s=test.com
    • https://intelx.io/?s=test@example.com
    https://intelx.io/?s=test.com
    https://intelx.io/?s=test@example.com