A Discord bot that tracks your Hack The Box (HTB) progress throughout the week and provides weekly reports, leaderboards, and automated reset scheduling.
- User Tracking: Track HTB users by their User ID via DM
- Weekly Goals: Set targets for machines and challenges (default: 1 machine, 2 challenges)
- Activity Monitoring: Automatically detects user/root flags and challenge solves
- Weekly Report: Generates a summary every Saturday at 21:00 (Greek time)
- Leaderboard: Shows top 10 hackers ranked by total solves and streak
- Personal Stats: Users can check their own progress anytime
- Streak Tracking: Tracks consecutive weeks of meeting goals
| Command | Description |
|---|---|
!track |
Start tracking your HTB account via DM |
!untrack |
Stop tracking your HTB account |
!stats |
View your personal weekly progress |
!top |
View the weekly leaderboard |
!reset_week |
(Admin) Manually trigger weekly reset |
If you have Nix installed with flakes enabled:
nix developThis will enter a shell with all dependencies installed automatically.
-
Clone the repository
git clone https://github.com/UniversityOfAthens/HTB-Progress-Tracker.git cd HTB-Progress-Tracker -
Install dependencies
pip install discord.py requests python-dotenv
-
Configure environment variables
cp .env.example .env
Edit
.envand add your credentials:DISCORD_TOKEN=your_discord_bot_token HTB_API_TOKEN=your_htb_api_token CHANNEL_ID=your_discord_channel_id HTB_API_URL="https://labs.hackthebox.com" -
Run the bot
python3 bot.py
Edit the constants in bot.py to customize:
GOAL_MACHINES = 1 # Weekly machine goal
GOAL_CHALLENGES = 2 # Weekly challenge goalIf you need to sync root flags without waiting for the weekly reset:
python3 utils/update_root_flags.pyHTB-Progress-Tracker/
├── bot.py # Main Discord bot
├── utils/
│ └── update_root_flags.py # Utility for manual root flag updates
├── htb_data.json # Database file (auto-generated)
├── .env # Environment variables
├── .env.example # Environment template
└── README.md # This file
- Users run
!trackand provide their HTB User ID - The bot fetches their current activity to establish a baseline
- Every 10 minutes, the bot checks for new activity (user flags, root flags, challenge solves)
- When goals are met, the streak increases; otherwise, it resets
- Every Saturday at 21:00 (Greek time), a weekly report is generated and sent to the configured channel
- Users who missed their goals are publicly "shamed" with mentions
- Python 3.8+
- Discord.py
- requests
- python-dotenv
Or use Nix with flakes for automatic dependency management:
nix developMIT