A powerful Python-based tool designed for comprehensive IP address analysis, providing detailed insights into IP addresses, their geolocation, network characteristics, and security implications. Perfect for network administrators, security professionals, and developers who need detailed IP intelligence.
- Python 3.8 or higher
- macOS (for these specific instructions)
- pip (Python package installer)
- Minimum 2GB RAM
- Internet connection for real-time IP lookups
- Comprehensive IP address validation
- IPv4 and IPv6 support
- CIDR notation parsing
- Subnet calculation
- Private/Public IP detection
- Country and city detection
- ISP identification
- Timezone information
- Latitude and longitude coordinates
- Region and postal code data
- ASN (Autonomous System Number) lookup
- Network range detection
- Reverse DNS lookup
- Connection type identification
- Network speed analysis
- Threat intelligence integration
- Blacklist checking
- VPN/Proxy detection
- TOR exit node verification
- Abuse history reporting
- JSON/CSV export capabilities
- Customizable report formats
- Batch processing support
- Historical data tracking
- Real-time monitoring
- Open Terminal and navigate to the project directory:
cd /path/to/ip_analyzer
- Install virtualenv if you haven't already:
pip3 install virtualenv
- Create a new virtual environment:
python3 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
💡 Pro Tip: Add this alias to your ~/.zshrc or ~/.bash_profile for quick activation:
alias ip-analyzer-activate="cd /path/to/ip_analyzer && source venv/bin/activate"
Note: To deactivate the virtual environment when you're done, simply run:
deactivate
With the virtual environment activated, you have two installation options:
- Basic Installation (for users):
pip install -r requirements.txt
- Development Installation (for contributors):
pip install -r requirements.txt
pip install -r requirements-dev.txt # Additional development tools
The project uses the following major dependency categories:
-
Core Dependencies
- requests>=2.31.0 - HTTP requests handling
- ipaddress>=1.0.23 - IP address manipulation
- python-dotenv>=1.0.0 - Environment management
- pyyaml>=6.0.1 - Configuration handling
-
IP Analysis & Networking
- netaddr>=0.8.0 - Network address manipulation
- dnspython>=2.4.2 - DNS toolkit
- geoip2>=4.7.0 - IP geolocation
- maxminddb>=2.4.0 - MaxMind GeoIP database
-
Data Processing
- pandas>=2.1.0 - Data analysis
- numpy>=1.24.0 - Numerical operations
- validators>=0.22.0 - Data validation
-
Security Tools
- requests-ip-rotator>=1.0.14
- pysafebrowsing>=0.1.2
- tor-ip-api>=0.1.1
-
Development Tools
- pytest>=7.4.2 - Testing
- black>=23.7.0 - Code formatting
- flake8>=6.1.0 - Linting
- mypy>=1.5.1 - Type checking
💡 Note: Make sure your Python version is compatible (3.8 or higher) before installing dependencies.
- Copy the example configuration file:
cp config.example.yml config.yml
- Edit the configuration file with your preferred settings:
nano config.yml
- Ensure your virtual environment is activated
- Basic usage:
python analyze_ips.py <ip_address>
Single IP analysis:
python analyze_ips.py 8.8.8.8 --detailed
Batch processing:
python analyze_ips.py --input ips.txt --output report.json
Continuous monitoring:
python analyze_ips.py --monitor 192.168.1.1 --interval 60
ip_analyzer/
├── README.md
├── requirements.txt
├── analyze_ips.py
├── config/
│ ├── config.yml
│ └── config.example.yml
├── src/
│ ├── analyzers/
│ ├── utils/
│ └── reports/
├── tests/
│ ├── unit/
│ └── integration/
├── docs/
│ └── api.md
└── venv/
Common issues and solutions:
-
API Rate Limiting
- Increase delay between requests
- Use API key rotation
-
SSL Certificate Issues
pip install --upgrade certifi
-
Memory Usage
- Use batch processing for large datasets
- Enable pagination for large reports
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Create a Pull Request
# Install development dependencies
pip install -r requirements-dev.txt
# Run tests
pytest
# Run linting
flake8
- Use async operations for batch processing
- Enable caching for frequent lookups
- Implement connection pooling
- Use bulk API requests when possible
This project is licensed under the MIT License - see the LICENSE file for details.
- MaxMind for GeoIP data
- AbuseIPDB for threat intelligence
- Contributors and maintainers
- Open-source community