
Learn python from a hacker's perspective to automate tasks, debug scripts, and tackle projects on login brute-forcing, web injection, and using packages like requests.
Discover why hackers learn Python: understand, debug, and modify scripts and proofs of concepts; build your own tools and automate tasks with a beginner-friendly, mature language.
Install sublime text on a linux system via apt, using the stable version from sublime text dot com and enable syntax highlighting for Python scripts.
Explore variables and data types in Python, including strings, integers, lists, tuples, dictionaries, booleans, ranges, and bytes, with casting, printing, and type checks.
Master python strings by defining single, double, and multiline literals, escaping quotes and newlines, and manipulating with upper, lower, strip, split, and replace, then formatting with format or f-strings.
Learn how dictionaries store data as unique key–value pairs in curly brackets, offering fast lookups in Python; create, access, update, remove, iterate keys/values/items, nest dictionaries, and build empty dicts.
Master Python comprehensions to build lists from iterables with concise syntax. Utilize conditionals, range, nested structures, and the join method to compare with long form and apply ternaries.
Explore lambda functions as anonymous one-expression tools in Python, including simple adds, even/odd checks, and breaking strings into blocks, with one-line demos and function rewrites.
Explore the sys standard library module, learning how to access version info, the interpreter executable, platform, standard in, standard out, standard error, command line arguments, and exit codes.
Learn to use the Pontus library, a capture-the-flag framework and exploit development library, to interact with local and remote processes, pack data, work with contexts and assembly, and search gadgets.
If you are looking for a wordlist to use (such as a similar file to the top-100 text file used in the lesson), you can download similar lists from: https://github.com/danielmiessler/SecLists/tree/master/Passwords/Common-Credentials
An SSH service you are authorised to test (such as on your localhost) is required to test this script.
Note that the default Kali SSH configuration will block authentication attempts after 10 attempts (MaxStartups 10:30:10). If you want to test 100 connections + the valid password using the above wordlist, you will need to edit your sshd_config (for example, by setting MaxStartups 101) and restarting the service. Alternatively to test, use a wordlist with less than 10 invalid passwords.
A web application you are authorised to test is required to test this script.
A web application you are authorised to test is required to test this script.
A web application you are authorised to test is required to test this script.
For example, you can test out your knowledge for free, by solving the “The Flag API Key” challenge hosted at https://247CTF.com in the Web category.
Learn the importance of comments in Python and how to document your scripts with single-line, end-of-line, and multi-line comments using the pound and triple quotes.
The Python 101 for Hackers course teaches an introduction to Python programming and concepts, with a focus on techniques, modules and examples which are useful for a hacker. No prior Python programming knowledge is required to be successful in this introductory course.
Students should take this Python 101 for Hackers course if they are interested in:
Understanding fundamental Python programming concepts, required to automate common hacking and bug bounty related tasks
Learning how to identify and mitigate Python programming errors which may occur when attempting to execute code snippets or proof of concept (PoC) scripts
Bridging the gap between generic programming concepts and practical hacking applications such as password cracking, web login brute forcing or exploitation of SQL injections
The following concepts will be taught in this course:
The difference between Python2 and Python3, and how to leverage both as hacking and automation tools
How to install, setup and configure a Python environment in Kali Linux with Virtual Box
Fundamental programming concepts: variables, data types, string formatting, booleans, operators, tuples, lists, dictionaries, sets conditionals, functions and loops
Python programming concepts useful for solving hacking and automation tasks: reading files, writing files, handling user input, exception and error handling, comprehensions and lambdas
How to leverage and extend Python using common and hacking focused modules
Practical examples demonstrating how to perform SSH login brute forcing, SHA256 password cracking, web login form brute forcing and SQL injection exploitation using Python
Understanding the importance of documenting and commenting your work and recommendations to continue mastering Python and programming moving forward