Convert Figma logo to code with AI

Datalux logoOsintgram

Osintgram is a OSINT tool on Instagram. It offers an interactive shell to perform analysis on Instagram account of any users by its nickname

9,456
2,058
9,456
679

Top Related Projects

15,468

🕵️‍♂️ Offensive Google framework.

57,727

Hunt down social media accounts by username across social networks

E-mails, subdomains and names Harvester - OSINT

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

8,049

People tracker on the Internet: OSINT analysis and research tool by Jose Pino

Stalk your Friends. Find their Instagram, FB and Twitter Profiles using Image Recognition and Reverse Image Search.

Quick Overview

Osintgram is an OSINT (Open Source Intelligence) tool focused on gathering information from Instagram accounts. It provides a command-line interface to extract various data points from public Instagram profiles, including followers, following, posts, and more. The tool is designed for security researchers and ethical hackers to perform reconnaissance on Instagram users.

Pros

  • Comprehensive data extraction from Instagram profiles
  • Command-line interface for easy automation and integration
  • Supports multiple data points and analysis options
  • Active development and community support

Cons

  • Potential for misuse in unethical or illegal activities
  • Relies on Instagram's API, which may change and break functionality
  • Limited to public profiles and data accessible without authentication
  • May violate Instagram's terms of service if used improperly

Code Examples

# Initialize Osintgram with a target username
osintgram = Osintgram("target_username")

# Get basic information about the target account
info = osintgram.get_info()
print(info)
# Retrieve the last 50 posts from the target account
posts = osintgram.get_posts(50)
for post in posts:
    print(post['caption'])
# Get a list of followers (limited to 100 for this example)
followers = osintgram.get_followers(100)
for follower in followers:
    print(follower['username'])

Getting Started

  1. Clone the repository:

    git clone https://github.com/Datalux/Osintgram.git
    
  2. Install dependencies:

    cd Osintgram
    pip install -r requirements.txt
    
  3. Set up Instagram credentials in config/credentials.ini:

    username = your_instagram_username
    password = your_instagram_password
    
  4. Run Osintgram:

    python3 main.py <target_username>
    
  5. Use the interactive prompt to select desired commands and extract information.

Competitor Comparisons

15,468

🕵️‍♂️ Offensive Google framework.

Pros of GHunt

  • Focuses specifically on Google account OSINT, providing more in-depth information for Google-related targets
  • Offers a command-line interface, which can be more efficient for experienced users
  • Includes features like Google Maps timeline analysis and Google Photos metadata extraction

Cons of GHunt

  • Limited to Google accounts, while Osintgram covers Instagram profiles
  • Requires more technical setup, including Docker and specific dependencies
  • May have a steeper learning curve for users unfamiliar with command-line tools

Code Comparison

GHunt (Python):

def check_and_gen_values(self, cookies, client):
    self.gaia_id = self.get_gaia_id(cookies)
    self.calendar_url = self.get_calendar_url(client)
    self.user_channel_id = self.get_user_channel_id(client)

Osintgram (Python):

def get_user_info(self):
    user = self.api.user_info(self.target)
    if 'user' in user:
        return user['user']
    return None

Both projects use Python, but GHunt's code is more focused on Google-specific data extraction, while Osintgram's code is tailored for Instagram API interactions. GHunt's code snippet shows more complex data retrieval methods, reflecting its specialized nature for Google account analysis.

57,727

Hunt down social media accounts by username across social networks

Pros of Sherlock

  • Supports a vast number of websites (350+) for username searches
  • Active development with frequent updates and contributions
  • Cross-platform compatibility (Windows, macOS, Linux)

Cons of Sherlock

  • Limited to username searches only
  • Lacks advanced features for in-depth analysis of user profiles
  • May produce false positives in some cases

Code Comparison

Sherlock (Python):

def sherlock(username):
    for site in sites:
        results = make_request(site, username)
        if results['valid']:
            print(f"Found on {site}: {results['url']}")

Osintgram (Python):

def get_user_info(username):
    api = Client()
    user = api.username_info(username)
    return user['user']

Sherlock focuses on broad username searches across multiple platforms, while Osintgram specializes in deep Instagram analysis. Sherlock's code demonstrates its multi-site approach, whereas Osintgram's code shows its Instagram-specific API usage. Sherlock is more suitable for initial OSINT reconnaissance, while Osintgram provides detailed Instagram user profiling capabilities.

E-mails, subdomains and names Harvester - OSINT

Pros of theHarvester

  • Broader scope: Gathers information from multiple sources beyond social media
  • More versatile: Can be used for various OSINT tasks, not limited to a single platform
  • Active development: Regular updates and contributions from the community

Cons of theHarvester

  • Less specialized: May not provide as detailed Instagram-specific information
  • More complex setup: Requires more configuration and dependencies
  • Steeper learning curve: May be less user-friendly for beginners

Code Comparison

Osintgram:

def printPost(self):
    user_id = self.api.username_id
    results = self.api.user_feed(user_id)
    for post in results.get('items', []):
        print(post.get('caption', {}).get('text', ''))

theHarvester:

def do_search(self):
    self.totalresults += self.search()
    return self.totalresults

The code snippets show that Osintgram is more focused on Instagram-specific functionality, while theHarvester has a more generic approach to information gathering. Osintgram's code directly interacts with Instagram's API, whereas theHarvester's code is designed to be extensible for various search modules.

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Pros of Spiderfoot

  • Broader scope: Supports multiple data sources and OSINT techniques beyond just Instagram
  • More extensive features: Includes web scraping, DNS analysis, and various API integrations
  • Active development: Regularly updated with new features and improvements

Cons of Spiderfoot

  • Steeper learning curve: More complex to set up and use due to its extensive feature set
  • Resource-intensive: Can require significant system resources for large-scale scans
  • Less focused: Not specialized for Instagram-specific OSINT like Osintgram

Code Comparison

Osintgram (Python):

def getLocationID(self, location):
    url = f"https://www.instagram.com/web/search/topsearch/?context=place&query={location}"
    response = self.__req.get(url)
    jsonData = json.loads(response.text)
    return jsonData["places"][0]["place"]["location"]["pk"]

Spiderfoot (Python):

def handleEvent(self, event):
    eventName = event.eventType
    srcModuleName = event.module
    eventData = event.data
    if eventData in self.results:
        return
    self.results[eventData] = True
8,049

People tracker on the Internet: OSINT analysis and research tool by Jose Pino

Pros of trape

  • Broader scope: Tracks multiple data points including geolocation, device info, and network details
  • Real-time tracking: Provides live updates on target's activities
  • Visual interface: Offers a user-friendly dashboard for data visualization

Cons of trape

  • More complex setup: Requires more technical knowledge to deploy and use effectively
  • Potential legal issues: May raise privacy concerns due to its invasive nature
  • Less focused: Not specialized for Instagram-specific OSINT like Osintgram

Code comparison

Osintgram (Python):

def getLocationID(self, query):
    url = self.url + "location_search/?rank_token=0.785875794297689&query=" + query
    response = self.s.get(url)
    data = json.loads(response.text)
    return data['venues'][0]['external_id']

trape (JavaScript):

async function getLocation(ip) {
    const url = `https://ipapi.co/${ip}/json/`;
    const response = await fetch(url);
    const data = await response.json();
    return data;
}

Both repositories focus on gathering information, but Osintgram is specifically tailored for Instagram OSINT, while trape offers a more comprehensive approach to target tracking across various platforms and data points. Osintgram is generally easier to use for beginners, while trape provides more advanced features at the cost of increased complexity.

Stalk your Friends. Find their Instagram, FB and Twitter Profiles using Image Recognition and Reverse Image Search.

Pros of EagleEye

  • Supports multiple social media platforms (Instagram, Facebook, Twitter)
  • Uses facial recognition for more accurate results
  • Provides a graphical user interface for easier use

Cons of EagleEye

  • Less actively maintained (last update in 2019)
  • More complex setup due to additional dependencies
  • Limited to facial recognition-based searches

Code Comparison

EagleEye:

def get_social_media_profiles(self):
    for website in self.websites:
        if website == "facebook":
            self.facebook.get_profile()
        elif website == "twitter":
            self.twitter.get_profile()
        elif website == "instagram":
            self.instagram.get_profile()

Osintgram:

def get_user_info(self):
    user = self.api.user_info(self.target)
    if user:
        self.print_user_data(user)
    else:
        print("User not found")

EagleEye offers a broader scope by supporting multiple platforms, while Osintgram focuses specifically on Instagram. EagleEye's facial recognition feature may provide more accurate results, but it also requires more setup and dependencies. Osintgram, being more recently maintained, might offer better compatibility with current Instagram APIs and features. The code comparison shows that EagleEye handles multiple platforms in a single method, while Osintgram's approach is more focused on Instagram-specific functionality.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Osintgram 🔎📸

version-1.3 GPLv3 Python3 Telegram Docker

Osintgram is an OSINT tool on Instagram to collect, analyze, and run reconnaissance.

Disclaimer: FOR EDUCATIONAL PURPOSE ONLY! The contributors do not assume any responsibility for the use of this tool.

Warning: It is advisable to not use your own/primary account when using this tool.

Tools and Commands 🧰

Osintgram offers an interactive shell to perform analysis on Instagram account of any users by its nickname. You can get:

- addrs           Get all registered addressed by target photos
- captions        Get user's photos captions
- comments        Get total comments of target's posts
- followers       Get target followers
- followings      Get users followed by target
- fwersemail      Get email of target followers
- fwingsemail     Get email of users followed by target
- fwersnumber     Get phone number of target followers
- fwingsnumber    Get phone number of users followed by target
- hashtags        Get hashtags used by target
- info            Get target info
- likes           Get total likes of target's posts
- mediatype       Get user's posts type (photo or video)
- photodes        Get description of target's photos
- photos          Download user's photos in output folder
- propic          Download user's profile picture
- stories         Download user's stories  
- tagged          Get list of users tagged by target
- wcommented      Get a list of user who commented target's photos
- wtagged         Get a list of user who tagged target

You can find detailed commands usage here.

Latest version | Commands | CHANGELOG

FAQ

  1. Can I access the contents of a private profile? No, you cannot get information on private profiles. You can only get information from a public profile or a profile you follow. The tools that claim to be successful are scams!
  2. What is and how I can bypass the challenge_required error? The challenge_required error means that Instagram notice a suspicious behavior on your profile, so needs to check if you are a real person or a bot. To avoid this you should follow the suggested link and complete the required operation (insert a code, confirm email, etc)

Installation ⚙️

  1. Fork/Clone/Download this repo

    git clone https://github.com/Datalux/Osintgram.git

  2. Navigate to the directory

    cd Osintgram

  3. Create a virtual environment for this project

    python3 -m venv venv

  4. Load the virtual environment

    • On Windows Powershell: .\venv\Scripts\activate.ps1
    • On Linux and Git Bash: source venv/bin/activate
  5. Run pip install -r requirements.txt

  6. Open the credentials.ini file in the config folder and write your Instagram account username and password in the corresponding fields

    Alternatively, you can run the make setup command to populate this file for you.

  7. Run the main.py script in one of two ways

    • As an interactive prompt python3 main.py <target username>
    • Or execute your command straight away python3 main.py <target username> --command <command>

Use Osintgram v2 (beta)

You can use Osintgram2 beta just switching to v2 branch. The v2 has some improvements and is faster with a new command execution interface. Try it just running git checkout v2.

Docker Quick Start 🐳

This section will explain how you can quickly use this image with Docker or Docker-compose.

Prerequisites

Before you can use either Docker or Docker-compose, please ensure you do have the following prerequisites met.

  1. Docker installed - link
  2. Docker-composed installed (if using Docker-compose) - link
  3. Credentials configured - This can be done manually or by running the make setup command from the root of this repo

Important: Your container will fail if you do not do step #3 and configure your credentials

Docker

If docker is installed you can build an image and run this as a container.

Build:

docker build -t osintgram .

Run:

docker run --rm -it -v "$PWD/output:/home/osintgram/output" osintgram <target>
  • The <target> is the Instagram account you wish to use as your target for recon.
  • The required -i flag enables an interactive terminal to use commands within the container. docs
  • The required -v flag mounts a volume between your local filesystem and the container to save to the ./output/ folder. docs
  • The optional --rm flag removes the container filesystem on completion to prevent cruft build-up. docs
  • The optional -t flag allocates a pseudo-TTY which allows colored output. docs

Using docker-compose

You can use the docker-compose.yml file this single command:

docker-compose run osintgram <target>

Where target is the Instagram target for recon.

Alternatively, you may run docker-compose with the Makefile:

make run - Builds and Runs with compose. Prompts for a target before running.

Makefile (easy mode)

For ease of use with Docker-compose, a Makefile has been provided.

Here is a sample work flow to spin up a container and run osintgram with just two commands!

  1. make setup - Sets up your Instagram credentials
  2. make run - Builds and Runs a osintgram container and prompts for a target

Sample workflow for development:

  1. make setup - Sets up your Instagram credentials
  2. make build-run-testing - Builds an Runs a container without invoking the main.py script. Useful for an it Docker session for development
  3. make cleanup-testing - Cleans up the testing container created from build-run-testing

Development version 💻

To use the development version with the latest feature and fixes just switch to development branch using Git:

git checkout development

and update to last version using:

git pull origin development

Updating ⬇️

To update Osintgram with the stable release just pull the latest commit using Git.

  1. Make sure you are in the master branch running: git checkout master
  2. Download the latest version: git pull origin master

Contributing 💡

You can propose a feature request opening an issue or a pull request.

Here is a list of Osintgram's contributors:

External library 🔗

Instagram API