-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathforms.py
67 lines (52 loc) · 2.97 KB
/
forms.py
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
from django import forms
class JoeSandboxConfigForm(forms.Form):
error_css_class = 'error'
required_css_class = 'required'
api_url = forms.URLField(label="Joe Sandbox Api Url",
initial="https://jbxcloud.joesecurity.org/api/")
api_key = forms.CharField(label="Joe Sandbox Api Key",
initial="")
tandc = forms.BooleanField(required=False,
label="Accept T&C (Joe Sandbox Cloud only)",
initial=False,
help_text="https://jbxcloud.joesecurity.org/download/termsandconditions.pdf")
ignore_ssl_cert = forms.BooleanField(required=False,
label="Disable SSL Verification",
help_text="Do not verify the SSL certificate of the Joe Sandbox server.",
initial=False)
use_proxy = forms.BooleanField(required=False,
initial=False,
label="Use CRITs proxy",
help_text="Use the proxy specified in the CRITs settings for connecting to the Joe Sandbox server.")
timeout = forms.IntegerField(label="Analysis Timeout (minutes)",
initial=60,
help_text="Combined maximum time to wait for the queue and analyses.")
systems = forms.CharField(required=False,
label="Analysis Systems (comma separated)",
initial="",
help_text="Leave empty for automatic selection.")
use_cache = forms.BooleanField(required=False,
label="Check Cache",
initial=True,
help_text="Return reports from cache if available.")
inet = forms.BooleanField(required=False,
label="Internet Access",
help_text="Enable Internet access",
initial=True)
ssl = forms.BooleanField(required=False,
label="HTTPS",
help_text="Windows only: Inspect encrypted HTTPS traffic.",
initial=False)
def __init__(self, *args, **kwargs):
kwargs.setdefault('label_suffix', ':')
super(JoeSandboxConfigForm, self).__init__(*args, **kwargs)
class JoeSandboxRuntimeForm(forms.Form):
error_css_class = 'error'
required_css_class = 'required'
systems = JoeSandboxConfigForm.base_fields["systems"]
use_cache = JoeSandboxConfigForm.base_fields["use_cache"]
inet = JoeSandboxConfigForm.base_fields["inet"]
ssl = JoeSandboxConfigForm.base_fields["ssl"]
def __init__(self, *args, **kwargs):
kwargs.setdefault('label_suffix', ':')
super(JoeSandboxRuntimeForm, self).__init__(*args, **kwargs)