software packages and deploying

This commit is contained in:
2026-09-10 21:54:55 +02:00
parent 0fb18ae4f7
commit 4567df7ebb
73 changed files with 3088 additions and 6 deletions
+147
View File
@@ -0,0 +1,147 @@
{% extends 'base.html' %}
{% block content %}
<div class="toolbar setup-analyzer-toolbar">
<div>
<h1>{{ t('setup_analyzer.title') }}</h1>
<p class="muted">{{ t('setup_analyzer.subtitle') }}</p>
</div>
<div class="setup-analyzer-actions">
<a class="button button-secondary" href="/software/packages">{{ t('software_packages.title') }}</a>
<a class="button button-secondary" href="/software">{{ t('setup_analyzer.back_to_software') }}</a>
</div>
</div>
<section class="panel setup-analyzer-upload-panel">
<h2>{{ t('setup_analyzer.upload_title') }}</h2>
<p>{{ t('setup_analyzer.static_note') }}</p>
<form class="setup-analyzer-form" method="post" action="/software/setup-analyzer/analyze" enctype="multipart/form-data">
<label for="installer">{{ t('setup_analyzer.file') }}
<input id="installer" name="installer" type="file" accept=".exe,.msi,.msp,.msix,.appx,.msu" required>
</label>
<p class="muted">{{ t('setup_analyzer.max_upload', size=max_upload_mb) }}</p>
<button class="button" type="submit">{{ t('setup_analyzer.analyze') }}</button>
</form>
</section>
{% if analysis %}
<div class="setup-analyzer-grid">
<section class="panel setup-analyzer-card">
<h2>{{ t('setup_analyzer.file_info') }}</h2>
<dl class="setup-analyzer-details">
<dt>{{ t('setup_analyzer.file') }}</dt><dd>{{ analysis.filename }}</dd>
<dt>{{ t('setup_analyzer.size') }}</dt><dd>{{ analysis.size_human }}</dd>
<dt>SHA256</dt><dd><code>{{ analysis.sha256 }}</code></dd>
<dt>{{ t('setup_analyzer.signature') }}</dt>
<dd>{% if analysis.signature_present is sameas true %}{{ t('setup_analyzer.signature_present') }}{% elif analysis.signature_present is sameas false %}{{ t('setup_analyzer.signature_absent') }}{% else %}{{ t('setup_analyzer.not_available') }}{% endif %}</dd>
</dl>
</section>
<section class="panel setup-analyzer-card">
<h2>{{ t('setup_analyzer.detection') }}</h2>
<dl class="setup-analyzer-details">
<dt>{{ t('setup_analyzer.technology') }}</dt><dd><strong>{{ analysis.installer_label }}</strong></dd>
<dt>{{ t('setup_analyzer.confidence') }}</dt><dd>{{ analysis.confidence }} %</dd>
<dt>{{ t('setup_analyzer.command_confidence') }}</dt><dd>{{ t('setup_analyzer.command_confidence.' ~ analysis.command_confidence) }}</dd>
</dl>
<div class="setup-analyzer-confidence" title="{{ analysis.confidence }} %"><span style="width:{{ analysis.confidence }}%"></span></div>
<details>
<summary>{{ t('setup_analyzer.detection_signals') }}</summary>
<ul>{% for key in analysis.signal_keys %}<li>{{ t(key) }}</li>{% endfor %}</ul>
</details>
{% if analysis.candidates|length > 1 %}
<details>
<summary>{{ t('setup_analyzer.other_candidates') }}</summary>
<ul>{% for candidate in analysis.candidates[1:] %}<li>{{ candidate.label }} - {{ candidate.confidence }} %</li>{% endfor %}</ul>
</details>
{% endif %}
{% if analysis.embedded_switches %}
<details>
<summary>{{ t('setup_analyzer.embedded_switches') }}</summary>
<code>{{ analysis.embedded_switches|join(' ') }}</code>
</details>
{% endif %}
</section>
</div>
{% if analysis.warning_keys %}
<section class="panel">
<h2>{{ t('setup_analyzer.notes') }}</h2>
{% for key in analysis.warning_keys %}<div class="notice setup-analyzer-notice">{{ t(key) }}</div>{% endfor %}
</section>
{% endif %}
<form class="setup-analyzer-export-form" method="post">
<input type="hidden" name="token" value="{{ analysis.token }}">
<div class="setup-analyzer-grid">
<section class="panel setup-analyzer-card">
<h2>{{ t('setup_analyzer.product_info') }}</h2>
<label for="product_name">{{ t('setup_analyzer.product_name') }}
<input id="product_name" name="product_name" value="{{ analysis.product_name }}">
</label>
<label for="product_version">{{ t('setup_analyzer.version') }}
<input id="product_version" name="product_version" value="{{ analysis.product_version }}">
</label>
<label for="manufacturer">{{ t('setup_analyzer.manufacturer') }}
<input id="manufacturer" name="manufacturer" value="{{ analysis.manufacturer }}">
</label>
<label for="architecture">{{ t('setup_analyzer.architecture') }}
<input id="architecture" name="architecture" value="{{ analysis.architecture }}">
</label>
{% if analysis.product_code %}<p><strong>ProductCode:</strong> <code>{{ analysis.product_code }}</code></p>{% endif %}
{% if analysis.upgrade_code %}<p><strong>UpgradeCode:</strong> <code>{{ analysis.upgrade_code }}</code></p>{% endif %}
</section>
<section class="panel setup-analyzer-card">
<h2>{{ t('setup_analyzer.installation') }}</h2>
<label for="install_arguments">{{ t('setup_analyzer.arguments') }}
<input id="install_arguments" name="install_arguments" value="{{ analysis.install_arguments }}">
</label>
<p><strong>{{ t('setup_analyzer.recommended_command') }}:</strong><br><code>{{ analysis.install_command }}</code></p>
<label for="timeout_seconds">{{ t('setup_analyzer.timeout') }}
<input id="timeout_seconds" name="timeout_seconds" type="number" min="30" max="86400" value="600">
</label>
<input type="hidden" name="run_as" value="system">
<p><strong>{{ t('setup_analyzer.run_as') }}:</strong> SYSTEM<br><small class="muted">{{ t('setup_analyzer.run_as_help') }}</small></p>
<label for="success_codes">{{ t('setup_analyzer.success_codes') }}
<input id="success_codes" name="success_codes" value="{{ analysis.success_codes|join(', ') }}">
</label>
<label for="reboot_codes">{{ t('setup_analyzer.reboot_codes') }}
<input id="reboot_codes" name="reboot_codes" value="{{ analysis.reboot_codes|join(', ') }}">
</label>
<div class="setup-analyzer-checkboxes">
<label class="checkbox-label" for="suppress_browser">
<input id="suppress_browser" name="suppress_browser" type="checkbox" value="true" {% if analysis.suppress_browser_default %}checked{% endif %}>
<span>{{ t('setup_analyzer.suppress_browser') }}</span>
</label>
<small class="muted">{{ t('setup_analyzer.suppress_browser_help') }}</small>
</div>
<label for="process_names">{{ t('setup_analyzer.process_names') }}
<input id="process_names" name="process_names" value="{{ analysis.process_names_default }}" placeholder="Greenshot.exe">
</label>
<small class="muted">{{ t('setup_analyzer.process_names_help') }}</small>
</section>
</div>
<section class="panel">
<h2>{{ t('setup_analyzer.generated_logic') }}</h2>
<p><strong>{{ t('setup_analyzer.detection_method') }}:</strong> <code>{{ analysis.detect_method }}</code></p>
{% if analysis.uninstall_command %}<p><strong>{{ t('setup_analyzer.uninstall_command') }}:</strong><br><code>{{ analysis.uninstall_command }}</code></p>{% endif %}
<p class="muted">{{ t('setup_analyzer.export_note_v2') }}</p>
<div class="setup-analyzer-actions">
<button class="button button-secondary" type="submit" formaction="/software/setup-analyzer/export/powershell">{{ t('setup_analyzer.export_ps') }}</button>
<button class="button button-secondary" type="submit" formaction="/software/setup-analyzer/export/package">{{ t('setup_analyzer.export_package') }}</button>
<button class="button" type="submit" formaction="/software/setup-analyzer/create-package">{{ t('setup_analyzer.create_package') }}</button>
</div>
</section>
</form>
<details class="panel setup-analyzer-technical">
<summary>{{ t('setup_analyzer.technical_details') }}</summary>
<dl class="setup-analyzer-details">
<dt>{{ t('setup_analyzer.pefile') }}</dt><dd>{{ t('common.yes') if analysis.pefile_available else t('common.no') }}</dd>
<dt>msiinfo</dt><dd>{{ t('common.yes') if analysis.msiinfo_available else t('common.no') }}</dd>
{% if analysis.original_filename %}<dt>OriginalFilename</dt><dd>{{ analysis.original_filename }}</dd>{% endif %}
</dl>
</details>
{% endif %}
{% endblock %}