How to use python3

Hackbydoing Academy tool guide · Cloud, virtual machines & scripting · free, no login

What python3 is, in plain words

The Python interpreter: it runs Python program files (scripts ending in .py) and short Python snippets you type straight into the command.

A working python3 command

python3 hello.py

Runs the Python program stored in the file hello.py.

Every piece of the command, explained

--calibrateNot a python3 switch: it belongs to the academy's watcher.py detector script and tells it to learn the normal typing speed baseline before watching.
--claimNot a python3 switch: it belongs to the academy's forge.py script. The next piece is a claim to bake into the forged token, written as name=value, for example role=admin.
--kidNot a python3 switch: it belongs to the academy's forge.py script. The next piece is the 'key id' label the forged login token claims, for example /dev/null.
--logNot a python3 switch: it belongs to the academy's watcher.py script. The next piece is the path of the log file the detector should write its findings to.
--sign-keyNot a python3 switch: it belongs to the academy's forge.py script. The next piece is the secret key used to sign the forged login token, which can be empty in the lesson's broken setup.
--threshold-msNot a python3 switch: it belongs to the academy's watcher.py script. The next piece is a number of milliseconds; keystrokes arriving faster than that look machine-typed and raise the alarm.
-CNot a python3 switch. In the academy the '-C' after jwt_tool.py belongs to that script and tells it to crack the token with a dictionary attack.
-cThe next piece is Python code written directly in the command itself, in quotes, instead of in a file.
-dA real python3 switch that turns on the interpreter's own debug output; in the academy's JWT lesson the '-d wordlist.txt' after jwt_tool.py belongs to that script and names its dictionary file, not to python3.
-mThe next piece is the name of an installed Python package to run as a program, for example 'python3 -m pip' runs the pip installer tool.

Use it the legal way

Only run python3 on systems you own or have explicit, written permission to test — at work that means a signed engagement, at home that means your own lab. Inside Hackbydoing Academy you practice on simulated networks and lab machines built for exactly this, where breaking things is the lesson and no one else's systems are involved. Learning how a tool works also teaches you what it looks like from the defender's chair: the logs it leaves, the traffic it makes, and the settings that shut it down.

✦ Practice python3 hands-on in a guided lab

Reading about python3 is step one. In the Academy you run it yourself, step by step, in guided labs on simulated networks — 185 rooms covering attack and defense, from your first scan to full operations, with a defender's debrief at the end of every room. Founding membership is $9.99/mo for the first 500 members.

Join Hackbydoing Academy →

Related tool guides

Free from the Hackbydoing Academy — learn cybersecurity by doing: real tools, guided labs, attack and defense, on simulated networks. More free material: Tool Guides index · Free Downloads Library · Hackbydoing Academy · Print this page (Ctrl/Cmd+P) for a clean paper copy.