txt2detection 1.1.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,230 @@
1
+ Metadata-Version: 2.4
2
+ Name: txt2detection
3
+ Version: 1.1.3
4
+ Summary: A command line tool that takes a txt file containing threat intelligence and turns it into a detection rule.
5
+ Project-URL: Homepage, https://github.com/muchdogesec/txt2detection
6
+ Project-URL: Issues, https://github.com/muchdogesec/txt2detection/issues
7
+ Project-URL: dogesec HQ, https://dogesec.com
8
+ Author: dogesec
9
+ Maintainer: dogesec
10
+ License-File: LICENSE
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.11
15
+ Requires-Dist: json-repair
16
+ Requires-Dist: jsonschema>=4.22.0; python_version >= '3.8'
17
+ Requires-Dist: llama-index-core>=0.12.42
18
+ Requires-Dist: llama-index-llms-openai>=0.4.5
19
+ Requires-Dist: python-arango>=8.1.3; python_version >= '3.8'
20
+ Requires-Dist: python-dotenv>=1.0.1
21
+ Requires-Dist: python-slugify
22
+ Requires-Dist: pyyaml
23
+ Requires-Dist: requests>=2.31.0; python_version >= '3.7'
24
+ Requires-Dist: stix2
25
+ Requires-Dist: stix2extensions
26
+ Requires-Dist: tqdm>=4.66.4; python_version >= '3.7'
27
+ Requires-Dist: validators>=0.34.0
28
+ Provides-Extra: anthropic
29
+ Requires-Dist: llama-index-llms-anthropic>=0.7.2; extra == 'anthropic'
30
+ Provides-Extra: deepseek
31
+ Requires-Dist: llama-index-llms-deepseek>=0.1.2; extra == 'deepseek'
32
+ Provides-Extra: gemini
33
+ Requires-Dist: llama-index-llms-gemini>=0.5.0; extra == 'gemini'
34
+ Provides-Extra: llms
35
+ Requires-Dist: llama-index-llms-anthropic>=0.7.2; extra == 'llms'
36
+ Requires-Dist: llama-index-llms-deepseek>=0.1.2; extra == 'llms'
37
+ Requires-Dist: llama-index-llms-gemini>=0.5.0; extra == 'llms'
38
+ Requires-Dist: llama-index-llms-openrouter>=0.3.2; extra == 'llms'
39
+ Provides-Extra: openrouter
40
+ Requires-Dist: llama-index-llms-openrouter>=0.3.2; extra == 'openrouter'
41
+ Description-Content-Type: text/markdown
42
+
43
+ # txt2detection
44
+
45
+ [![codecov](https://codecov.io/gh/muchdogesec/txt2detection/graph/badge.svg?token=S0U7OC216R)](https://codecov.io/gh/muchdogesec/txt2detection)
46
+
47
+ ## Overview
48
+
49
+ ![txt2detection](docs/txt2detection.png)
50
+
51
+ A command line tool that takes a txt file containing threat intelligence and turns it into a detection rule.
52
+
53
+ ## The problems
54
+
55
+ To illustrate the problem, lets walk through the current status quo process a human goes through when going from idea (threat TTP) to detection rule:
56
+
57
+ 1. read and understand threat using their own research, aided by external sources (blogs, intel feed, etc.)
58
+ * problems: lots of reports, threats described in a range of ways, reports contain differing data
59
+ 2. understand what logs or security data can be used to detect this threat
60
+ * problems: log schemas are unknown to analyst, TTPs often span many logs making it hard to ensure your detection rule has full coverage
61
+ 3. convert the logic created in step 1 into a Sigma detection rule to search logs identified at step 2
62
+ * problems: hard to convert what has been understood into a logical detection rule (in a detection language an analyst might not be familiar with)
63
+ 4. modify the detection rule based on new intelligence as it is discovered
64
+ * problems: this is typically overlooked as people create and forget about rules in their detection tools
65
+
66
+ ## The solution
67
+
68
+ Use AI to process threat intelligence, create and keep them updated.
69
+
70
+ txt2detection allows a user to enter some threat intelligence as a file to considered be turned into a detection.
71
+
72
+ 1. User uploads intel report
73
+ 2. Based on the user input, AI prompts structured and sent to produce an intelligence rule
74
+ 3. Rules converted into STIX objects
75
+
76
+ ## Usage
77
+
78
+ ### Setup
79
+
80
+ Install the required dependencies using:
81
+
82
+ ```shell
83
+ # clone the latest code
84
+ git clone https://github.com/muchdogesec/txt2detection
85
+ cd txt2detection
86
+ # create a venv
87
+ python3 -m venv txt2detection-venv
88
+ source txt2detection-venv/bin/activate
89
+ # install requirements
90
+ pip3 install -r requirements.txt
91
+ pip3 install .
92
+ ```
93
+
94
+ ### Set variables
95
+
96
+ txt2detection has various settings that are defined in an `.env` file.
97
+
98
+ To create a template for the file:
99
+
100
+ ```shell
101
+ cp .env.example .env
102
+ ```
103
+
104
+ To see more information about how to set the variables, and what they do, read the `.env.markdown` file.
105
+
106
+ Then test your configoration
107
+
108
+ ```shell
109
+ python3 txt2detection.py \
110
+ check-credentials
111
+ ```
112
+
113
+ It will return a response to show what API keys are working
114
+
115
+ ```txt
116
+ ============= Service Statuses ===============
117
+ ctibutler : authorized ✔
118
+ vulmatch : authorized ✔
119
+
120
+ LLMS:
121
+ openai : authorized ✔
122
+ deepseek : unsupported –
123
+ gemini : unsupported –
124
+ openrouter : unsupported –
125
+ anthropic : unsupported –
126
+ ```
127
+
128
+ Not all services need to be configured, if you have no intention of using them.
129
+
130
+ ### Run
131
+
132
+ ```shell
133
+ python3 txt2detection.py MODE \
134
+ ARGUEMENTS
135
+ ```
136
+
137
+ There are 3 modes in which you can use txt2detection:
138
+
139
+ * `file`: A text file, usually a threat report you want to create rules from the intel held within
140
+ * `text`: A text prompt that describes the rule you want to create
141
+ * `sigma`: An existing Sigma Rule you want to convert into a STIX bundle
142
+
143
+ #### File (`file`) / Text Input (`text`)
144
+
145
+ Use this mode to generate a set of rules from an input text file;
146
+
147
+ * `--input_file` (required, if not using `--input_text`, file path): the file to be converted. Must be `.txt`
148
+ * `--input_text` (required, if not using `--input_file`, string): a text string that will be analysed to create a rule by the AI if you don't want to use a file.
149
+ * `--name` (required): name of file, max 72 chars. Will be used in the STIX Report Object created. Note, the Indicator object names/titles are generated by AI
150
+ * `--report_id` (optional, default random uuidv4): Sometimes it is required to control the id of the `report` object generated. You can therefore pass a valid UUIDv4 in this field to be assigned to the report. e.g. passing `2611965-930e-43db-8b95-30a1e119d7e2` would create a STIX object id `report--2611965-930e-43db-8b95-30a1e119d7e2`. If this argument is not passed, the UUID will be randomly generated.
151
+ * `--tlp_level` (optional, default `clear`): Options are `clear`, `green`, `amber`, `amber_strict`, `red`.
152
+ * `--labels` (optional): whitspace separated list of labels. Case-insensitive (will all be converted to lower-case). Allowed `a-z`, `0-9`. Must use a namespaces (`NAMESPACE.TAG_VALUE`). e.g.`"namespace.label1" "namespace.label_2"` would create 2 labels. Added to both report and indicator objects created and the rule `tags`.
153
+ * note: you can use reserved namespaces `cve.` and `attack.` when creating labels to perform external enrichment using Vulmatch and CTI Butler. All Indicators will be linked to these objects (AI enrichments link individual rules). Created tags will be appended to the list of AI generated tags.
154
+ * note: you cannot use the namespace `tlp.` Use the `--tlp_level` flag instead.
155
+ * `--created` (optional, `YYYY-MM-DDTHH:MM:SS`): by default all object `created` times will take the time the script was run. If you want to explicitly set these times you can do so using this flag. Pass the value in the format `YYYY-MM-DDTHH:MM:SS` e.g. `2020-01-01T00:00:00`
156
+ * `--use_identity` (optional, default txt2detection identity): can pass a full STIX 2.1 identity object (make sure to properly escape). Will be validated by the STIX2 library. The ID is used to create the Indicator and Report STIX objects, and is used as the `author` property in the Sigma Rule.
157
+ * `--license` (optional): [License of the rule according the SPDX ID specification](https://spdx.org/licenses/). Will be added to the rule.
158
+ * `--reference_urls` (optional): A list of URLs to be added as `references` in the Sigma Rule property and in the `external_references` property of the Indicator and Report STIX object created. e.g `"https://www.google.com/" "https://www.facebook.com/"`
159
+ * `--external_refs` (optional): txt2detection will automatically populate the `external_references` of the report object it creates for the input. You can use this value to add additional objects to `external_references`. Note, you can only add `source_name` and `external_id` values currently. Pass as `source_name=external_id`. e.g. `--external_refs txt2stix=demo1 source=id` would create the following objects under the `external_references` property: `{"source_name":"txt2stix","external_id":"demo1"},{"source_name":"source","external_id":"id"}`
160
+ * `--ai_provider` (required): defines the `provider:model` to be used to generate the rule. Select one option. Currently supports:
161
+ * Provider (env var required `OPENROUTER_API_KEY`): `openrouter:`, providers/models `openai/gpt-4o`, `deepseek/deepseek-chat` ([More here](https://openrouter.ai/models))
162
+ * Provider (env var required `OPENAI_API_KEY`): `openai:`, models e.g.: `gpt-4o`, `gpt-4o-mini`, `gpt-4-turbo`, `gpt-4` ([More here](https://platform.openai.com/docs/models))
163
+ * Provider (env var required `ANTHROPIC_API_KEY`): `anthropic:`, models e.g.: `claude-3-5-sonnet-latest`, `claude-3-5-haiku-latest`, `claude-3-opus-latest` ([More here](https://docs.anthropic.com/en/docs/about-claude/models))
164
+ * Provider (env var required `GOOGLE_API_KEY`): `gemini:models/`, models: `gemini-1.5-pro-latest`, `gemini-1.5-flash-latest` ([More here](https://ai.google.dev/gemini-api/docs/models/gemini))
165
+ * Provider (env var required `DEEPSEEK_API_KEY`): `deepseek:`, models `deepseek-chat` ([More here](https://api-docs.deepseek.com/quick_start/pricing))
166
+ * `--create_attack_navigator_layer` (boolean, default `false`): passing this flag will generate a [MITRE ATT&CK Navigator layer](https://mitre-attack.github.io/attack-navigator/) for MITRE ATT&CK tags. Note, Sigma currently supports ATT&CK Enterprise only.
167
+
168
+ Note, in this mode, the following values will be automatically assigned to the rule
169
+
170
+ * `level`: the AI will be prompted to assign, either `informational`, `low`, `medium`, `high`, `critical`
171
+ * `status`: will always be `experimental` in this mode
172
+
173
+ #### Sigma rule input (`sigma`)
174
+
175
+ Use this mode to turn a Sigma Rule into a STIX bundle and get it enriched with ATT&CK and Vulmatch.
176
+
177
+ Note, in this mode you should be aware of a few things;
178
+
179
+ * `--sigma_file` (required, file path): the sigma rule .yml you want to be processed. Must be a `.yml` or `.yaml` file. Does not currently support correlation rules.
180
+ * `--report_id`: will overwrite any `id` value found in the rule, also used for both Indicator and Report
181
+ * `--name`: will be assigned as `title` of the rule. Will overwrite existing title
182
+ * `--tlp_level` (optional): the `tlp.` tag in the report will be turned into a TLP level. If not TLP tag in rule, default is that is will be assigned TLP `clear` and tag added. You can pass `clear`, `green`, `amber`, `amber_strict`, `red` using this property to overwrite default behaviour. If TLP exist in rule, setting a value for this property will overwrite the existing value
183
+ * `--labels` (optional): whitespace separated list of labels. Case-insensitive (will all be converted to lower-case). Allowed `a-z`, `0-9`. e.g.`"namespace.label1" "namespace.label2"` would create 2 labels. Added to both report and indicator objects created and the rule `tags`. Note, if any existing `tags` in the rule, these values will be appended to the list.
184
+ * note: you can use reserved namespaces `cve.` and `attack.` when creating labels to perform external enrichment using Vulmatch and CTI Butler. Created tags will be appended to the list of existing tags.
185
+ * note: you cannot use the namespace `tlp.` Use the `--tlp_level` flag instead.
186
+ * `--created` (optional, `YYYY-MM-DDTHH:MM:SS`): by default the `data` and `modified` values in the rule will be used. If no values exist for these, the default behaviour is to use script run time. You can pass `created` time here which will overwrite `date` and `modified` date in the rule
187
+ * `--use_identity` (optional): can pass a full STIX 2.1 identity object (make sure to properly escape). Will be validated by the STIX2 library. The ID is used to create the Indicator and Report STIX objects, and is used as the `author` property in the Sigma Rule. Will overwrite any existing `author` value. If `author` value in rule, will be converted into a STIX Identity
188
+ * `--license` (optional): [License of the rule according the SPDX ID specification](https://spdx.org/licenses/). Will be added to the rule as `license`. Will overwrite any existing `license` value in rule.
189
+ * `--reference_urls` (optional): A list of URLs to be added as `references` in the Sigma Rule property and in the `external_references` property of the Indicator and Report STIX object created. e.g `"https://www.google.com/" "https://www.facebook.com/"`. Will appended to any existing `references` in the rule.
190
+ * `--external_refs` (optional): txt2detection will automatically populate the `external_references` of the report object it creates for the input. You can use this value to add additional objects to `external_references`. Note, you can only add `source_name` and `external_id` values currently. Pass as `source_name=external_id`. e.g. `--external_refs txt2stix=demo1 source=id` would create the following objects under the `external_references` property: `{"source_name":"txt2stix","external_id":"demo1"},{"source_name":"source","external_id":"id"}`
191
+ * `status` (optional): either `stable`, `test`, `experimental`, `deprecated`, `unsupported`. If passed, will overwrite any existing `status` recorded in the rule
192
+ * `level` (optional): either `informational`, `low`, `medium`, `high`, `critical`. If passed, will overwrite any existing `level` recorded in the rule
193
+ * `--create_attack_navigator_layer` (boolean, default `false`): passing this flag will generate a [MITRE ATT&CK Navigator layer](https://mitre-attack.github.io/attack-navigator/) for MITRE ATT&CK tags.
194
+
195
+ ### A note on observable extraction
196
+
197
+ txt2detection will automatically attempt to extract any observables (aka indicators of compromise) that are found in the created or imported rules to turn them into STIX objects joined to the STIX Indicator object of the Rule.
198
+
199
+ In `txt2detection/observables.py` you will find the observable types (and regexs used detection) currently supported.
200
+
201
+ ### Output
202
+
203
+ The output of each run is structured as follows;
204
+
205
+ ```txt
206
+ .
207
+ ├── logs
208
+ │ ├── log-<REPORT UUID>.log
209
+ │ ├── log-<REPORT UUID>.log
210
+ │ └── log-<REPORT UUID>.log
211
+ └── output
212
+ └── bundle--<REPORT UUID>
213
+ ├── rules
214
+ │ ├── rule--<UUID>.yml
215
+ │ └── rule--<UUID>.yml
216
+ ├── data.json # AI output, useful for debugging
217
+ └── bundle.json # final STIX bundle with all objects
218
+ ```
219
+
220
+ ## Examples
221
+
222
+ See `tests/manual-tests/README.md` for some example commands.
223
+
224
+ ## Support
225
+
226
+ [Minimal support provided via the DOGESEC community](https://community.dogesec.com/).
227
+
228
+ ## License
229
+
230
+ [Apache 2.0](/LICENSE).
@@ -0,0 +1,23 @@
1
+ txt2detection/__init__.py,sha256=Fc460P0q_eb2u3Xc89z-fwl-4ai3jrPqPNVwJQYNkNQ,89
2
+ txt2detection/__main__.py,sha256=KC4JtsrFXXiXfNv77lVaYbDBrub5grup5-MNjwHhmOs,11685
3
+ txt2detection/attack_navigator.py,sha256=n-h5GoVqWl4zxi5GKOdWbxWvZfW8dks5YHY-ucm2g-E,2185
4
+ txt2detection/bundler.py,sha256=kPUCM-7kvuqmfN3emEh0gqV6W1WWiV--QPy8hdVtlWo,15438
5
+ txt2detection/credential_checker.py,sha256=NuKk7WlDshtdpGecxY1exoi4fUHCygunPH2lZ20oEA8,2598
6
+ txt2detection/models.py,sha256=9nEmbyRNIM5ZhM6asJymKlcUA2Bj2mbFEtWX5OPTU2s,12857
7
+ txt2detection/observables.py,sha256=FuOfq7TsQykeHbE5waakx-rh1JacAq3G8mUqi-3Aw_o,5896
8
+ txt2detection/utils.py,sha256=ZLpFbu9AXsEBaqY1Kjy0mEClaq8hLN8axuOc6bPD-3U,2914
9
+ txt2detection/ai_extractor/__init__.py,sha256=itcwTF0-S80mx-SuSvfrKazvcwsojR-QsBN-UvnSDwE,418
10
+ txt2detection/ai_extractor/anthropic.py,sha256=YOi2rHUeeoRMS4CFG6mX7xUU4q4rw9qNl72R74UN6ZM,420
11
+ txt2detection/ai_extractor/base.py,sha256=g69o_CsabqL2Y3KxwXLOZU6f98NUjBJwhlPhBgjXSks,2358
12
+ txt2detection/ai_extractor/deepseek.py,sha256=uRbPWmbnu4dzXaBxWPOsKt68v5NJeugGyvOoedjCve0,662
13
+ txt2detection/ai_extractor/gemini.py,sha256=hlcKkiHGzQJ0dQECfIhjx2LfdhZoquAF9POwz61RAhw,557
14
+ txt2detection/ai_extractor/openai.py,sha256=ggonpHtckNz9GEJIR0ADMzZWDKi6EWuicP0fsxvkP3A,616
15
+ txt2detection/ai_extractor/openrouter.py,sha256=rL-SnzRhzrCnPJGLxbTlRyxU0NAw42RmSq3ouuo3Iag,658
16
+ txt2detection/ai_extractor/prompts.py,sha256=36u4ae7RoXADuTVbX4Sgssx7XQjCUzgK46BnVqWURVk,6029
17
+ txt2detection/ai_extractor/utils.py,sha256=EZJb3T34WV5iXIg1xh3nbcPC8PWWHc6puc5IiDtE3YM,618
18
+ txt2detection/config/detection_languages.yaml,sha256=dgQUJPxhDRJ_IiFEFOiH0yhEer3SkFSIhY4pS3BsX2c,287
19
+ txt2detection-1.1.3.dist-info/METADATA,sha256=7MY5J1q8uNOiqybohYelMcKqRzL70kw0zM3zZ2c-Kqw,14823
20
+ txt2detection-1.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ txt2detection-1.1.3.dist-info/entry_points.txt,sha256=ep_rLlS2r1-kKE7S3iKf3SVwbCU9-FZhU9zUebitw7A,62
22
+ txt2detection-1.1.3.dist-info/licenses/LICENSE,sha256=BK8Ppqlc4pdgnNzIxnxde0taoQ1BgicdyqmBvMiNYgY,11364
23
+ txt2detection-1.1.3.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ txt2detection = txt2detection.__main__:main
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2020 DOGESEC (https://www.dogesec.com/)
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.