- Download Python 3.8+ from https://www.python.org/downloads/
- ✅ Check "Add Python to PATH" during installation
- Download from: https://github.com/UB-Mannheim/tesseract/wiki
- Install to default location:
C:\Program Files\Tesseract-OCR\ ⚠️ If you install elsewhere, update line 25 in the script with your path
Open Command Prompt or PowerShell and run:
pip install opencv-python numpy pytesseract mss pyautogui pywin32python captcha2.py- Type
#badcaptchain the console - Press SPACE to continue
- A screenshot window will appear
- Draw a box around the word "reward" (the captcha trigger text)
- Press SPACE to confirm the box
- Press ENTER when done
- Draw boxes around each of the 5 captcha letters (in order: left to right)
- Press SPACE after each box to confirm
- Press ENTER when all 5 are selected
Controls:
SPACE= Confirm current selectionENTER= Finish selectionBACKSPACE= Undo last selectionESCorQ= Cancel
- ⏳ Script waits for "reward" to appear in trigger area
- 📸 OCR scans each letter spot 50 times
- 🗳️ Majority vote determines each letter
- 🎯 Focuses the game window
- ⌨️ Types the solution automatically
- ✅ Presses ENTER (if enabled)
🔍 Spot 1
find N
find N
Answer is N
🔍 Spot 2
find W
find W
Answer is W
✅ Final Answers: Spot 1: N, Spot 2: W, Spot 3: K, Spot 4: T, Spot 5: O
📨 Solution to type: NWKTO
🎯 Focused window: 'EndlessOnline'
⌨️ Typing solution into the focused window...
[TYPING] Starting SendInput typing: NWKTO
[1/5] Pressing key: n (VK: 0x4e)
[2/5] Pressing key: w (VK: 0x57)
[3/5] Pressing key: k (VK: 0x4b)
[4/5] Pressing key: t (VK: 0x54)
[5/5] Pressing key: o (VK: 0x4f)
[ENTER] Pressing enter key
[TYPING] SendInput typing complete!
⌨️ Done.
Edit these at the top of the script:
TRIGGER_PHRASE = "reward" # Text to detect for trigger
TRIGGER_HITS_REQUIRED = 2 # Consecutive detections needed
SPOTS_REQUIRED = 5 # Number of letter spots
FRAMES = 50 # OCR attempts per letter
TYPE_INTERVAL = 0.15 # Delay between keypresses (seconds)
PRESS_ENTER_AT_END = True # Auto-press Enter after typing
CLICK_CENTER_BEFORE_TYPING = True # Click game window center first- Make sure the game window title contains "EndlessOnline"
- Update
WINDOW_TITLE_SUBSTRif your window has a different name
- Increase
FRAMES(default 50) for more samples - Adjust
TYPE_INTERVALif letters are typing too fast - Check
DEBUG_PREVIEW = Trueto see OCR preprocessing
- Ensure the input field is active (cursor blinking)
- Try increasing
TYPE_INTERVAL(e.g., 0.20 or 0.25) - Make sure game is truly focused
- Verify installation path:
C:\Program Files\Tesseract-OCR\tesseract.exe - Update line 25 if installed elsewhere
⚠️ The script uses real keyboard input via SendInput- 🎮 Game must be focused and input field active
- 🔄 Run the script fresh for each captcha session
- 💾 Selection areas are NOT saved between runs
If you encounter issues:
- Check the console output for error messages
- Verify all packages installed correctly
- Ensure Tesseract OCR is installed
- Test with
DEBUG_PREVIEW = Trueto see OCR processing