Cyberlium

Python › Module 1 › Lesson 5

BeginnerModule 1Lesson 5/5

Quiz — Python Basics

10-question quiz on Python’s role in security and core language basics

10 min+21 XP10 quiz
Module progress5 of 5

Opening

Python Basics — Module Quiz

Ten APPLY items on why analysts automate with Python (readability, stdlib batteries, speed of writing), the hacker-movie myth versus SOC glue, why Scapy and Impacket exist but this course stays on files, hashes, and localhost, str/int/list, for loops, def versus copy-paste, with open and pathlib, wordlists as parsing practice, the fictional sample_auth.log hunter, and chmod 600 on lab files. Wrong answers still teach. You will not scan strangers, open /etc/shadow, brute-force logins, or treat Module 2 sockets as permission to aim at a company. Scripts and notes stay in $HOME/cyberlium-lab on YOUR machine — no live passwords, no work production logs, no other people’s files. Carry the hunter pattern into the quiz: with open / pathlib, utf-8, needle in line, chmod 600 on even fictional logs. Printing a port list is still not a scan. requests comes later; Scapy and Impacket stay named, not assigned. Next after this quiz is Socket Programming: still authorized localhost / lab hosts you own, still not a CEH exploit track.

Knowledge Check

1

APPLY: A classmate says Python is for “hacking companies fast” and wants to skip readability. Why do analysts and ethical hackers actually automate with it, and where do scripts live in this course?

Multiple choice

Knowledge Check

2

APPLY: True or False: Unauthorized scanning or opening /etc/shadow is fine if the script is Python, and Scapy/Impacket being famous means this module is a CEH exploit course.

True or False

Knowledge Check

3

APPLY: You need a SHA-256 of hello.txt you wrote and a JSON note of the digest. Which pairing, and what must the note not contain?

Multiple choice

Knowledge Check

4

APPLY: host = "127.0.0.1" and ports = [22, 80, 443]. A teammate pastes three connect blocks instead of a loop. Types, and the scalable pattern before Module 2 sockets?

Multiple choice

Knowledge Check

5

APPLY: Why does copying a five-line check twenty times fail as you add timeouts, and what keyword starts a reusable block?

Multiple choice

Knowledge Check

6

APPLY: Select the defensive file-handling habits for this module. (Select 2)

Select all that apply

Knowledge Check

7

APPLY: True or False: for line in f plus if needle in line is a real log-hunting pattern, and it still only applies to files you created or are allowed to have — fictional sample_auth.log, not a roommate’s mailbox.

True or False

Knowledge Check

8

APPLY: find_failed.py printed four lines including Accepted password. What likely went wrong, and what is a safe optional extra?

Multiple choice

Knowledge Check

9

APPLY: open(path, "w") on hits.txt in the lab folder — what does the mode mean, and why chmod 600 the log and report?

Multiple choice

Knowledge Check

10

APPLY: After this module, which lesson opens networking with Python, and which habits do you carry?

Multiple choice

← Previous

Answer all 10 knowledge checks to continue. (0/10 answered)