Skip to content

Python

import lib
import lib as x
from lib import y

# pass = do nothing
# contnue = start with next loop iteration
# break = stop the loop
# return = return from function / application

# Nothing = null

"""
Multiline text, also used as comments block
"""

while cond:
    pass

for i in range(50):
    pass

if cond != False:
    pass
elif cond == True:
    pass
else:
    pass

f = open("file.ext", "r") # r, w, a, wb (write binary)
f_content = f.read()
f_lines = f.readlines()
f.write("content")
f.close()

try:
    something()
except Exception as e:
    pass

with open("file.ext", "r") as file:
    pass

exit(0)

Packages

  • datetime
  • sys
  • os
  • keyboard
  • paramiko
    • Contains a SSH Client
  • requests
    • Simple HTTP Library
  • hashlib
    • hashlib.algorithms_available
  • scapy
    • send, sniff, dissect and forge network packages
    • apt install python3-scapy
  • pwntools
    • a CTF & exploit development library

install via pip install package.