Skip to content

Commit c8e0fc8

Browse files
author
İsmail Taşdelen
committed
master
1 parent e7aed36 commit c8e0fc8

37 files changed

Lines changed: 4185 additions & 0 deletions

.DS_Store

8 KB
Binary file not shown.

CHANGELOG.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Changelog
2+
3+
All notable changes to HackerTarget CLI will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [3.0.0] - 2025-12-31
9+
10+
### 🎉 Major Release - Complete Rewrite
11+
12+
This release brings a complete modernization of the HackerTarget CLI with extensive new features and improvements.
13+
14+
### Added
15+
16+
#### Core Features
17+
18+
- **Modern CLI Interface**: Complete argparse-based CLI with subcommands for each tool
19+
- **Multiple Output Formats**: JSON, CSV, XML, HTML, and enhanced console output
20+
- **Configuration System**: YAML-based configuration with environment variable support
21+
- **Batch Processing**: Process multiple targets from a file
22+
- **API Key Support**: Premium feature support with API key integration
23+
- **Colored Output**: Beautiful colored terminal output with syntax highlighting
24+
25+
#### Developer Experience
26+
27+
- **Comprehensive Logging**: File and console logging with rotation and colored output
28+
- **Error Handling**: Enhanced exception handling with retry logic and exponential backoff
29+
- **Input Validation**: Robust validation for domains, IPs, URLs, and ports
30+
- **Session Management**: Connection pooling and session reuse for better performance
31+
- **Type Hints**: Full type annotations for better IDE support
32+
- **Docstrings**: Comprehensive documentation for all functions and classes
33+
34+
#### New Modules
35+
36+
- `exceptions.py`: Custom exception classes (APIError, RateLimitError, NetworkError, etc.)
37+
- `logger.py`: Advanced logging with colored console output
38+
- `config.py`: Configuration management with YAML and environment variables
39+
- `cli.py`: Modern CLI interface with argparse
40+
- `formatters.py`: Multiple output format support
41+
- `utils.py`: Utility functions for validation and file operations
42+
43+
### Changed
44+
45+
#### API Client (`hackertarget_api.py`)
46+
47+
- **OOP Refactor**: Converted to class-based design (`HackerTargetAPI`)
48+
- **Retry Logic**: Automatic retries with exponential backoff
49+
- **Session Management**: Connection pooling for better performance
50+
- **Response Validation**: Enhanced error detection and handling
51+
- **Rate Limit Detection**: Automatic rate limit detection and handling
52+
- **Batch Query Support**: Query multiple targets with delay control
53+
54+
#### Main Script (`hackertarget.py`)
55+
56+
- **Dual Mode**: Supports both interactive menu and modern CLI
57+
- **Version Bump**: Updated to v3.0.0
58+
- **Colored Menu**: Enhanced visual presentation
59+
- **Feature Discovery**: Tips for using modern CLI features
60+
- **Backward Compatible**: Legacy functionality preserved
61+
62+
#### Package Structure
63+
64+
- **Entry Points**: Console script for easy `hackertarget` command
65+
- **Dependencies**: Updated to modern versions (requests>=2.31.0, pyyaml>=6.0)
66+
- **Python Requirement**: Updated to Python 3.7+
67+
- **Package Metadata**: Enhanced classifiers and keywords
68+
69+
### Improved
70+
71+
- **Documentation**: Updated README with comprehensive usage examples
72+
- **Error Messages**: More informative and actionable error messages
73+
- **Performance**: Connection pooling and session reuse
74+
- **User Experience**: Colored output, better formatting, progress indicators
75+
- **Code Quality**: Type hints, docstrings, and better code organization
76+
77+
### Fixed
78+
79+
- **Error Handling**: Proper exception handling throughout the application
80+
- **Network Errors**: Better handling of timeouts and connection failures
81+
- **Input Validation**: Prevents invalid inputs from reaching the API
82+
83+
### Technical Details
84+
85+
#### New CLI Commands
86+
87+
```bash
88+
# Individual tools
89+
hackertarget dns google.com
90+
hackertarget whois github.com -o json
91+
hackertarget portscan 192.168.1.1 -s results.json
92+
93+
# Batch processing
94+
hackertarget batch -f domains.txt -t dns -o csv
95+
96+
# Configuration
97+
hackertarget config init
98+
hackertarget config set api.api_key YOUR_KEY
99+
```
100+
101+
#### Configuration File Support
102+
103+
```yaml
104+
api:
105+
api_key: null
106+
timeout: 30
107+
max_retries: 3
108+
109+
logging:
110+
level: INFO
111+
colored: true
112+
113+
output:
114+
format: console
115+
colored: true
116+
```
117+
118+
### Migration Guide
119+
120+
#### From v2.0 to v3.0
121+
122+
**Interactive Mode** - No changes required! The interactive menu still works exactly as before:
123+
124+
```bash
125+
python hackertarget.py
126+
```
127+
128+
**New CLI Mode** - Take advantage of new features:
129+
130+
```bash
131+
# Old way (still works)
132+
python hackertarget.py
133+
134+
# New way - Direct command
135+
hackertarget dns google.com
136+
137+
# New features
138+
hackertarget whois example.com -o json -s output.json
139+
```
140+
141+
**API Usage** - Backward compatible:
142+
143+
```python
144+
# Old way (still works)
145+
from source import hackertarget_api
146+
result = hackertarget_api.hackertarget_api(3, "google.com")
147+
148+
# New way (recommended)
149+
from source import HackerTargetAPI
150+
with HackerTargetAPI() as api:
151+
result = api.query(3, "google.com")
152+
```
153+
154+
---
155+
156+
## [2.0] - Previous Release
157+
158+
### Features
159+
160+
- 14 network reconnaissance tools
161+
- Interactive menu interface
162+
- Basic API integration
163+
- Unit tests with mocks
164+
165+
---
166+
167+
## Links
168+
169+
- **Repository**: <https://github.com/ismailtasdelen/hackertarget>
170+
- **Issues**: <https://github.com/ismailtasdelen/hackertarget/issues>
171+
- **HackerTarget API**: <https://hackertarget.com/>

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 İsmail Taşdelen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)