This is a text-based cyber-security simulator that leverages OpenAI's GPT models to create dynamic scenarios, provide educational guidance, and generate solutions. Users can choose difficulty levels or create custom scenarios for a personalized hacking experience.
- Dynamic Scenarios: Generates unique and evolving scenarios with hacking challenges based on user input.
- Educational Feedback: Offers step-by-step guidance to help users understand their commands and actions.
- Solution Generation: Provides an end goal and correct solution for each scenario to track user progress.
- Contextual Logging: Logs all interactions, saving chat histories for scenarios, educational feedback, and solutions.
- Node.js
- OpenAI API Key
- Dotenv for environment variables
- Chalk for colored output
-
Clone the repository:
git clone <repository-url> -
Install dependencies:
npm install -
Create a
.envfile in the root directory and add your OpenAI API key:OPENAI_API_KEY=your-api-key -
Run the application:
node game.js
Upon starting, select an option:
-
Easy
-
Medium (Default)
-
Hard
-
Custom Scenario: For a custom scenario, type your scenario after selecting option 4.
-
Scenario Generation: After selecting a difficulty or entering a custom scenario, the AI generates a scenario with objectives, equipment, and known information.
-
User Interaction: Enter commands to interact with the scenario, such as attempting port scans or finding passwords.
-
Refinement and Feedback: The simulator refines scenarios dynamically based on your actions and provides educational feedback to guide you.
-
End Goal: Achieve the objective of each scenario, guided by hints and feedback.
