Learn Python: Ep.10 - Reading From Files & Breaking Loops

Опубликовано: 14 Апрель 2026
на канале: Daniel Lowrie
367
23

Today we're breaking out of our Python lists and learning how to code our brute-force app to read from dictionary files. Now we're playing with power!

Here we will take a bit more input from the user by prompting them for our username and password dictionary files. (we also learn a bit about relative and absolute paths)

Then we learn the difference between read(), readline(), and readlines() which turns out is quite useful knowledge.

Next, we test our changes and discover an issue that we fix with split() and break.

Finally, we see me make a few typos when testing, but we ultimately end with a successful run!

Learn Python Github Repo - https://github.com/daniellowrie/Learn...
Download the bWAPP HERE - https://sourceforge.net/projects/bwap...
Download Kali Linux HERE - https://www.kali.org/get-kali/#kali-p...

00:00 Intro
00:40 What We're Doing Today
01:20 Getting Filenames from User Input()
08:18 Open Files With Open()
11:23 Relative Path vs. Absolute Paths
15:30 Back To Opening Files With Open()
17:10 Read() vs Readline() vs Readlines()
22:15 Copy & Pasting Code Is Dangerous!
24:18 Testing Time. It Works!...kinda
27:30 Using Strip() To Fix Our Script
31:20 Retesting...Success!
32:20 Stopping Loops with Break
33:40 Attack of the Typos
37:35 Successful Testing


#python #cybersecurity #codingforhackers #pythonforcybersecurity #ethicalhacking #pythonforhackers #pythonpostrequests #bruteforce #webapp #webappsecurity #learningpython #learnpython #pythonforbeginners #codingforbeginners #beginnerpython #codenewbie