Hack The Box To Notion
hackthebox-notion
Aim
The Python script automates the process of fetching machines from the Hack The Box platform and storing them in a Notion database. Users provide essential parameters such as the Notion Database ID, Notion Token, and Hack The Box Token through a .env file. The script utilizes these tokens to authenticate and access both platforms. Additionally, it incorporates a pre-defined template for each machine within Notion, ensuring consistent formatting and structure. This streamlined approach simplifies the task of cataloging machines, enhancing efficiency and organization for users managing their Hack The Box progress.
What are these platforms for?
Hack The Box
Hack The Box or otherwise also known as HTB is an online platform that provides hands-on training in cybersecurity through various challenges and virtual labs. It offers a gamified environment where users can enhance their skills in penetration testing, reverse engineering, web application security, cryptography, and other related fields. Participants, often referred to as "hackers," solve challenges by exploiting vulnerabilities in simulated systems, gaining points and rankings as they progress. Hack The Box also features an active community where users can collaborate, share knowledge, and discuss cybersecurity topics. It serves as a valuable resource for individuals seeking to develop practical cybersecurity skills and stay updated on the latest techniques and tools in the field.
Some similar apps to HTB
Many more...
Notion
Notion is an all-in-one workspace and collaboration platform that enables users to create, organize, and share information in various formats. It combines the functionalities of note-taking, project management, document collaboration, and database management into a single intuitive interface. Users can create pages, databases, and templates to structure their work, and customize them with text, images, files, and embedded content. Notion offers flexibility in organizing information, allowing users to create hierarchical structures, link related items, and tag content for easy retrieval. It also supports real-time collaboration, enabling teams to work together on documents, tasks, and projects. Notion is highly customizable, with features such as kanban boards, calendars, and timelines, making it suitable for personal use, team collaboration, and knowledge management across various domains.
Some similar apps to Notion
- Cherry Tree
- GitBook - will check in the future
- Evernote - Not tried yet
Many more...
Now, let's move on to explore the practical requirements and installation process for the project
Requirements
Installation
- Clone this repository:
git clone https://github.com/spllat-00/hackthebox-notion.git
- Install the required Python packages
pip install -r requirements.txt
Setup your Notion integration and get your API credentials.
Visit Notion integration
Add to your required workspace
Give the integration a name:
HackTheBox-Notion
(Can be anything as per user)- Add logo for easy access. (Logo provided in git repo)
Hit Submit
View your Secret, by click
show
This is:
NOTIONTOKEN
in .env file
Setup your Hack The Box App Token
- Visit Hack The Box Settings
Click
Generate Identifier
Give it a name:
HackTheBox2Notion
(Can be anything as per user)Set the expire time:
1 Year
Copy the App Token
This is:
HTBTOKEN
in .env file
Copy the template Hack The Box - Notion Template
- Open the Hack The Box - Notion Template
Click
Duplicate
button on top-rightSelect the same workspace you created the Notion Integration.
Connect the newly created notion integration to the workspace
- Select
options
in top-right. In
Connections > Connect to
, select:HackTheBox-Notion
Hit Confirm
- Select
Find the Database ID
On the database of gallery, hit 6-dots
Select
Copy link
It will be in this format:
https://www.notion.so/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?v=someOtherFormathere&pvs=4
- We need the
xxxxx
part, that should be of 32 characters - This is:
NOTIONDATABASEID
- Create a file with name
.env
file withNOTIONTOKEN
,HTBTOKEN
andNOTIONDATABASEID
values from above
Usage
Run the script
python3 HTB2Notion.py
For checking the help, use flag: -h / --help
Screenshots
- Running of the script for new machines
- Template
Configuration
- HTBTOKEN=HTB_JWT_Token
- NOTIONTOKEN=Notion_Token
- NOTIONDATABASEID=32-bit-ID
Contributing
Contributions are welcome! Feel free to open issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Subscribe to my newsletter
Read articles from Payas Kale directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Payas Kale
Payas Kale
Hey there! I'm Payas ๐, a tech enthusiast who loves digging into computer security and creating cool stuff with code. When I'm not busy working on IT stuff, I'm having a blast playing Valorant ๐ฎ.