diff --git a/reconscript/static/js/consent.js b/reconscript/static/js/consent.js deleted file mode 100644 index 773e3cc..0000000 --- a/reconscript/static/js/consent.js +++ /dev/null @@ -1,52 +0,0 @@ -document.addEventListener('DOMContentLoaded', () => { - const targetInput = document.getElementById('target'); - const evidenceSelect = document.getElementById('evidence_level'); - const consentFile = document.getElementById('consent_file'); - const consentCheckbox = document.getElementById('consent_confirm'); - const submitBtn = document.getElementById('submit-btn'); - const modal = document.getElementById('consent-modal'); - const modalClose = document.getElementById('consent-close'); - let modalAcknowledged = false; - - const isLocal = (value) => { - const normalized = (value || '').trim().toLowerCase(); - return normalized === '' || normalized === '127.0.0.1' || normalized === 'localhost' || normalized === '::1'; - }; - - const requiresConsent = () => { - if (!targetInput) return false; - if (isLocal(targetInput.value)) return false; - return true; - }; - - const updateState = () => { - if (!submitBtn) return; - if (!requiresConsent()) { - submitBtn.disabled = false; - if (modal) modal.style.display = 'none'; - return; - } - const hasFile = consentFile && consentFile.files && consentFile.files.length > 0; - const confirmed = consentCheckbox && consentCheckbox.checked; - submitBtn.disabled = !(hasFile && confirmed); - if (!modalAcknowledged && modal) { - modal.style.display = 'flex'; - } - }; - - if (modalClose) { - modalClose.addEventListener('click', () => { - modalAcknowledged = true; - if (modal) modal.style.display = 'none'; - updateState(); - }); - } - - [targetInput, evidenceSelect, consentFile, consentCheckbox].forEach((element) => { - if (!element) return; - const events = element === consentFile ? ['change'] : ['input', 'change']; - events.forEach((event) => element.addEventListener(event, updateState)); - }); - - updateState(); -}); diff --git a/reconscript/templates/consent_modal.html b/reconscript/templates/consent_modal.html deleted file mode 100644 index 4d4e68c..0000000 --- a/reconscript/templates/consent_modal.html +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/reconscript/templates/index.html b/reconscript/templates/index.html index b4ca634..b6c80de 100644 --- a/reconscript/templates/index.html +++ b/reconscript/templates/index.html @@ -2,8 +2,8 @@ {% block content %}

Launch Scoped Scan

-

All scans are read-only and respect signed consent manifests. Targets outside localhost require a validated manifest before scanning.

-
+

All scans are read-only. Provide a target host and optional parameters, then launch the scan.

+ @@ -20,20 +20,10 @@

Launch Scoped Scan

- - -
- - -
- - +
-
{% endblock %} diff --git a/reconscript/templates/layout.html b/reconscript/templates/layout.html index 2335cf5..323582f 100644 --- a/reconscript/templates/layout.html +++ b/reconscript/templates/layout.html @@ -38,7 +38,6 @@ outline-offset: 2px; } - @@ -65,6 +64,5 @@ {% endwith %} {% block content %}{% endblock %} - {% include 'consent_modal.html' %} diff --git a/reconscript/ui.py b/reconscript/ui.py index 0aa2c6e..50dccbf 100644 --- a/reconscript/ui.py +++ b/reconscript/ui.py @@ -7,7 +7,6 @@ import os import uuid from pathlib import Path -from typing import Optional from flask import ( Flask, @@ -21,7 +20,6 @@ url_for, ) -from .consent import ConsentError, load_manifest, validate_manifest from .core import ReconError, run_recon from .logging import configure_logging from .metrics import metrics_payload @@ -166,7 +164,6 @@ def index(): ports=ports, expected_ip=expected_ip, evidence_level=evidence_level, - consent_manifest=consent_manifest, ) except ReconError as exc: flash(str(exc), "error")