SIAKAD War Bot

Automated Trunojoyo University course registration bot using Golang.

Overview

The SIAKAD War Bot Client is a high-performance automation tool designed to secure university classes during the competitive course registration period ("War KRS"). It automates the login and class selection process on the university's academic portal, executing actions at precisely scheduled times to ensure students get their desired courses without manual refreshing.

Features

  • Automated browser navigation and form submission for course registration.
  • Hardware-bound license verification to restrict usage to authorized machines.
  • Interactive terminal user interface for managing settings and target courses.
  • Precision scheduling with automatic retry and standby mechanics.
  • Asynchronous screenshot capturing for auditing success and failure states.
  • Aggressive network asset blocking (images, CSS, media) to maximize page load speed.

Technical Implementation

This tool functions as a standalone client communicating directly with the university portal and an external license API.

Requirements

  • Windows environment (for the pre-built executable).
  • A valid paid license key to operate the bot. To register and purchase a license, contact the administrator via Telegram: https://t.me/Sincan1805.

Installation

For General Users (Recommended): You do not need to build the project from source. Simply download the latest pre-compiled executable (e.g., krs-war-bot.exe) directly from the Releases page.

For Developers (Manual Build): The project can be built into a portable executable without requiring any external dependencies using the provided PowerShell build script.

powershell
.\build.ps1

This generates krs-war-bot.exe in the root directory.

Configuration

Configuration is split between environment variables and a JSON file.

Environment variables are stored in a .env file at the root:

env
API_SERVER_URL=http://localhost:8080/
BASE_URL=https://siakad.example.ac.id/
NIM=1234567890
PASSWORD=your_siakad_password

Configuration files (configs/config.json) manage the operational behavior, including browser settings, scheduling, and target courses:

json
{
  "browser": {
    "headless": false,
    "block_images": true,
    "block_css": true
  },
  "schedule": {
    "time": "22:00",
    "retry_delay_seconds": 0.5
  },
  "courses": [
    {
      "nama": "Pengembangan Sistem Berbasis Framework",
      "kelas": "IF 4A"
    }
  ]
}

Database setup

The client does not use a traditional database. It relies on a local binary secret store (credentials.dat) to safely persist the verified license key on the user's machine.

How to run the project

For General Users: Double-click the downloaded krs-war-bot.exe. An interactive terminal menu will appear, allowing you to easily input your credentials, configure target courses, and start the bot without needing to touch any code or manually edit files.

For Developers: You can run the compiled binary directly from the terminal or execute the source code via Go:

bash
go run cmd/bot/main.go

Example Session

shell
C:> .\krs-war-bot.exe

  KRS WAR BOT CLIENT - SETUP KONFIGURASI

 Masukkan IP/URL Server API (http://localhost:8080): http://70.153.18.80:8080
 Masukkan BASE_URL SIAKAD (https://siakad.example.ac.id/): https://siakad.example.ac.id/
 Masukkan NIM Anda: 2435834739
 Masukkan PASSWORD Anda: 9374389
 Konfigurasi berhasil disimpan ke .env




  KRS WAR BOT CLIENT - LICENSE

 Device Fingerprint: 6900080c21e8398cbaedd52acfdf2cdb8b455773d4428ede63ed74d9a599289d
 API Server URL: http://80.842.138.23:8080
 Lisensi tidak ditemukan di penyimpanan lokal.
 Masukkan Kunci Lisensi (License Key): YourLicenseKey 

  PENGINSTALAN DEPENDENSI BROWSER

 Memeriksa kesiapan mesin browser (Chromium)...
 Mohon tunggu, proses download ini hanya satu kali saja (jika belum ada).

 Mesin browser Chromium siap digunakan!



  KRS WAR BOT CLIENT - MENU UTAMA

 Pilih opsi menu di bawah ini:
 [1]: Mulai KRS War (Start)
 [2]: Konfigurasi Browser (Headless, Block Assets)
 [3]: Atur Target Mata Kuliah (Courses)
 [4]: Konfigurasi Jadwal & Percobaan (Schedule)
 [5]: Konfigurasi Akun & Server (.env)
 [6]: Lihat Pengaturan Saat Ini
 [7]: Keluar (Exit)



 Pilih menu (1-7) (1): 2

  KONFIGURASI BROWSER

 Jalankan Browser tanpa tampilan (Headless)? [y/N]: y
 Lebar Browser (Width) (1920): 
 Tinggi Browser (Height) (1080): 
 Blokir Gambar (Menghemat Kuota & RAM)? [Y/n]: 
 Blokir CSS Styles (Sangat direkomendasikan agar cepat)? [Y/n]: 
 Blokir Fonts? [Y/n]: 
 Blokir Video/Audio? [Y/n]: 
 Konfigurasi browser berhasil disimpan ke config.json!



  KRS WAR BOT CLIENT - MENU UTAMA

 Pilih opsi menu di bawah ini:
 [1]: Mulai KRS War (Start)
 [2]: Konfigurasi Browser (Headless, Block Assets)
 [3]: Atur Target Mata Kuliah (Courses)
 [4]: Konfigurasi Jadwal & Percobaan (Schedule)
 [5]: Konfigurasi Akun & Server (.env)
 [6]: Lihat Pengaturan Saat Ini
 [7]: Keluar (Exit)



 Pilih menu (1-7) (1): 3

  ATUR TARGET MATA KULIAH

 Daftar mata kuliah saat ini:
 [1]: Algoritma Pemrograman (Kelas: IF 5A)
 [2]: Basis Data (Kelas: IF 4B)

 Pilih tindakan:
 [1]: Tambah Mata Kuliah
 [2]: Hapus Mata Kuliah
 [3]: Kembali ke Menu Utama



 Pilih tindakan (1-3) (1): 3

  KRS WAR BOT CLIENT - MENU UTAMA

 Pilih opsi menu di bawah ini:
 [1]: Mulai KRS War (Start)
 [2]: Konfigurasi Browser (Headless, Block Assets)
 [3]: Atur Target Mata Kuliah (Courses)
 [4]: Konfigurasi Jadwal & Percobaan (Schedule)
 [5]: Konfigurasi Akun & Server (.env)
 [6]: Lihat Pengaturan Saat Ini
 [7]: Keluar (Exit)



 Pilih menu (1-7) (1): 4

  KONFIGURASI JADWAL

 Waktu KRS Aktif (HH:MM:SS) (22:00): 08:00
 Tanggal KRS Aktif (YYYY-MM-DD, kosongkan jika hari ini): 2026-08-10
 Delay Percobaan Ulang (dalam detik, misal 0.5) (0.5): 
 Maksimal Percobaan Ulang (Max Retry, ketik 0 untuk Unlimited): 0 
 Konfigurasi jadwal berhasil disimpan ke config.json!



  KRS WAR BOT CLIENT - MENU UTAMA

 Pilih opsi menu di bawah ini:
 [1]: Mulai KRS War (Start)
 [2]: Konfigurasi Browser (Headless, Block Assets)
 [3]: Atur Target Mata Kuliah (Courses)
 [4]: Konfigurasi Jadwal & Percobaan (Schedule)
 [5]: Konfigurasi Akun & Server (.env)
 [6]: Lihat Pengaturan Saat Ini
 [7]: Keluar (Exit)



 Pilih menu (1-7) (1): 6

  DETAIL PENGATURAN SAAT INI

 === BROWSER ===
 Headless Mode: true
 Dimensi Layar: 1920x1080
 Blokir Gambar: true
 Blokir CSS: true
 === JADWAL & SISTEM ===
 Waktu KRS: 08:00
 Tanggal KRS: 2026-08-10
 Delay Retry: 0.5 detik
 Max Retry: 1000000000
 === TARGET KURSUS ===
 Target #1: Algoritma Pemrograman (Kelas: IF 5A)
 Target #2: Basis Data (Kelas: IF 4B)



 Tekan Enter untuk kembali ke Menu Utama:

  KRS WAR BOT CLIENT - MENU UTAMA

 Pilih opsi menu di bawah ini:
 [1]: Mulai KRS War (Start)
 [2]: Konfigurasi Browser (Headless, Block Assets)
 [3]: Atur Target Mata Kuliah (Courses)
 [4]: Konfigurasi Jadwal & Percobaan (Schedule)
 [5]: Konfigurasi Akun & Server (.env)
 [6]: Lihat Pengaturan Saat Ini
 [7]: Keluar (Exit)



 Pilih menu (1-7) (1): 1

  MULAI KRS WAR

 Mata kuliah target terkonfigurasi. Memulai engine KRS War...

Main workflow

  1. Initialization: The bot verifies the .env file and reads config.json.
  2. Authentication: It generates a unique device fingerprint and validates the local license key with the central API server.
  3. Configuration UI: The user is presented with a terminal menu to adjust courses or timing.
  4. Standby: The bot waits idly until the target schedule time approaches.
  5. Execution: A Chromium instance is launched via Go-Rod. It navigates to the portal, blocks unnecessary assets, logs in, selects the predefined courses, and submits the form.
  6. Auditing: Success or failure screenshots are captured asynchronously and saved to the warResult/ directory.

Important usage notes

  • Licensing: This bot is a paid software. A valid license key is strictly enforced by the server. Please register via Telegram before attempting to use the bot.
  • If Chromium is not detected on the machine, the bot will automatically download the necessary binaries on the first run.
  • Ensure the target courses match the exact spelling found on the academic portal.

Development

The bot is developed entirely in Golang to leverage its concurrency model and ease of distributing single binary executables.

  • Go-Rod: Used as the primary web automation driver. It communicates with Chromium via the Chrome DevTools Protocol (CDP) and allows for fine-grained control over browser behavior, which is critical for bypassing client-side bottlenecks.
  • Bubble Tea (Charmbracelet): Powers the terminal user interface (TUI). It provides an interactive, state-driven CLI experience for users to manage their configurations without needing a web dashboard.
  • Project Structure: Organized using standard Go project layouts.
    • cmd/bot/ contains the main entry point.
    • internal/browser/ manages Go-Rod and the Chromium lifecycle.
    • internal/security/ handles hardware fingerprinting and license validation.
    • internal/ui/ handles the terminal rendering logic.

Highlights

Network Asset Hijacking
To ensure the absolute fastest response time during heavy server load, the Go-Rod driver implements CDP request interception. It actively intercepts and blocks CSS, fonts, and media files at the network level, drastically reducing the page payload and rendering time.

Asynchronous Screenshot Service
Taking a screenshot of the browser state usually blocks the execution thread, which is detrimental when milliseconds matter. The bot solves this by implementing an asynchronous screenshot worker. When a critical action occurs, the browser captures the frame and passes the data to a background Goroutine to save it to disk (warResult/success or warResult/failed), allowing the main bot loop to continue unhindered.

Hardware-Bound Licensing
To prevent unauthorized distribution of the bot, it incorporates OS-level device fingerprinting. This hash is validated against a central server API to verify if the license key belongs to the current hardware.