Overview
HackTheBox is a platform that makes hacking competitive with vulnerable machines that test your offensive security skills. I had a few phases where I was very active on this platform, and I wrote a pretty beefy Python script to interact with the app through a CLI.
It implements things like booting up a certain machine to hack, getting its status/description, submitting flags, and more.
$ ./htb.py -m lame
Lame - Easy Linux - Retired - by ch4p
https://app.hackthebox.com/machines/1
Released March 14, 2017 (1975 days ago)
User Difficulty Rating 26/100
42127 User Owns, 44889 Root Owns
Rating - 4.6/5 Stars - 137 Reviews
##############################################----
Difficulty Ratings:
1 ################################################## 23780
2 ##################################---------------- 16372
3 ########################-------------------------- 11465
4 #######------------------------------------------- 3585
5 ###########################----------------------- 12951
6 #------------------------------------------------- 648
7 -------------------------------------------------- 380
8 -------------------------------------------------- 203
9 -------------------------------------------------- 88
10 -------------------------------------------------- 240
Repository
(FYI this is several years old and I’m not even sure it still works)
anton-3/htb-api
Simple command-line interface to call the HackTheBox API
Updated 3 years ago
Last updated on December 28, 2025.