Skip to content

Instantly share code, notes, and snippets.

View K40N's full-sized avatar

Landon (Kaon) K40N

View GitHub Profile
@K40N
K40N / webstatus.py
Created May 1, 2024 02:16
Web Status Script
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}'