Skip to content

Instantly share code, notes, and snippets.

View traitboundnotsatisfied's full-sized avatar

Landon traitboundnotsatisfied

  • 07:17 (UTC -05:00)
View GitHub Profile
from flask import Flask
from subprocess import check_output
app = Flask(__name__)
@app.route('/')
def root():
nf = '<pre>' + check_output('neofetch --stdout', shell=True).decode('utf-8') + '</pre>'
lsblk = '<pre>' + check_output('lsblk').decode('utf-8') + '</pre>'
return f'<h1>Server is running!</h1><br>\n{nf}\n<br>\n{lsblk}'