Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Modern Osintgram v2.0 - Advanced Instagram OSINT Tool

Overview

This is a complete modernization of the Osintgram project, featuring:

  • Modern GUI built with PyQt5
  • Advanced Instagram API using multiple scraping methods
  • No dependency on outdated instagram_private_api
  • Multiple API backends for maximum reliability
  • Real-time progress tracking and error handling

Architecture

Core Components

  1. Advanced Instagram API (src/advanced_instagram_api.py)

    • Combines Instaloader, Selenium, and Instascrape
    • Automatic fallback between methods
    • Handles rate limits and errors gracefully
  2. Modern Osintgram (src/modern_osintgram.py)

    • Clean wrapper around the advanced API
    • Command-compatible with original Osintgram
    • GUI-friendly return formats
  3. Modern GUI (modern_gui.py)

    • Full PyQt5 interface
    • Multi-threaded operations
    • Multiple output views (Console, Table, JSON)
    • Challenge handling dialogs

API Support Matrix

Feature Instaloader Selenium Instascrape Status
User Info Working
Posts Partial
Followers Login Required
Following Login Required
Hashtags Working
Post Details Working

Installation

Requirements

# Core requirements
pip install PyQt5>=5.15.0
pip install requests
pip install beautifulsoup4

# Instagram API backends (install at least one)
pip install instaloader           # Recommended
pip install selenium undetected-chromedriver webdriver-manager
pip install instascrape          # Basic support

Quick Setup

git clone <your-repo>
cd osintgram
pip install -r requirements.txt
python launch_modern_gui.py

Usage

GUI Mode

python launch_modern_gui.py

The GUI provides:

  • Login dialog for Instagram credentials
  • Target user selection
  • Command buttons organized by category
  • Real-time output in multiple formats
  • Progress tracking and error handling

Command Line Testing

python test_modern_api.py

Available Commands

All original Osintgram commands are supported:

Command Description Status
info User information ✅ Working
photos User posts/photos ⚠️ Rate limited
followers User followers ✅ Login required
following Users being followed ✅ Login required
hashtag Hashtag search ✅ Working
propic Profile picture ✅ Working
stories User stories 🚧 Planned
comments Post comments 🚧 Planned
tagged Tagged photos 🚧 Planned

Features

✅ Working Features

  1. User Information Retrieval

    • Username, full name, biography
    • Follower/following counts
    • Post counts, verification status
    • Profile picture URLs
  2. Public Data Access

    • No login required for public profiles
    • Automatic rate limit handling
    • Multiple API fallbacks
  3. Modern GUI

    • Dark theme interface
    • Organized command layout
    • Real-time progress updates
    • Multiple output formats
  4. Error Handling

    • Graceful API failures
    • User-friendly error messages
    • Automatic retry mechanisms

⚠️ Limited Features

  1. Posts Retrieval

    • Works but may hit rate limits
    • Instagram has tightened access
    • Requires careful usage
  2. Private Account Access

    • Requires valid Instagram login
    • Subject to Instagram's terms
    • May trigger challenges

🚧 Planned Features

  1. Stories Support
  2. Comment Analysis
  3. Tagged Photos
  4. Location Data
  5. Network Analysis

Technical Details

API Strategy

The modern implementation uses a multi-tier approach:

  1. Primary: Instaloader (most reliable for public data)
  2. Secondary: Selenium with undetected Chrome (for complex interactions)
  3. Fallback: Direct HTTP requests with session management

Rate Limit Handling

  • Automatic delays between requests
  • Exponential backoff on errors
  • User-configurable limits
  • API rotation on failures

Security

  • Credentials stored locally only
  • No data transmission to third parties
  • Challenge handling through browser
  • Session management

Troubleshooting

Common Issues

  1. "JSON parsing error"

    • Fixed in v2.0 with modern APIs
    • No longer uses outdated instagram_private_api
  2. "403 Forbidden" errors

    • Instagram rate limiting
    • Try again after a few minutes
    • Use different API method
  3. Selenium Chrome issues

    • Install Chrome browser
    • Update undetected-chromedriver
    • Check Chrome version compatibility
  4. Login challenges

    • Use browser login dialog
    • Handle 2FA if enabled
    • Wait for Instagram approval

Debug Mode

python debug_gui.py  # Enhanced error tracking
python test_modern_api.py  # API functionality test

Development

File Structure

osintgram/
├── modern_gui.py                    # Main GUI application
├── launch_modern_gui.py            # GUI launcher
├── test_modern_api.py              # API tests
├── src/
│   ├── advanced_instagram_api.py   # Core API implementation
│   ├── modern_osintgram.py         # Command wrapper
│   └── gui_credentials.py          # Credential management
├── config/
│   └── credentials.ini             # User credentials
└── requirements.txt                # Dependencies

Adding New Commands

  1. Implement method in AdvancedInstagramAPI
  2. Add wrapper in ModernOsintgram
  3. Update command mapping
  4. Add GUI button and handler

API Extension

The modular design allows easy addition of new Instagram API methods:

def new_feature(self, params):
    """New Instagram feature."""
    # Try each available API method
    if self.use_instaloader:
        result = self._new_feature_instaloader(params)
        if result: return result
    
    if self.use_selenium:
        result = self._new_feature_selenium(params)
        if result: return result
    
    return None

Legal and Ethical Use

⚠️ Important: This tool is for educational and legitimate OSINT purposes only.

  • Respect Instagram's Terms of Service
  • Obtain proper authorization before investigating
  • Use for legitimate security research only
  • Respect privacy and data protection laws
  • Do not use for harassment or stalking

Support

  • Issues: Report bugs and feature requests
  • Documentation: Check this README and code comments
  • Testing: Use test_modern_api.py for debugging
  • Logs: Check logs/ directory for detailed error information

Changelog

v2.0 (Current)

  • Complete rewrite with modern APIs
  • PyQt5 GUI interface
  • Multi-API backend support
  • Improved error handling
  • Rate limit management
  • Challenge handling system

v1.x (Legacy)

  • Original CLI implementation
  • instagram_private_api dependency
  • Basic command set

Future Roadmap

  • Instagram Basic Display API integration
  • Advanced network analysis features
  • Export formats (CSV, JSON, PDF)
  • Batch processing capabilities
  • Plugin system for extensions
  • Web interface option

About

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

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages