Python · Module V. Python for networks and security

Lesson 21. The IpIntel project

Capstone project: an IP list, API requests with timeout, status checks, country/ISP reports and error handling.

AdvancedReading ≈ 45 minPractice ≈ 25 minNot started

In short

Capstone project: an IP list, API requests with timeout, status checks, country/ISP reports and error handling.

How it works

🔗 Useful in CCNA / Helpdesk: The project models SOC IOC enrichment, but practice addresses are documentation ranges, not real attackers.

Project flow: IP list → loop → requests.get(..., timeout=5) → raise_for_status() → response.json() → status check → report row. Separating get_ip_info(ip) from main() makes the logic testable and lets you change APIs without rewriting the program.

Extensions: input through sys.argv or a file, CSV/JSON output, a fallback API and OTX/VirusTotal checks with keys from os.environ. Test report formatting offline first, including status: fail, without spending real requests.

  • Extract format_row(record) from the loop and test two offline cases: success and fail.
  • Add sys.argv input to main: one IP or Usage when no argument is given.
  • Save an offline report to CSV with ip,country,isp columns.

Loading progress…