import requests
import argparse
import json
def get_ip_info(ip_address):
""" Fetches geolocation data for a given IP. """
# NOTE: IP lookup is now done directly via the browser using a CORS-compatible endpoint.
api_url = f"https://corsproxy.io/?http://ip-api.com/json/{ip_address}?fields=query,country,city,isp,lat,lon"
try:
response = requests.get(api_url)
data = response.json()
if data['status'] == 'success':
print("--- IP Geolocation Data ---")
for key, value in data.items():
print(f"{key.capitalize():<15}: {value}")
if data['lat'] and data['lon']:
map_url = f"https://maps.google.com/maps?q=${data['lat']},{data['lon']}"
print(f"\nGoogle Maps Link: {map_url}")
except Exception as e:
print(f"An error occurred: {e}")
# Usage: python ip_geolocate.py 8.8.8.8
Core Applications in Cybersecurity
Penetration Testing
Crafting custom exploits, automating vulnerability scanning, and developing offensive security tools.
Security Automation (SOAR)
Automating incident response playbooks, integrating security tools, and orchestrating defensive actions.
Forensics & Log Analysis
Parsing massive log files, analyzing disk images, and extracting critical evidence during investigations.
Malware Analysis
De-obfuscating malicious code, analyzing malware behavior, and extracting Indicators of Compromise (IOCs).
Threat Intelligence
Aggregating data from threat feeds via APIs to identify attack patterns and emerging threats.
Web App Security
Building tools for crawling websites, fuzzing inputs, and testing for vulnerabilities like SQLi and XSS.
My Personal Expertise
For me, Python is more than just a language; it's a force multiplier. I leverage it daily to build custom security tools, automate repetitive tasks, and analyze complex data sets. Whether I'm developing a script to test for a new vulnerability, creating a tool to parse gigabytes of log data for signs of an intrusion, or architecting a security automation workflow, Python's power and simplicity allow me to solve problems efficiently and effectively. My proficiency with libraries like Scapy, Requests, Pandas, and various security-focused SDKs enables me to rapidly prototype and deploy robust solutions in high-stakes environments.