This is the first post on odiesec.io. Below is a sample code block to verify syntax highlighting works correctly.
Sample Python
import subprocess
def run_command(cmd):
"""Execute a shell command and return output."""
result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
return result.stdout.strip()
print(run_command("whoami"))
Sample Bash
#!/bin/bash
# Quick enumeration script
echo "[*] Current user: $(whoami)"
echo "[*] Hostname: $(hostname)"
echo "[*] IP addresses:"
ip addr show | grep "inet " | awk '{print $2}'
That’s it for now. More technical content coming soon.