Automated form filling tool for noro.rs using Playwright. This tool generates random Serbian names, addresses, and phone numbers to fill out forms multiple times per day.
- 🤖 Automated form filling with Playwright
- 🇷🇸 Random Serbian data generation (names, addresses, phone numbers)
- ⏰ Scheduled runs at configurable times
- 🌐 Web dashboard for manual control and monitoring
- 📝 Comprehensive logging
- 🎭 Stealth mode to avoid detection
- 📸 Screenshot capture for debugging
- 📊 Real-time statistics and status tracking
- Python 3.8 or higher
- pip (Python package manager)
-
Clone the repository (if not already done):
git clone <repository-url> cd prevara
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Install Playwright browsers:
playwright install chromium
-
Configure environment variables:
cp .env.example .env # Edit .env with your preferred settings
Edit the .env file to configure the tool:
# Schedule times (24-hour format, comma-separated)
SCHEDULE_TIMES=10:00,14:00,18:00
# Target website
TARGET_URL=https://noro.rs/
# Browser settings
HEADLESS=false # Set to true to run without visible browser
# Delays between actions (seconds)
MIN_DELAY=1
MAX_DELAY=3
# Web interface settings
PORT=5000
AUTO_START_SCHEDULER=true
SECRET_KEY=change-this-to-a-random-secret-keyThe tool now includes a web dashboard for easy control and monitoring!
Start the web server:
python app.pyThen open your browser to http://localhost:5000
Features:
▶️ Manual trigger button to run form submissions on-demand- ⏰ Start/Stop scheduler from the web interface
- 📊 Real-time statistics (total runs, success rate, etc.)
- 📋 Live log viewer
- ⚙️ Configuration display
Environment Variables for Web Interface:
PORT=5000 # Web server port
AUTO_START_SCHEDULER=true # Auto-start scheduler on app launch
SECRET_KEY=your-secret-key # Flask secret key (change in production)Run the form filler once with a visible browser to test and debug:
python main.py --testRun once in headless mode:
python main.py --test --headlessRun once with the settings from .env:
python main.py --nowRun the form filler on the schedule defined in .env:
python main.py --scheduleOr simply:
python main.pyThe scheduler will run continuously and execute form fills at the specified times.
Override the target URL from command line:
python main.py --test --url "https://example.com"prevara/
├── app.py # Flask web application (WEB INTERFACE)
├── main.py # CLI entry point
├── form_filler.py # Core form filling logic
├── scheduler.py # Scheduling functionality
├── serbian_data_generator.py # Random Serbian data generation
├── templates/ # Web interface templates
│ └── index.html # Dashboard HTML
├── requirements.txt # Python dependencies
├── Dockerfile # Docker configuration for Railway/cloud deployment
├── railway.toml # Railway-specific configuration
├── .dockerignore # Files to exclude from Docker build
├── .env # Configuration (create from .env.example)
├── .env.example # Example configuration
├── .gitignore # Git ignore rules
├── setup.sh # Automated setup script
├── logs/ # Log files and screenshots (auto-created)
└── README.md # This file
The tool generates realistic Serbian data:
- Common Serbian first names (male/female)
- Common Serbian last names
- Example: "Marko Jovanović", "Ana Petrović"
- Starts with 063, 064, or 069
- Format: 06X/XXXXXXX or 06XXXXXXXXX
- Example: "0631234567"
- Common Serbian street names
- Random street numbers
- Serbian cities
- Postal codes
- Example: "Kralja Petra 45, Beograd, 11000"
- Generated from names with random numbers
- Common domains (gmail.com, yahoo.com, etc.)
- Example: "marko.jovanovic123@gmail.com"
By default, the actual form SUBMISSION is DISABLED in form_filler.py for safety.
To enable actual form submission:
- Open
form_filler.py - Find the section with
# UNCOMMENT TO ACTUALLY SUBMIT THE FORM - Uncomment the submit button click code
- Test thoroughly before running on schedule
The current form selectors are generic placeholders. You need to:
- Run in test mode:
python main.py --test - Inspect the website's actual form fields
- Update the selectors in
form_filler.pyto match the real form - Look for the selector lists in the
fill_form()method
Example fields to customize:
name_selectorsphone_selectorsemail_selectorsaddress_selectorscity_selectorspostal_selectorssubmit_selectors
- Check
logs/directory for:form_filler.log- Form filling logsscheduler.log- Scheduler logsmain.log- Main application logs- Screenshots (taken before/after form submission and on errors)
# Using screen
screen -S form-filler
python main.py --schedule
# Press Ctrl+A then D to detach
# To reattach
screen -r form-filler# Using tmux
tmux new -s form-filler
python main.py --schedule
# Press Ctrl+B then D to detach
# To reattach
tmux attach -t form-fillerCreate /etc/systemd/system/form-filler.service:
[Unit]
Description=Form Filler Service
After=network.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/path/to/prevara
ExecStart=/path/to/prevara/venv/bin/python main.py --schedule
Restart=always
[Install]
WantedBy=multi-user.targetThen:
sudo systemctl enable form-filler
sudo systemctl start form-filler
sudo systemctl status form-fillerRailway is a platform that makes it easy to deploy and host this tool in the cloud.
Cost: Expect $10-20/month depending on usage (Railway bills based on resource usage)
-
Create a Railway account at railway.app
-
Install Railway CLI (optional):
npm install -g @railway/cli
-
Deploy via Railway Dashboard:
- Click "New Project"
- Select "Deploy from GitHub repo"
- Choose your repository
- Railway will auto-detect the Dockerfile
-
Set Environment Variables in Railway dashboard:
SCHEDULE_TIMES=10:00,14:00,18:00 TARGET_URL=https://noro.rs/ HEADLESS=true MIN_DELAY=1 MAX_DELAY=3 AUTO_START_SCHEDULER=true SECRET_KEY=your-random-secret-key-here -
Deploy:
- Railway will automatically build and deploy
- The web interface will be available at your Railway URL
- Access the dashboard to manually trigger runs or monitor automation
- HEADLESS must be true on Railway (no GUI available)
- Browser automation uses significant resources (RAM/CPU)
- Access the web dashboard at your Railway app URL to control the automation
- Check Railway logs:
railway logsor via dashboard - Monitor costs in Railway dashboard
- The web interface provides full control: manual triggers, start/stop scheduler, view logs
- Screenshots won't work in Railway (no display), but logs will
# Login
railway login
# Link to project or create new
railway link
# Deploy
railway up
# View logs
railway logsFor more affordable hosting, consider:
- VPS (DigitalOcean, Linode): $5-12/month
- Oracle Cloud Free Tier: FREE forever (ARM VMs)
- Render: $7/month for background workers
- Home server/Raspberry Pi: One-time cost
See the "Hosting Options" section in our documentation for detailed comparisons.
- Increase timeout values in
form_filler.py - Check your internet connection
- Ensure the website is accessible
- Run in test mode with visible browser
- Inspect the actual HTML elements on the website
- Update selectors in
form_filler.py - Check screenshots in
logs/directory
- Run
playwright install chromiumagain - Check system dependencies:
playwright install-deps chromium
- The website may have anti-bot protection
- Try running in non-headless mode
- Increase delays between actions
- Consider adding more human-like behavior
python serbian_data_generator.py- Test locally with
--testmode first - Check logs in
logs/directory - Review screenshots for debugging
- Update this README with new features
This tool is for educational and testing purposes only. Use responsibly and in accordance with the target website's terms of service.
- Never commit
.envfile to version control - Keep logs directory out of version control
- Review screenshots before sharing as they may contain sensitive data