5465 Total CVEs
26 Years
GitHub
README.md
Rendering markdown...
POC / network_monitor.py PY
from flask import Flask, request, render_template_string
import subprocess

app = Flask(__name__)

HTML_TEMPLATE = """
<!DOCTYPE html>
<html>
<head><title>NetView Pro v4.2</title></head>
<body>
    <h1>NetView Pro v4.2 - Diagnostic Tool</h1>
    <form method="POST">
        <input type="text" name="target" placeholder="IP Address" required>
        <button type="submit">Ping</button>
    </form>
    {% if result %}<pre>{{ result }}</pre>{% endif %}
</body>
</html>
"""

@app.route('/', methods=['GET', 'POST'])
def index():
    result = ""
    if request.method == 'POST':
        target = request.form.get('target') or (request.json.get('target') if request.is_json else None)
        
        if target:
            command = f"ping -c 2 {target}"
            try:
                output = subprocess.check_output(command, shell=True, stderr=subprocess.STDOUT, text=True)
                result = output
            except Exception as e:
                result = str(getattr(e, 'output', str(e)))
                
    return render_template_string(HTML_TEMPLATE, result=result)

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)