Skip to content

This tool combines the power of Ollama (Mistral) with your terminal to turn natural language into real shell commands. Whether you want to scan websites with nmap or ping a server, just type what you want β€” HackerAI handles the rest. All locally, without any API costs!

License

Notifications You must be signed in to change notification settings

yogsec/Hacker-AI

Repository files navigation

πŸš€ HackerAI - Your Local AI Security Assistant

Welcome to HackerAI! This tool combines the power of Ollama (Mistral) with your terminal to turn natural language into real shell commands. Whether you want to scan websites with nmap or ping a server, just type what you want β€” HackerAI handles the rest. All locally, without any API costs! πŸ±β€πŸ’»

https://github.com/yogsec/Hacker-AI/blob/main/Screenshot%20from%202025-03-04%2015-50-47.png?raw=true


πŸ“₯ Installation Guide

1️⃣ Install Ollama

Ollama is the core engine that runs the AI model Mistral locally.

πŸ”— Install Ollama from: https://ollama.com/download

For Linux:

curl -fsSL https://ollama.com/install.sh | sh

For Windows: πŸ‘‰ Install via: https://ollama.com/download


2️⃣ Download the Mistral Model

After installing Ollama, pull Mistral (recommended lightweight model):

ollama pull mistral

3️⃣ Clone or Download HackerAI

git clone https://github.com/yogsec/hackerai.git
cd hackerai

Or download hackerai.py manually if you want.


4️⃣ Install Python Requirements

Make sure you have Python 3.8+ and install required libraries:

pip install -r requirements.txt

Create requirements.txt:

requests

5️⃣ Run HackerAI

Start Ollama (if not already running):

ollama serve

Then run:

python3 hackerai.py

⚑ Usage

Just type natural language commands like:

What do you want to do? (e.g., scan google.com with nmap): scan google.com with nmap

HackerAI will think πŸ€” and execute:

nmap google.com

πŸ“– Other Examples

Input Action
scan google.com with nikto Runs nikto -h google.com
ping example.com Runs ping -c 4 example.com
curl example.com Runs curl example.com

πŸ› οΈ Common Problems & Solutions

Problem Cause Solution
Error communicating with Ollama Ollama is not running Start Ollama with ollama serve
Model mistral not found Mistral not downloaded Run ollama pull mistral
This request doesn't translate into a valid shell command Non-technical request (like "who is the richest man") Only ask for commands related to hacking or sysadmin work.
Syntax Error in Command Mistral hallucinated something wrong Rephrase the question or ask in simpler terms

πŸ’» Supported Commands (Examples)

βœ… Scan websites with nmap
βœ… Scan vulnerabilities with nikto
βœ… Perform ping tests
βœ… Fetch URLs with curl
βœ… Extendable to any command you want!


⚠️ Important Note

HackerAI only supports practical shell commands. It does not answer general knowledge questions like "who is the richest person". It’s focused only on commands you can run in a terminal.


🌟 Let's Connect!

Hello, Hacker! πŸ‘‹ We'd love to stay connected with you. Reach out to us on any of these platforms and let's build something amazing together:

🌐 Website: https://yogsec.github.io/yogsec/
πŸ“œ Linktree: https://linktr.ee/yogsec
πŸ”— GitHub: https://github.com/yogsec
πŸ’Ό LinkedIn (Company): https://www.linkedin.com/company/yogsec/
πŸ“· Instagram: https://www.instagram.com/yogsec.io/
🐦 Twitter (X): https://x.com/yogsec
πŸ‘¨β€πŸ’Ό Personal LinkedIn: https://www.linkedin.com/in/cybersecurity-pentester/
πŸ“§ Email: abhinavsingwal@gmail.com


β˜• Buy Me a Coffee

If you find our work helpful and would like to support us, consider buying us a coffee. Your support keeps us motivated and helps us create more awesome content. ❀️

β˜• Support Us Here: https://buymeacoffee.com/yogsec


🏁 Ready? Start Hacking (Legally)! πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»


Want me to generate the requirements.txt and installation.txt files too, so you have a complete package to upload to GitHub? 😎

About

This tool combines the power of Ollama (Mistral) with your terminal to turn natural language into real shell commands. Whether you want to scan websites with nmap or ping a server, just type what you want β€” HackerAI handles the rest. All locally, without any API costs!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages