Release 1.0.0
This commit is contained in:
@@ -0,0 +1,433 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}CrackLab — Jobs{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jobs-page">
|
||||
|
||||
<div>
|
||||
<h1 class="page-title">Jobs</h1>
|
||||
<p class="page-description">
|
||||
Формирование заданий для CrackLab-клиентов.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{% if error %}
|
||||
<div class="jobs-message jobs-message-error">
|
||||
{{ error }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if created_job_id %}
|
||||
<div class="jobs-message jobs-message-success">
|
||||
Job <strong>{{ created_job_id }}</strong> сформирован.
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if database_statistics %}
|
||||
<div class="card">
|
||||
<h2>Database</h2>
|
||||
|
||||
<div class="jobs-stats-grid">
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ database_statistics["access_points"] }}</div>
|
||||
<div class="stat-title">Access points</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ database_statistics["handshakes"] }}</div>
|
||||
<div class="stat-title">Handshakes</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ database_statistics["unique_hashes"] }}</div>
|
||||
<div class="stat-title">Unique hashes</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ database_statistics["credentials"] }}</div>
|
||||
<div class="stat-title">Handshake Cracked</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ database_statistics["cracked_access_points"] }}</div>
|
||||
<div class="stat-title">Cracked access points</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="card">
|
||||
<h2>New Job</h2>
|
||||
|
||||
|
||||
|
||||
<div class="jobs-new-layout">
|
||||
<div class="jobs-method-column">
|
||||
<form method="get" class="jobs-form">
|
||||
<div class="jobs-method-field">
|
||||
<label for="method_id">Method</label>
|
||||
|
||||
<select
|
||||
id="method_id"
|
||||
name="method_id"
|
||||
>
|
||||
{% for method in methods %}
|
||||
{% for version in method_versions[method["id"]] %}
|
||||
<option
|
||||
value="{{ method["id"] }}"
|
||||
data-version="{{ version["version"] }}"
|
||||
{% if selected_method_id == method["id"] and selected_version == version["version"] %}selected{% endif %}
|
||||
>
|
||||
{{ method["name"] }} — v{{ version["version"] }}
|
||||
</option>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<span id="selected-method-label"></span>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="method_version"
|
||||
id="method_version"
|
||||
value="{{ selected_version or '' }}"
|
||||
>
|
||||
{% if search_context_token %}
|
||||
<input
|
||||
type="hidden"
|
||||
name="search_context_token"
|
||||
value="{{ search_context_token }}"
|
||||
>
|
||||
{% endif %}
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="jobs-issue-column">
|
||||
<h3>Standard issuance</h3>
|
||||
<p class="page-description">
|
||||
Выдача доступных рукопожатий из всей базы CrackLab.
|
||||
</p>
|
||||
<form method="post" class="jobs-form">
|
||||
<input
|
||||
type="hidden"
|
||||
name="method_id"
|
||||
value="{{ selected_method_id }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="method_version"
|
||||
value="{{ selected_version or '' }}"
|
||||
>
|
||||
{% if search_context_token %}
|
||||
<input
|
||||
type="hidden"
|
||||
name="search_context_token"
|
||||
value="{{ search_context_token }}"
|
||||
>
|
||||
{% endif %}
|
||||
|
||||
<div class="jobs-method-field">
|
||||
<label for="limit">Handshakes in job</label>
|
||||
|
||||
<input
|
||||
id="limit"
|
||||
name="limit"
|
||||
type="number"
|
||||
min="1"
|
||||
value="{{ request.form.get('limit', 100) }}"
|
||||
>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
name="issue_mode"
|
||||
value="limited"
|
||||
class="methods-button jobs-action-button"
|
||||
>
|
||||
Form Job
|
||||
</button>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
name="issue_mode"
|
||||
value="all"
|
||||
class="methods-button-secondary jobs-action-button"
|
||||
>
|
||||
Issue All Available
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if statistics %}
|
||||
<div class="jobs-stats-section">
|
||||
<h3>Selected Method Statistics</h3>
|
||||
|
||||
<div class="jobs-stats-grid">
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ statistics["total_count"] }}</div>
|
||||
<div class="stat-title">Handshakes</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ statistics["found_count"] }}</div>
|
||||
<div class="stat-title">Password Found</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ statistics["covered_count"] }}</div>
|
||||
<div class="stat-title">Covered</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ statistics["reserved_count"] }}</div>
|
||||
<div class="stat-title">Reserved</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">{{ statistics["available_count"] }}</div>
|
||||
<div class="stat-title">Available</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if search_context_token %}
|
||||
<div class="jobs-stats-section">
|
||||
<h3>Search Results</h3>
|
||||
|
||||
{% if search_context is none %}
|
||||
<div class="jobs-message jobs-message-error">
|
||||
Поисковый контекст не найден или недействителен.
|
||||
Вернитесь в Search и выполните экспорт заново.
|
||||
</div>
|
||||
|
||||
{% elif search_context["expired"] %}
|
||||
<div class="jobs-message jobs-message-error">
|
||||
Поисковый контекст истёк.
|
||||
Вернитесь в Search, повторите поиск и экспортируйте
|
||||
результаты заново.
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<p class="page-description">
|
||||
Источник: результаты поиска WiFi GPS Mapper.
|
||||
Контекст действителен до
|
||||
{{ search_context["expires_at_local"] }}.
|
||||
</p>
|
||||
|
||||
{% if search_statistics %}
|
||||
<div class="jobs-stats-grid jobs-search-stats-grid">
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["matched_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Handshakes found by Search
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["available_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Available
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["matched_count"] - search_statistics["available_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Skipped
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["found_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Password Found
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["covered_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Already Completed
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["reserved_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Reserved
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="jobs-stat-item">
|
||||
<div class="stat-value">
|
||||
{{ search_statistics["unsupported_count"] }}
|
||||
</div>
|
||||
<div class="stat-title">
|
||||
Unsupported Hash
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<form method="post" class="jobs-form">
|
||||
<input
|
||||
type="hidden"
|
||||
name="method_id"
|
||||
value="{{ selected_method_id }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="method_version"
|
||||
value="{{ selected_version or '' }}"
|
||||
>
|
||||
|
||||
<input
|
||||
type="hidden"
|
||||
name="search_context_token"
|
||||
value="{{ search_context_token }}"
|
||||
>
|
||||
|
||||
<button
|
||||
type="submit"
|
||||
name="issue_mode"
|
||||
value="search"
|
||||
class="methods-button jobs-action-button"
|
||||
{% if not search_statistics or search_statistics["available_count"] <= 0 %}disabled{% endif %}
|
||||
>
|
||||
Form Job from Search
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const methodSelect = document.getElementById("method_id");
|
||||
const versionInput = document.getElementById("method_version");
|
||||
const selectedMethodLabel = document.getElementById("selected-method-label");
|
||||
|
||||
if (!methodSelect || !versionInput || !selectedMethodLabel) {
|
||||
return;
|
||||
}
|
||||
|
||||
const updateSelectedMethodLabel = function () {
|
||||
const selectedOption = methodSelect.options[methodSelect.selectedIndex];
|
||||
versionInput.value = selectedOption.dataset.version || "";
|
||||
selectedMethodLabel.textContent =
|
||||
"Selected: " + selectedOption.textContent.trim();
|
||||
};
|
||||
|
||||
updateSelectedMethodLabel();
|
||||
|
||||
methodSelect.addEventListener("change", function () {
|
||||
updateSelectedMethodLabel();
|
||||
methodSelect.form.requestSubmit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h2>Issued Jobs</h2>
|
||||
|
||||
{% if active_jobs %}
|
||||
<div class="table-container">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Job</th>
|
||||
<th>Method</th>
|
||||
<th>Unique Hashes</th>
|
||||
<th>Handshakes</th>
|
||||
<th>Created</th>
|
||||
<th>Status</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for job in active_jobs %}
|
||||
<tr>
|
||||
<td>
|
||||
<strong>{{ job["id"] }}</strong>
|
||||
</td>
|
||||
<td>
|
||||
{{ method_names.get(job["method_id"], job["method_id"]) }}
|
||||
v{{ job["method_version"] }}
|
||||
</td>
|
||||
<td>{{ job["hash_count"] }}</td>
|
||||
<td>{{ job["handshake_count"] }}</td>
|
||||
<td>{{ job["created_at"]|local_datetime }}</td>
|
||||
<td>
|
||||
<span class="badge badge-{{ job["status"]|lower }}">
|
||||
{{ job["status"] }}
|
||||
</span>
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
class="methods-button-secondary"
|
||||
href="{{ url_for('cracklab.job_download', job_id=job['id']) }}"
|
||||
>
|
||||
Download ZIP
|
||||
</a>
|
||||
|
||||
{% if job["status"] in ["CREATED", "QUEUED", "RUNNING", "PARTIAL"] %}
|
||||
<form
|
||||
method="post"
|
||||
action="{{ url_for('cracklab.job_cancel', job_id=job['id']) }}"
|
||||
style="display: inline;"
|
||||
onsubmit="return confirm('Cancel this job?');"
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
class="methods-button-secondary"
|
||||
>
|
||||
Cancel
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="empty-state">
|
||||
No active jobs.
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const methodSelect = document.getElementById("method_id");
|
||||
const versionInput = document.getElementById("method_version");
|
||||
|
||||
if (methodSelect && versionInput) {
|
||||
methodSelect.addEventListener("change", function () {
|
||||
const option = this.options[this.selectedIndex];
|
||||
versionInput.value = option.dataset.version || "";
|
||||
});
|
||||
}
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user