INNER CODE UNIT · Python

api_download_raw

darama22/Malware-Research-Hub · app/server.py:224

def api_download_raw():
    """Descarga el archivo real. DESACTIVADO por defecto: solo funciona si
    pones 'serve_raw_files': true en config.json, bajo tu propio riesgo."""
    cfg = get_config()
    if not cfg.get("serve_raw_files", False):
        return jsonify({
            "error": "Deshabilitado. Pon serve_raw_files=true en app/config.json si de verdad "
                     "quieres que el servidor local entregue bytes de ejecutables/documentos."
        }), 403
    abs_path = resolve_and_validate(request.args.get("path", ""))
    if not abs_path.is_file():
        abort(404)
    return send_file(abs_path, as_attachment=True)


if __name__ == "__main__":
    print("Malware Research Hub -> http://127.0.0.1:5057")
    print("Solo accesible en localhost. Uso educativo / investigación propia.")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…