Skip to content

Repository files navigation

Web Automation Bot — Multi-Thread & Multi-Profile

PythonCSeleniumMicrosoft EdgeTelegramWindowsJSONVPN

A multi-thread web automation system with a master/slave architecture, automatic VPN management, remote monitoring via Telegram, and a hardware-bound license module written in C.

Built from scratch between October 2021 and May 2023, evolving from a single-thread prototype into a distributed system capable of running dozens of parallel browser sessions.


Table of Contents


Architecture

┌─────────────────────────────────────────────────────────────┐
│ serialNumber.exe │
│ (license check hardware-bound via REST API) │
└──────────────────────────┬──────────────────────────────────┘
│ authorized
▼
┌─────────────────────────────────────────────────────────────┐
│ master.py │
│ - VPN management (automatic IP rotation) │
│ - slave coordination via shared memory │
│ - Telegram notifications (stats, errors, reports) │
└──────┬──────────────────┬───────────────────┬───────────────┘
│ │ │
▼ ▼ ▼
slave.py 0 slave.py 1 ... slave.py N
(division 0) (division 1) (division N)
│
▼
Independent Edge sessions per profile
(Selenium WebDriver + pre-configured profiles)

The master handles orchestration logic and VPN switching; each slave autonomously manages its own division of profiles, communicating with the master via shared memory for checkpoint synchronization.


Key Features

  • Full parallelization — N slaves run concurrently, each handling an independent subset of browser profiles
  • Automatic VPN management — seamless rotation between VPN endpoints with IP verification and automatic reconnection on failure
  • Master/slave architecture — the master coordinates execution and VPN switches, while slaves operate independently
  • Automatic error recovery — detection of logged-out sessions and automatic retry for failed searches
  • Remote monitoring via Telegram — real-time notifications on progress, statistics, errors, and daily comparison reports
  • Hardware-bound license system in C — verifies the OS Product ID against a proprietary REST API; execution is blocked on unauthorized machines
  • Daily points comparison report — automatic comparison with previous day's data, with alerts for accounts below threshold
  • Centralized configuration — all operational parameters managed through a single settings.json
  • Desktop and mobile mode support — user-agent switching for mobile sessions with separate search handling
  • Automatic daily schedulingcontroller.py checks the current time and launches the bot once per day without manual intervention

Project Structure

appRewards/
│
├── script/ # Core Python logic
│ ├── master.py # Orchestrator: VPN, Telegram, slave coordination
│ ├── slave.py # Worker: browser automation per division
│ ├── controller.py # Automatic daily scheduler
│ ├── checkSloggedAccount.py # Logged-out session detection and recovery
│ ├── comparePoints.py # Daily points comparison report
│ ├── pointsFileMaker.py # Points summary file builder
│ ├── progressControll.py # Execution progress monitoring
│ ├── profileDict.py # Account → Edge profile mapping
│ ├── jsonReader.py # settings.json reader
│ ├── vpn.py # VPN connection manager
│ ├── divisioni.py # Profile division structure handler
│ └── closeAllBot.py # Utility: force-kill all running processes
│
├── cmd/ # Native launchers and utilities
│ ├── clickMe3.0.cmd # Main entry point (starts the bot)
│ ├── serialNumber.c # License system (C) — compile with setup.cmd
│ ├── setup.cmd # Compilation script
│ └── comparePoints.cmd # Points comparison launcher
│
├── controlRoom/
│ ├── settings.json # ⚙️ Central config (DO NOT commit — see .gitignore)
│ └── readMe.txt # Documentation for all parameters
│
├── data/
│ └── d0/ d1/ ... dN/ # Edge profiles per division (DO NOT commit)
│
├── profiles/
│ └── profiliAccountN.txt # Account list per division (DO NOT commit)
│
├── log/ # Execution output (DO NOT commit)
│ ├── changeLog.txt # Version history
│ └── ...
│
├── ricerche/
│ ├── desktop.txt # Predefined desktop search queries
│ └── mobile.txt # Predefined mobile search queries
│
├── sounds/ # Local notification audio
├── backupProfile/ # Account profile backups
├── driver/ # Edge WebDriver (DO NOT commit)
└── vpn/ # VPN configurations (DO NOT commit)

Requirements

Python

pip install selenium
pip install msedge-selenium-tools
pip install pygame
pip install ipinfo
pip install telebot
pip install pythonping

System

  • Windows 10/11
  • Microsoft Edge installed
  • msedgedriver.exe matching your installed Edge version → place in driver/
  • VPN with scriptable server switching (tested with a paid VPN service)
  • Pre-configured Edge profiles with active sessions in data/d*/

License module compilation (optional)

# From cmd/
gcc serialNumber.c -o serialNumber.exe

Configuration

Copy controlRoom/settings.json.example to controlRoom/settings.json and fill in the fields:

FieldDescriptionDefault
tokenTelegram bot token
user_idTelegram ID of the notification recipient
numDivisioniNumber of slaves/divisions to launch3
generatorDiv / setupDivDivision used for account generation/setup2
desktopReasearchDesktop searches per profile35
mobileReasearchMobile searches per profile25
attemptsCompleteResearchRetry attempts for failed searches2
bonusSIGNINresearchesSearches for bonus points accumulation70
sogliaMinimaMinimum points threshold for account alert14940
sendStatisticsSend execution statistics via Telegram1
sendComparedPointsSend daily points comparison report via Telegram1
muteSoundDisable local sounds0
turnOffPCShut down PC after execution1
lazyModeLazy mode: complete desktop+mobile per account before moving to the next0
doQuizRun daily quizzes1
moreQuizExtra quizzes beyond the 3 daily fixed ones10
pointsFormatPoints file format (rtf for iOS, txt for Android)rtf

Usage

Manual start

# Launches master + N slaves (from cmd/)
clickMe3.0.cmd

Automatic daily execution

# controller.py checks the time and runs the bot once per day
python script/controller.py

Points comparison only

comparePoints.cmd

CLI Parameters

slave.py

python slave.py <division> <all_profiles> <vpn_mode>
ArgumentValuesDefaultDescription
division0..N0Index of the division to handle
all_profiles0, 111 = all profiles, 0 = last profile only
vpn_mode1, 2, 311 = VPN1+VPN2 auto, 2 = VPN1 only (America), 3 = VPN2 only (Spain)

master.py

python master.py <vpn_mode> <num_slaves>
ArgumentValuesDefaultDescription
vpn_mode1, 2, 31VPN mode (same logic as slave)
num_slaves1..51Number of divisions/slaves to coordinate

Changelog

VersionDateMain changes
v1.0.0.0Oct 2021Initial prototype, rewritten from scratch
v1.1.0.0Oct 2021Login bypass via cookies
v1.2.0.0Oct 2021URL-based searches, improved speed
v1.3.0.0Oct 2021Mobile session support
v1.5.0.0Oct 2021Predefined search list, randomizer
v1.6.0.0Nov 2021Pre-logged Edge profiles, no runtime login
v1.6.1.0Nov 2021Sounds, file logging, IP check
v1.6.2.0Nov 2021Randomized searches
v1.6.3.0Nov 2021Automatic recovery for failed searches
v1.6.4.0Nov 2021Dynamic scraping of missing searches
v1.7.0.0Dec 2021Parallel bot execution
v1.7.0.2Mar 2022Profile skip from browser, universal directory handling
v1.7.0.3Mar 2022Folder management, only-last-profile flag, logging
v1.7.0.4Apr 2022Fix mobile searches with VPN, retry variable
v2.0.0.0Apr 2022MASTER/SLAVE architecture, automatic VPN

Security Notes

  • Never commitcontrolRoom/settings.json — contains Telegram credentials
  • Never commitprofiles/ and backupProfile/ — contain account data
  • Never commitdata/ — contains Edge profiles with active sessions
  • All these paths are already excluded in .gitignore

About

Multi-thread web automation system with master/slave architecture, automatic VPN rotation, Telegram bot monitoring, and a hardware-bound license module in C. Built in Python + Selenium over ~2 years.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages