Skip to content

queltom/WebAutomationBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Automation Bot — Multi-Thread & Multi-Profile

Python C Selenium Microsoft Edge Telegram Windows JSON VPN

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:

Field Description Default
token Telegram bot token
user_id Telegram ID of the notification recipient
numDivisioni Number of slaves/divisions to launch 3
generatorDiv / setupDiv Division used for account generation/setup 2
desktopReasearch Desktop searches per profile 35
mobileReasearch Mobile searches per profile 25
attemptsCompleteResearch Retry attempts for failed searches 2
bonusSIGNINresearches Searches for bonus points accumulation 70
sogliaMinima Minimum points threshold for account alert 14940
sendStatistics Send execution statistics via Telegram 1
sendComparedPoints Send daily points comparison report via Telegram 1
muteSound Disable local sounds 0
turnOffPC Shut down PC after execution 1
lazyMode Lazy mode: complete desktop+mobile per account before moving to the next 0
doQuiz Run daily quizzes 1
moreQuiz Extra quizzes beyond the 3 daily fixed ones 10
pointsFormat Points 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>
Argument Values Default Description
division 0..N 0 Index of the division to handle
all_profiles 0, 1 1 1 = all profiles, 0 = last profile only
vpn_mode 1, 2, 3 1 1 = VPN1+VPN2 auto, 2 = VPN1 only (America), 3 = VPN2 only (Spain)

master.py

python master.py <vpn_mode> <num_slaves>
Argument Values Default Description
vpn_mode 1, 2, 3 1 VPN mode (same logic as slave)
num_slaves 1..5 1 Number of divisions/slaves to coordinate

Changelog

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

Security Notes

  • Never commit controlRoom/settings.json — contains Telegram credentials
  • Never commit profiles/ and backupProfile/ — contain account data
  • Never commit data/ — 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

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors