Skip to content

Latest commit

Β 

History

34 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Instagram SMM Panel

Python Versions Django Versions Playwright MIT License Code Style: Black

An enterprise-grade, fully automated Instagram SMM (Social Media Marketing) Panel and bot manager. Built on top of Django and Playwright, the system provides a robust dashboard UI to orchestrate accounts creation, solve CAPTCHAs, manage SMS verifications, maintain rotating proxy pools, and schedule engagement actions (follows, likes, and comments).

Designed with session cookie persistence, a database-backed task queue, dynamic credentials settings, and interactive live console streaming directly in the browser interface.


πŸ“– Table of Contents


✨ Key Features

  • πŸ–₯️ Interactive Dashboard: Monitor key telemetry (active proxies, account health ratio, completed/running tasks) visually with Chart.js diagrams.
  • πŸͺ Session State Persistence: Caches browser contexts and session cookies inside session_cookies/ to avoid repetitive sign-in queries and bypass Instagram verification check blocks.
  • ⚑ DB-Backed Queue Worker: A multithreaded queue processor that handles browser automation in the background. Submit tasks via the UI and track live outputs.
  • πŸ“ Live Stream Console: Streams automated actions and Playwright process logs directly to a dark console container on the web page.
  • πŸ“Š Smart Proxy Rotator: Scrape fresh proxy pools, verify connection speeds against Instagram endpoints, and rotate active IP configurations automatically.
  • πŸ€– Anti-Detection Design: Integrates human typing behavior (variable keystroke delay) and random User-Agent rotation.
  • πŸ“‚ Bulk CSV Manager: Import existing account details in bulk or download the complete system registration roster in a click.

πŸ—οΈ System Architecture

graph TD
    UI[Web UI / Templates] -->|Enqueue Jobs| DB[(SQLite / PostgreSQL)]
    UI -->|Configure Settings| Settings[Dynamic Global Settings]
    DB -->|Fetch Pending Tasks| Worker[Daemon Queue Worker]
    Worker -->|Configure Context| Browser[Playwright Browser Launcher]
    Browser -->|Use Scraped IPs| ProxyPool[Proxy Scraper / Tester]
    Browser -->|Autofill Credentials| AccountCreator[Instagram account creator]
    Browser -->|Follow / Like / Comment| SocialActions[Social Action Engine]
    AccountCreator -->|Solve CAPTCHA| CapSolve[CapMonster / AntiCaptcha API]
    AccountCreator -->|Retrieve SMS| SMS[5sim / SMS-Activate API]
    AccountCreator -->|Verify Link| Email[1secmail API Inbox Polling]
    Worker -->|Write Logs| DB
    UI -->|Poll Logs API| DB
Loading

πŸ› οΈ Tech Stack

  • Backend Framework: Django 5.x / 6.x
  • Browser Automation: Playwright Python
  • HTML Processing: BeautifulSoup4 & requests
  • Frontend Design: Vanilla CSS (Responsive Flexbox/Grid layout with custom scrollbars)
  • Visualizations: Chart.js
  • Database: SQLite (Default) or PostgreSQL

πŸš€ Quick Start Guide

Prerequisites

  • Python 3.10, 3.11, or 3.12
  • SQLite3 (installed by default with Python)
  • Firefox (/usr/bin/firefox pre-installed on Debian/Ubuntu environments)

Installation Steps

  1. Clone the Repository

    git clone https://github.com/pain-hub/instagram_smm_panel.git
    cd instagram_smm_panel
  2. Install Dependencies It is recommended to use a virtual environment. Install packages using pip:

    python3 -m pip install -r requirements.txt

    (On Debian/Kali Linux systems enforcing PEP 668, append the --break-system-packages flag or run inside a configured venv).

  3. Initialize the Database Generate database schemas and apply the migration scripts:

    python3 manage.py makemigrations panel
    python3 manage.py migrate
  4. Launch the Panel Webserver Start the Django development server:

    python3 manage.py runserver 127.0.0.1:8000

    Access the dashboard at http://127.0.0.1:8000.

  5. Launch the Background Worker Daemon To execute the browser automation tasks enqueued by the dashboard, launch the worker process in a separate terminal window:

    python3 manage.py run_worker

βš™οΈ Configuration Parameters

Navigate to the Settings view in the sidebar to configure the dynamic parameters:

Category Parameter Description
CAPTCHA Solver Provider Select CapMonster or AntiCaptcha.
API Secret Key API key from your solving provider dashboard.
SMS SMS Provider Select 5sim or SMS-Activate.
API Auth Token Token to acquire and read verification phone numbers.
Automation Browser Engine Select Firefox (Default) or Chromium.
Local Browser Path Absolute path (e.g. /usr/bin/firefox). Useful if Playwright downloads time out.
Delay Range Set minimum and maximum delays (seconds) between human actions.
Headless Mode Enable to hide browser window during operations.

πŸ“‚ Project Structure

instagram_smm_panel/
β”œβ”€β”€ smm_panel_project/               # Core configurations & root routing
β”‚   β”œβ”€β”€ settings.py                  # Cookies hardening, CSP, frame-ancestors
β”‚   β”œβ”€β”€ urls.py                      # Django base URLs
β”‚   └── wsgi.py / asgi.py
β”‚
β”œβ”€β”€ panel/                           # SMM Panel app
β”‚   β”œβ”€β”€ models.py                    # Database tables (Proxy, Account, BotTask, Setting)
β”‚   β”œβ”€β”€ views.py                     # Controllers (Stats, CSV imports, Logs API)
β”‚   β”œβ”€β”€ forms.py                     # safe inputs validation forms
β”‚   β”œβ”€β”€ urls.py                      # App url routes
β”‚   β”œβ”€β”€ worker.py                    # Background thread pool queue runner
β”‚   β”‚
β”‚   β”œβ”€β”€ management/commands/
β”‚   β”‚   └── run_worker.py            # CLI daemon command (run_worker)
β”‚   β”‚
β”‚   β”œβ”€β”€ templates/panel/             # Dashboard HTML Templates
β”‚   β”‚   β”œβ”€β”€ base.html                # Left Sidebar layouts
β”‚   β”‚   β”œβ”€β”€ dashboard.html           # Chart widgets
β”‚   β”‚   β”œβ”€β”€ accounts.html            # Profile grids & bulk uploads
β”‚   β”‚   β”œβ”€β”€ proxies.html             # Scrapers & speed testers
β”‚   β”‚   β”œβ”€β”€ targets.html             # Target list (follow/like targets)
β”‚   β”‚   β”œβ”€β”€ tasks.html               # Job submission dispatchers
β”‚   β”‚   β”œβ”€β”€ task_detail.html         # Live streaming console log
β”‚   β”‚   └── settings.html            # Credentials management forms
β”‚   β”‚
β”‚   └── bot_logic/                   # Automation modules (Refactored)
β”‚       β”œβ”€β”€ browser.py               # Playwright browser setups
β”‚       β”œβ”€β”€ human_behavior.py        # keystroke human behaviors
β”‚       β”œβ”€β”€ account_creator.py       # signup automation sequence
β”‚       β”œβ”€β”€ social_actions.py        # Follow, Like, and Comment controls
β”‚       β”œβ”€β”€ captcha_solver.py        # CapMonster API solvers
β”‚       β”œβ”€β”€ sms_handler.py           # 5sim endpoint integrations
β”‚       β”œβ”€β”€ email_verifier.py        # 1secmail inbox polling
β”‚       β”œβ”€β”€ proxy_scraper.py         # Scraping sslproxies.org
β”‚       └── helper.py                # Unique credentials helpers
β”‚
β”œβ”€β”€ static/css/
β”‚   └── styles.css                   # Custom responsive styling
└── requirements.txt                 # Project dependencies list

πŸ”’ Security & Best Practices

This setup has been developed strictly adhering to secure coding guidelines:

  • Framework Auto-Escaping: All template variables are escaped by default to mitigate Cross-Site Scripting (XSS).
  • Safe Session Management: Session and CSRF cookies are set to HttpOnly with strict SameSite=Lax parameters to prevent token theft and clickjacking.
  • Prepared Queries: The project avoids string formatting queries, leveraging Django's database ORM parameterization to prevent SQL injection.
  • Resource Cleanup: Browser context sessions, pages, and playwright instances are closed in nested try...finally scopes to ensure memory is freed up correctly.

πŸ“¦ Production Deployment

For production deployments:

  1. Turn off debug mode in settings.py or set the env var DJANGO_DEBUG=False.
  2. Generate a secure secret key and set it inside DJANGO_SECRET_KEY environment variable.
  3. Configure ALLOWED_HOSTS to match your domain name.
  4. Run the Django app using Gunicorn:
    gunicorn smm_panel_project.wsgi:application --bind 127.0.0.1:8000
  5. Set up a systemd daemon service for the background worker (run_worker).

🀝 Contributing

We welcome pull requests! Feel free to:

  1. Fork this Repository.
  2. Create a feature branch (git checkout -b feature/NewAwesomeFeature).
  3. Commit your changes (git commit -m 'Add some NewAwesomeFeature').
  4. Push to the branch (git push origin feature/NewAwesomeFeature).
  5. Open a Pull Request.

βš–οΈ License

Distributed under the MIT License. See LICENSE for more information.

About

πŸ”₯ Fully automated Instagram bot that creates accounts, solves captchas, verifies with email/SMS, and performs actions like follow, like, and comment. Supports proxy rotation, headless mode, and one-click setup. Built for devs, testers, and bot researchers. Plug it in and let the matrix do the work.

Topics

Resources

Stars

17 stars

Watchers

2 watching

Forks

Contributors

Languages