Files
Assetmanager/app/templates/setup_analyzer.html
T

225 lines
14 KiB
HTML
Executable File

{% 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/setup-analyzer/profiles">{{ t('setup_profiles.manage') }}</a>
<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') }}</label>
<div class="localized-file-picker" data-file-picker>
<input class="localized-file-picker-input" id="installer" name="installer" type="file" accept=".exe,.msi,.msp,.msix,.appx,.msu" required data-file-picker-input>
<button class="button button-secondary localized-file-picker-button" type="button" data-file-picker-button aria-controls="installer">{{ t('common.choose_file') }}</button>
<span class="localized-file-picker-name" data-file-picker-name data-empty-text="{{ t('common.no_file_selected') }}" aria-live="polite">{{ t('common.no_file_selected') }}</span>
</div>
<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.sfx_analysis %}
<section class="panel setup-analyzer-card">
<h2>{{ t('setup_analyzer.sfx_title') }}</h2>
<dl class="setup-analyzer-details">
<dt>{{ t('setup_analyzer.sfx_container') }}</dt><dd>{{ analysis.sfx_analysis.container_label }}</dd>
<dt>{{ t('setup_analyzer.sfx_status') }}</dt><dd>{{ t('setup_analyzer.sfx_status.' ~ analysis.sfx_analysis.status) }}</dd>
<dt>{{ t('setup_analyzer.sfx_extractor') }}</dt><dd>{{ analysis.sfx_analysis.extractor or t('setup_analyzer.not_available') }}</dd>
<dt>{{ t('setup_analyzer.sfx_files') }}</dt><dd>{{ analysis.sfx_analysis.file_count }}</dd>
<dt>{{ t('setup_analyzer.sfx_size') }}</dt><dd>{{ analysis.sfx_analysis.extracted_size_human }}</dd>
{% if analysis.sfx_analysis.selected %}
<dt>{{ t('setup_analyzer.sfx_selected') }}</dt><dd><code>{{ analysis.sfx_analysis.selected.relative_path }}</code></dd>
<dt>{{ t('setup_analyzer.technology') }}</dt><dd>{{ analysis.sfx_analysis.selected.installer_label }} ({{ analysis.sfx_analysis.selected.confidence }} %)</dd>
{% endif %}
</dl>
{% if analysis.sfx_analysis.candidates %}
<details>
<summary>{{ t('setup_analyzer.sfx_candidates') }} ({{ analysis.sfx_analysis.candidates|length }})</summary>
<div class="table-scroll standard-data-table-scroll">
<table class="data-table">
<thead><tr><th>{{ t('setup_analyzer.file') }}</th><th>{{ t('setup_analyzer.technology') }}</th><th>{{ t('setup_analyzer.confidence') }}</th><th>{{ t('setup_analyzer.product_name') }}</th><th>{{ t('setup_analyzer.version') }}</th></tr></thead>
<tbody>
{% for candidate in analysis.sfx_analysis.candidates %}
<tr{% if analysis.sfx_analysis.selected and candidate.relative_path == analysis.sfx_analysis.selected.relative_path %} class="is-selected"{% endif %}>
<td><code>{{ candidate.relative_path }}</code></td>
<td>{{ candidate.installer_label }}</td>
<td>{{ candidate.confidence }} %</td>
<td>{{ candidate.product_name }}</td>
<td>{{ candidate.product_version }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</details>
{% endif %}
{% if analysis.sfx_analysis.error %}<p class="muted">{{ analysis.sfx_analysis.error }}</p>{% endif %}
</section>
{% endif %}
{% 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>
{% if analysis.alternative_install_command %}<p><strong>{{ t('setup_analyzer.alternative_command') }}:</strong><br><code>{{ analysis.alternative_install_command }}</code></p>{% endif %}
<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="ExampleApp.exe">
</label>
<small class="muted">{{ t('setup_analyzer.process_names_help') }}</small>
<div class="setup-analyzer-checkboxes">
<label class="checkbox-label" for="start_application">
<input id="start_application" name="start_application" type="checkbox" value="true" {% if analysis.start_application_default %}checked{% endif %}>
<span>{{ t('setup_analyzer.start_application') }}</span>
</label>
<small class="muted">{{ t('setup_analyzer.start_application_help') }}</small>
</div>
<label for="start_executable">{{ t('setup_analyzer.start_executable') }}
<input id="start_executable" name="start_executable" value="{{ analysis.start_executable_default }}" placeholder="C:\Program Files\Application\Application.exe">
</label>
<label for="start_arguments">{{ t('setup_analyzer.start_arguments') }}
<input id="start_arguments" name="start_arguments" value="{{ analysis.start_arguments_default }}">
</label>
<div class="setup-analyzer-checkboxes">
<label class="checkbox-label" for="start_only_if_user_logged_on">
<input id="start_only_if_user_logged_on" name="start_only_if_user_logged_on" type="checkbox" value="true" checked>
<span>{{ t('setup_analyzer.start_only_if_user_logged_on') }}</span>
</label>
<small class="muted">{{ t('setup_analyzer.start_only_if_user_logged_on_help') }}</small>
<label class="checkbox-label" for="start_fail_job_on_error">
<input id="start_fail_job_on_error" name="start_fail_job_on_error" type="checkbox" value="true">
<span>{{ t('setup_analyzer.start_fail_job_on_error') }}</span>
</label>
</div>
</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>
<dt>7-Zip</dt><dd>{{ t('common.yes') if analysis.archive_tools.sevenzip_available else t('common.no') }}</dd>
<dt>unar / lsar</dt><dd>{{ t('common.yes') if analysis.archive_tools.unar_available else t('common.no') }}</dd>
<dt>{{ t('setup_analyzer.sfx_limits') }}</dt><dd>{{ max_extracted_mb }} MB / {{ max_extracted_files }} {{ t('setup_analyzer.sfx_files') }} / {{ t('setup_analyzer.sfx_depth', depth=max_sfx_depth) }}</dd>
{% if analysis.launcher_architecture %}<dt>{{ t('setup_analyzer.launcher_architecture') }}</dt><dd>{{ analysis.launcher_architecture }}</dd>{% endif %}
{% if analysis.architecture_source %}<dt>{{ t('setup_analyzer.architecture_source') }}</dt><dd>{{ t('setup_analyzer.architecture_source.' ~ analysis.architecture_source) }}</dd>{% endif %}
{% if analysis.product_version_source %}<dt>{{ t('setup_analyzer.version_source') }}</dt><dd>{{ t('setup_analyzer.metadata_source.' ~ analysis.product_version_source) }}</dd>{% endif %}
{% if analysis.manufacturer_source %}<dt>{{ t('setup_analyzer.manufacturer_source') }}</dt><dd>{{ t('setup_analyzer.metadata_source.' ~ analysis.manufacturer_source) }}</dd>{% endif %}
{% if analysis.profile_name %}<dt>{{ t('setup_profiles.matched_profile') }}</dt><dd>{{ analysis.profile_name }} {{ analysis.profile_version or '' }} <code>{{ analysis.profile_id }}</code></dd>{% endif %}
{% if analysis.profile_source %}<dt>{{ t('setup_profiles.profile_source') }}</dt><dd>{{ t('setup_profiles.source.' ~ analysis.profile_source) }}</dd>{% endif %}
{% if analysis.original_filename %}<dt>OriginalFilename</dt><dd>{{ analysis.original_filename }}</dd>{% endif %}
</dl>
</details>
{% endif %}
{% endblock %}