This command-line interface tool enables the management of programs, root domains, subdomains, and alive domains within Hackstore using mysql database.
- Go installed.
- MySQL database.
Follow these steps to create a database using the provided SQL dump file: db_structure.sql
- Ensure you have MySQL installed on your system.
-
Download the SQL Dump File: Obtain the
db_structure.sqlfile containing the database structure. -
Open Terminal (Command Prompt): Launch your terminal or command prompt.
-
Login to MySQL: Log in to your MySQL server using your MySQL credentials.
mysql -u your_username -p
Execute the following SQL command to create a new empty database where you want to import the structure:
> CREATE DATABASE hackstore;$ mysql -u your_username -p hackstore < db_structure.sqlClone the repository:
git clone https://github.com/abhi-recon/hackstore.git
cd hackstore
Install dependencies:
go mod tidy
Build tool
go build -o hackstore
Create a configuration file hackstore-config.yml in the path ~/.config/hackstore/. The file should contain the following database connection details:
username: your_username
password: your_password
host: your_host
port: your_port
database: your_database_nameTo start using the Hackstore CLI tool, execute the following command:
hackstore [command]
Replace [command] with one of the available commands:
programs: Manage programs.
root-domains: Manage root domains.
subdomains: Manage subdomains.
alivedomains: Manage alive domains. List all programs:
hackstore programs list
Import programs from a file:
hackstore programs import -f programs.txt
Add a new program:
hackstore programs add-program -p test_program
Delete a program and associated data:
hackstore programs delete-program -p test_program
List root domains by program:
hackstore root-domains list -p test_program
Import root domains from a file and associate with a program:
hackstore root-domains import -f root_domains.txt -p test_program
Add root domains by program:
hackstore root-domains add-root-domains -p test_program -r example.com -r anotherexample.com
Delete a root domain and associated data:
hackstore root-domains delete-root-domain -r example.com -p test_program
[... Continue this pattern for managing subdomains and alive domains ...]
Ensure the hackstore-config.yml file contains valid MySQL connection details.
For flags and additional options, refer to the help section of each command using --help.
Abhishek Karle