Roadmaps / Python
🐍
intermediate Roadmap #4

Python

From writing custom network scanners to building web scrapers and exploit scripts, Python is the language that gives you the power to create your own security tools. This roadmap takes you from basics to security-focused programming.

📚 10 lessons ⏱ ~25h 📊 intermediate

Create a free account to track your progress and unlock all features.

Get Started Free Sign In
Python Basics Data Structures File I/O Networking with Python Requests & Scraping Socket Programming Automation Scripts Exploit Writing

📋 Lessons (10 total)

1
Python Basics & Environment Setup Easy prereq required

Install Python, set up a virtual environment, and write your first scripts using variables, types, and input/output.

⏱ 45m
2
Control Flow & Functions Easy prereq required

Master if/elif/else, for and while loops, and write reusable functions with arguments, return values, and default parameters.

⏱ 50m
3
Data Structures: Lists, Dicts & Sets Easy prereq required

Work with Python's core built-in containers: lists, tuples, dictionaries, and sets — and apply them to real security use cases.

⏱ 55m
4
File I/O & JSON Medium prereq required

Read, write, and parse files in Python — including text logs, CSV reports, and JSON configuration files used in security tools.

⏱ 55m
5
Object-Oriented Python Medium prereq required

Build classes and objects to model security tools — encapsulate scanner logic, extend base classes, and use dunder methods.

⏱ 60m
6
Networking with Sockets Medium prereq required

Use Python's socket module to build TCP/UDP clients and servers, scan ports, grab banners, and understand low-level network communication.

⏱ 65m
7
HTTP Requests & Web Scraping Medium prereq required

Use the requests library and BeautifulSoup to make HTTP calls, scrape web content, probe APIs, and automate form submissions.

⏱ 65m
8
Regular Expressions & Log Parsing Medium prereq required

Master Python's re module to write patterns that extract IPs, timestamps, usernames, and anomalies from real-world log files.

⏱ 70m
9
Subprocess & OS Automation Hard prereq required

Run shell commands from Python using subprocess, automate system tasks with the os and pathlib modules, and build security automation scripts.

⏱ 70m
10
Building a Port Scanner Hard prereq required

Bring together everything learned — OOP, sockets, threading, file I/O, and argparse — to build a production-quality multi-threaded port scanner with JSON and CSV output.

⏱ 90m
🐍

Python = Security Superpower

From writing custom exploits to building defensive tools, Python is the language of security professionals.

import socket, requests
from scapy.all import *
s = socket.socket()
s.connect(('target', 80))

Recommended Before

Complete earlier roadmaps in the sequence for best results.

View all roadmaps →

What You'll Learn

  • Write clean, effective Python scripts
  • Build network tools and port scanners
  • Automate repetitive security tasks
  • Parse and analyze data from security tools
  • Develop your own security scripts and exploits