Skip to content

Basic

Темы и ссылки на материалы:

repr: link

sudo with python

sudo python -c "import os; os.system('/bin/bash')"

json

# READ JSON FILE TO DICTIONARY
with open("default.json", "r") as f:
    dict = json.load(f)

# WRITE JSON DICTIONARY TO FILE
with open(filename, 'w') as f:
    f.write(json.dumps(dict, sort_keys=True, indent=4))