Skip to main content

How to Create Preset Profile Templates with Python

If you're automating website investigations, you probably want your profiles ready to roll immediately – without the hassle of manually selecting an Indigo proxy and importing cookies. Good news: we’ve got a script for that! 🛠️🔥

Why use preset profile templates?

This handy script automates the entire process for you. Here’s what it does:

  • Get an Indigo proxy through the API
  • Create a profile through the API
  • Import cookies into the profile
  • Repeat the process, if needed
Known Issue

There is a known UI bug when creating profiles with an Indigo proxy in API: proxy details will appear at the Custom tab. Keep this in mind! 🚨

Customize the script

  1. Extract the contents from profile_template.zip into your local folder.

  2. Open the file (.env) with any text editor.

  3. Customize the values in your .env file:

    • AUTHORIZATION_TOKEN: your Indigo access token
    • PROXY_TYPE: http or socks5
    • BROWSER_TYPE: mimic or stealthfox
    • PROXY_COUNTRY: Use the 2-digit convention (e.g., us, gb). You can find a list of country codes here.
    • FOLDER_ID: Your Indigo folder ID
    • RANGE_START: First number of profile to be created (used in the profile name)
    • RANGE_END: Last number of profile to be created
    • COOKIE_TYPE: google, ebay, etsy, bing, mixed, facebook, amazon, or other

    Example .env configuration:

    AUTHORIZATION_TOKEN = <your token string>

    # socks5 or http
    PROXY_TYPE = socks5

    # mimic or stealthfox
    BROWSER_TYPE = mimic

    # Indigo proxy country
    PROXY_COUNTRY = us

    FOLDER_ID = <your profile folder ID>

    # number of profiles to be created. Will be used in the profile name
    RANGE_START = 1
    RANGE_END = 6

    COOKIE_TYPE = amazon
    # list of cookie types: ['google','ebay','etsy','bing','mixed','facebook','amazon']

Run the script

Prerequisites

Make sure your Indigo agent is running before starting the script.

  1. Ensure your agent is running.
  2. Open the command prompt (Windows) or Terminal (macOS).
  3. Locate the folder where you extracted the files.
  4. Run the script using Python:
    python profile_template.py

The script will loop through and create multiple profiles if needed. Easy, right? 😎

This is an example of a successful output:

Successful Output Example

Troubleshooting

If you run into any issues, double-check the .env settings and your token, as it might have expired.