PyHackTheBox
pyhackthebox is an unofficial Python library designed to automate
accessing the Hack The Box API.
Getting Started
Setting up an API connection:
from hackthebox import HTBClient
client = HTBClient(email="user@example.com", password="S3cr3tP455w0rd!", otp="123456")
print(client.user)
Getting a challenge:
client.get_challenge(200)
print(challenge.name)
Searching for a user:
results = client.search("g0blin")
print(results.users)
Module Index
hackthebox.htb— The HTB API Clienthackthebox.challenge— HTB Challengeshackthebox.machine— HTB Machineshackthebox.fortress— HTB Fortresseshackthebox.endgame— HTB Endgameshackthebox.leaderboard— HTB Leaderboardshackthebox.team— HTB Teamshackthebox.user— HTB Usershackthebox.search— The HTB Searching APIhackthebox.errors— HTB API Client errorshackthebox.solve— HTB Flag Submissionhackthebox.vpn— HTB VPN Utilities