Chanakya is a Python-based offensive security and reconnaissance framework developed under the JustHackIT brand. It brings reconnaissance, automated discovery, vulnerability testing, API-based dorking, SQL injection automation, proxy validation, and security assessment modules into a unified command-line interface.
Inspired by the strategic thinking of Chanakya, the project is built around a simple principle:
βKnow your enemy before the battle.β β Chanakya
Current Version: 3.1.6
Chanakya is intended only for authorized security testing, research, penetration testing, and educational purposes.
Do not use Chanakya against systems, applications, networks, accounts, or infrastructure without explicit authorization.
The developer and contributors are not responsible for misuse, damage, data loss, service disruption, or unauthorized activity resulting from the use of this software.
By using Chanakya, you agree to take full responsibility for your actions.
Chanakya is designed to help security professionals automate repetitive stages of offensive security assessments.
Instead of relying on multiple unrelated command-line tools for every stage, Chanakya provides a single interface for performing reconnaissance, discovery, and controlled vulnerability assessment.
The project is actively developed under the JustHackIT cybersecurity initiative.
Recon
β
Discovery
β
Enumeration
β
Security Testing
β
Evidence Collection
β
Assessment
β
Reporting
Chanakya includes multiple security assessment capabilities, including:
1. Port Scanning
ββ Discover open ports on authorized targets.
2. Service Scanning
ββ Identify services exposed on discovered ports.
3. Reconnaissance
ββ Gather information useful during security assessments.
4. Dorking
ββ Perform API-assisted search-based reconnaissance.
5. SQL Injection Testing
ββ Perform controlled SQL injection assessment and automation.
6. Command Injection Testing
ββ Validate suspected command injection using controlled canaries.
7. XSS Testing
ββ Detect reflected input and analyze reflection context.
8. JWT Security Assessment
ββ Analyze JWT structure, headers, claims, algorithms,
expiration, and other configuration indicators.
9. Proxy Fetching & Validation
ββ Fetch and validate proxies using concurrent requests.
10. AI-Assisted Security Analysis
ββ Send collected assessment evidence to the configured
Chanakya AI provider for additional analysis.
11. JSON Reporting
ββ Store assessment evidence and results as structured reports.
Available modules and menu options may change between releases.
Chanakya/
βββ ai/
βββ attack/
βββ scanners/
βββ utils/
βββ img/
β
βββ chanakya.py
βββ dorks.txt
βββ requirements.txt
βββ README.md
βββ LICENSE
β
βββ reports/
βββ ...
Local/generated files such as the following should not be committed to the repository:
.env
reports/
scanner.log
valid_proxies.txt
__pycache__/
*.pyc
virtual environments
local test files
Use .gitignore to keep environment-specific and generated data out of Git.
Chanakya is primarily written in Python.
Major technologies and libraries used by the project include:
- Python 3
- Requests
- urllib3
- python-dotenv
- Nmap
- SQLMap
- Socket
- Concurrent futures
- JSON
- Regular expressions
- ANSI terminal colors
- Configured AI provider integrations
Depending on the enabled modules, additional system tools or API credentials may be required.
Recommended prerequisites:
- Python 3.8+
- Git
- Internet connection
- Nmap
- SQLMap
- Required Python packages from
requirements.txt
Some modules may require additional API credentials or system dependencies.
git clone https://github.com/VirusZzHkP/Chanakya.git
cd ChanakyaLinux/macOS:
python3 -m venv venv
source venv/bin/activateWindows:
python -m venv venv
venv\Scripts\activatepip install -r requirements.txtChanakya may use environment variables for API credentials and other configuration.
Create a local .env file:
SERPAPI_KEY=your_key_here
SCRAPINGANT_KEY=your_key_here
GOOGLE_CSE_API_KEY=your_key_here
GOOGLE_CSE_CX=your_custom_search_engine_id
# Primary AI provider
OPENAI_API_KEY=your_key_here
# Fallback AI provider
GEMINI_API_KEY=your_key_here
# Models
OPENAI_MODEL=gpt-5.4-mini
GEMINI_MODEL=gemini-3.5-flash
If AI functionality is enabled in your configuration, add the required credentials for your configured AI provider as appropriate.
Your .env file can contain secrets.
Make sure it is listed in .gitignore:
.env
.env.*For dork-based reconnaissance, maintain your authorized search queries in:
dorks.txt
Example:
site:example.com
site:example.com inurl:id=
site:example.com filetype:pdf
Only perform reconnaissance against targets and domains where you have appropriate authorization.
Start Chanakya with:
python3 chanakya.pyOn Windows:
python chanakya.pyFollow the interactive menu to select the required security assessment module.
Identify accessible TCP ports on an authorized target.
Perform basic service discovery against exposed ports.
Chanakya can integrate SQL injection assessment capabilities and SQLMap-based testing.
Use only against applications where testing is explicitly authorized.
The command-injection validator uses controlled testing techniques and evidence collection.
It intentionally avoids:
- Reverse shells
- Persistence
- Arbitrary command execution
- Payload delivery
- Credential theft
The XSS module performs controlled reflection testing using unique inert canaries.
It focuses on:
- Input reflection
- Reflection count
- Reflection context
- HTML text context
- HTML attribute context
- JavaScript context
- CSS context
- HTML comments
The validator does not intentionally execute JavaScript.
The JWT assessment module analyzes supplied JWTs for indicators such as:
- JWT structure
- Header configuration
- Algorithm selection
- Registered claims
- Expiration
- Issued-at timestamps
- Not-before timestamps
- Issuer
- Audience
- Subject
- Sensitive claim names
- Privilege-related claims
- Algorithm/key-type indicators
The module is intended for defensive assessment and does not brute-force signing secrets or generate forged privileged tokens.
Chanakya can provide collected assessment evidence to the configured AI analysis layer.
AI analysis is intended to help with:
- Interpreting findings
- Correlating evidence
- Explaining potential security impact
- Providing remediation-oriented context
- Prioritizing observations
AI output should be treated as analysis assistance, not as definitive proof of a vulnerability.
Always validate important findings manually.
Chanakya generates structured JSON evidence for supported assessment modules.
Reports are stored locally under the configured reports directory.
Example:
reports/
βββ attacks/
β βββ ...
βββ xss/
β βββ ...
βββ command_injection/
βββ ...
Generated reports may contain sensitive assessment information.
Do not publish or commit reports containing:
- Authentication tokens
- API keys
- Credentials
- Internal URLs
- Private infrastructure information
- Sensitive application data
- Personally identifiable information
Before running Chanakya against a target, ensure that you have permission to test it.
Good practice includes:
β Written authorization
β Defined scope
β Approved target list
β Approved testing window
β Rate limits
β Emergency contact
β Data-handling requirements
β Reporting requirements
Avoid testing production systems aggressively unless the engagement explicitly permits it.
Clone the repository:
git clone https://github.com/VirusZzHkP/Chanakya.git
cd ChanakyaCreate a development environment:
python3 -m venv venv
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtRun Chanakya:
python3 chanakya.pyBefore submitting changes, verify that:
- Secrets are not committed.
- .env is not committed.
- Generated reports are not committed.
- Local logs are not committed.
- Virtual environments are not committed.
- Temporary test files are not committed.
- New modules are correctly imported.
- Existing functionality remains operational.
Current release:
Chanakya v3.1.6
Future development may include:
- Expanded reconnaissance modules
- Improved vulnerability detection
- Additional authentication testing
- Better evidence correlation
- Improved reporting
- Additional AI-assisted analysis
- Modular scanner architecture
- Performance improvements
- More automation workflows
The roadmap may evolve as Chanakya develops.
Chanakya is developed under the JustHackIT cybersecurity brand.
Website: justhackit.in
Instagram: @justhackit.in
VirusZzWarning
Made with β₯ by VirusZzWarning
Chanakya is distributed under the MIT License.
Chanakya is built around the philosophy of strategic security testing:
Observe.
Recon.
Understand.
Test.
Validate.
Report.
Use the tool responsibly, stay within scope, and always test with authorization.
Be the strategist, not the pawn.
Chanakya v3.1.6 Β· A JustHackIT Project
