-
Notifications
You must be signed in to change notification settings - Fork 48
/
add.jinja2
94 lines (84 loc) · 4.28 KB
/
add.jinja2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{% extends "components/base.jinja2" %}
{% block main %}
<script>
function setSelectionForAllModules(value) {
document.querySelectorAll(".enabled-modules input[type='checkbox']").forEach(
function(item) {
if (item.getAttribute("name") != "module_enabled_example") {
item.checked = value;
}
}
);
}
</script>
<h1>Add targets</h1>
<form action="/add" method="post" class="w-100">
{% if validation_message %}
<div class="alert alert-danger" role="alert">
{{ validation_message }}
</div>
{% endif %}
<input type="hidden" name="csrf_token" value="{{ csrf_token }}" />
<div class="form-group mb-3">
<label class="form-label">Targets (separated with newlines)</label>
<textarea class="form-control" name="targets">{% for task in tasks %}{{ task }}
{% endfor %}</textarea>
</div>
<div class="form-group mb-3">
<label class="form-label">Batch file (should contain one target per line)</label>
<input class="form-control btn" type="file" name="file">
</div>
<div class="form-group mb-3">
<label class="form-label">Tag</label>
<input type="text" class="form-control" name="tag" value="{{ tag }}">
<small class="form-text text-muted">
You may provide any string here - it will be saved in the task results
in the database so that you can e.g. use the value when processing
the results automatically.
</small>
</div>
<input type="submit" class="btn btn-primary" value="Start scan">
<h2 class="mt-4">Advanced settings</h2>
<div class="form-group mb-3 enabled-modules">
<label class="form-label">Enabled modules</label>
(<a href="" onclick="setSelectionForAllModules(true); return false;">select all except example</a> |
<a href="" onclick="setSelectionForAllModules(false); return false;">unselect all</a>)
{% if modules_disabled_by_default %}
<div class="alert alert-info">
The following modules are disabled by default: {{ ", ".join(modules_disabled_by_default) }} - select the checkbox to start them.
To change this, update the <tt>MODULES_DISABLED_BY_DEFAULT</tt> setting.
<br/><br/>
If you want to use any module that works with identified services on a given port (not with domains) such as
<tt>bruter</tt>, remember to enable the <tt>port_scanner</tt> module as well.
</div>
{% endif %}
<input type="hidden" name="choose_modules_to_enable" value="1">
<div class="row m-0">
{% for bind in binds %}
<div class="form-check col-md-4">
<label class="form-check-label">
<input class="form-check-input" type="checkbox" value="" name="module_enabled_{{ bind.identity }}"
{% if disabled_modules %}
{% if bind.identity not in disabled_modules %}checked{% endif %}
{% else %}
{% if bind.identity not in modules_disabled_by_default %}checked{% endif %}
{% endif %}>
{{ bind.identity }}<br/>
<span class="small text-muted">{{ bind.info|dedent|render_markdown|safe }}</span>
</label>
</div>
{% if loop.index % 3 == 0 %}
</div><div class="row m-0">
{% endif %}
{% endfor %}
</div>
<p class="text-muted">
If a new module appears during task processing, it will be <b>enabled</b>.
</p>
<p class="text-muted pb-4">
Even if the modules above are disabled, Artemis internal logic or core modules (that are always enabled) may
perform domain queries or HTTP requests.
</p>
</div>
</form>
{% endblock %}