txt2detection 1.0.12__py3-none-any.whl → 1.0.14__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.
Potentially problematic release.
This version of txt2detection might be problematic. Click here for more details.
- txt2detection/__main__.py +3 -2
- txt2detection/ai_extractor/utils.py +3 -1
- txt2detection/bundler.py +1 -1
- {txt2detection-1.0.12.dist-info → txt2detection-1.0.14.dist-info}/METADATA +2 -1
- {txt2detection-1.0.12.dist-info → txt2detection-1.0.14.dist-info}/RECORD +8 -8
- {txt2detection-1.0.12.dist-info → txt2detection-1.0.14.dist-info}/WHEEL +0 -0
- {txt2detection-1.0.12.dist-info → txt2detection-1.0.14.dist-info}/entry_points.txt +0 -0
- {txt2detection-1.0.12.dist-info → txt2detection-1.0.14.dist-info}/licenses/LICENSE +0 -0
txt2detection/__main__.py
CHANGED
|
@@ -265,8 +265,9 @@ def run_txt2detection(
|
|
|
265
265
|
created=detection.date,
|
|
266
266
|
modified=detection.modified,
|
|
267
267
|
)
|
|
268
|
-
|
|
269
|
-
detection.
|
|
268
|
+
kwargs['license'] = kwargs.get('license') or detection.license
|
|
269
|
+
detection.level = kwargs.get("level") or detection.level
|
|
270
|
+
detection.status = kwargs.get("status") or detection.status
|
|
270
271
|
detection.date = as_date(kwargs.get("created"))
|
|
271
272
|
detection.modified = as_date(kwargs.get("modified"))
|
|
272
273
|
detection.references = kwargs["reference_urls"]
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import io
|
|
2
2
|
import logging
|
|
3
3
|
import typing
|
|
4
|
+
import json_repair
|
|
4
5
|
|
|
5
6
|
from llama_index.core.output_parsers import PydanticOutputParser
|
|
6
7
|
|
|
@@ -16,4 +17,5 @@ class ParserWithLogging(PydanticOutputParser):
|
|
|
16
17
|
print(text, file=f)
|
|
17
18
|
print("=================close=================" + "\n" * 5, file=f)
|
|
18
19
|
logging.debug(f.getvalue())
|
|
19
|
-
|
|
20
|
+
repaired_json = json_repair.repair_json(text)
|
|
21
|
+
return super().parse(repaired_json)
|
txt2detection/bundler.py
CHANGED
|
@@ -87,7 +87,7 @@ class Bundler:
|
|
|
87
87
|
)
|
|
88
88
|
|
|
89
89
|
extension_definition = load_stix_object_from_url(
|
|
90
|
-
"https://raw.githubusercontent.com/muchdogesec/stix2extensions/refs/heads/main/extension-definitions/properties/indicator-
|
|
90
|
+
"https://raw.githubusercontent.com/muchdogesec/stix2extensions/refs/heads/main/extension-definitions/properties/indicator-sigma-rule.json"
|
|
91
91
|
)
|
|
92
92
|
|
|
93
93
|
@classmethod
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: txt2detection
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.14
|
|
4
4
|
Summary: A command line tool that takes a txt file containing threat intelligence and turns it into a detection rule.
|
|
5
5
|
Project-URL: Homepage, https://github.com/muchdogesec/txt2detection
|
|
6
6
|
Project-URL: Issues, https://github.com/muchdogesec/txt2detection/issues
|
|
@@ -12,6 +12,7 @@ Classifier: License :: OSI Approved :: Apache Software License
|
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
|
14
14
|
Requires-Python: >=3.11
|
|
15
|
+
Requires-Dist: json-repair
|
|
15
16
|
Requires-Dist: jsonschema>=4.22.0; python_version >= '3.8'
|
|
16
17
|
Requires-Dist: llama-index-core>=0.12.42
|
|
17
18
|
Requires-Dist: llama-index-llms-openai>=0.4.5
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
txt2detection/__init__.py,sha256=Fc460P0q_eb2u3Xc89z-fwl-4ai3jrPqPNVwJQYNkNQ,89
|
|
2
|
-
txt2detection/__main__.py,sha256=
|
|
2
|
+
txt2detection/__main__.py,sha256=KC4JtsrFXXiXfNv77lVaYbDBrub5grup5-MNjwHhmOs,11685
|
|
3
3
|
txt2detection/attack_navigator.py,sha256=CEph4Q3N49ASC0b0eXzTgbBU_JBUHUrBWag7dn_TGbg,2135
|
|
4
|
-
txt2detection/bundler.py,sha256=
|
|
4
|
+
txt2detection/bundler.py,sha256=bu-AbcnWiyTw9ILPw_V4aPXzcqa9VQWVWTMsy25uxP0,15151
|
|
5
5
|
txt2detection/credential_checker.py,sha256=NuKk7WlDshtdpGecxY1exoi4fUHCygunPH2lZ20oEA8,2598
|
|
6
6
|
txt2detection/models.py,sha256=9nEmbyRNIM5ZhM6asJymKlcUA2Bj2mbFEtWX5OPTU2s,12857
|
|
7
7
|
txt2detection/observables.py,sha256=FuOfq7TsQykeHbE5waakx-rh1JacAq3G8mUqi-3Aw_o,5896
|
|
@@ -14,10 +14,10 @@ txt2detection/ai_extractor/gemini.py,sha256=hlcKkiHGzQJ0dQECfIhjx2LfdhZoquAF9POw
|
|
|
14
14
|
txt2detection/ai_extractor/openai.py,sha256=ggonpHtckNz9GEJIR0ADMzZWDKi6EWuicP0fsxvkP3A,616
|
|
15
15
|
txt2detection/ai_extractor/openrouter.py,sha256=rL-SnzRhzrCnPJGLxbTlRyxU0NAw42RmSq3ouuo3Iag,658
|
|
16
16
|
txt2detection/ai_extractor/prompts.py,sha256=u8PyFcyqrr-MTo2uwa4cDOhh7FbvSnmc0sceaKzThsw,5996
|
|
17
|
-
txt2detection/ai_extractor/utils.py,sha256=
|
|
17
|
+
txt2detection/ai_extractor/utils.py,sha256=EZJb3T34WV5iXIg1xh3nbcPC8PWWHc6puc5IiDtE3YM,618
|
|
18
18
|
txt2detection/config/detection_languages.yaml,sha256=dgQUJPxhDRJ_IiFEFOiH0yhEer3SkFSIhY4pS3BsX2c,287
|
|
19
|
-
txt2detection-1.0.
|
|
20
|
-
txt2detection-1.0.
|
|
21
|
-
txt2detection-1.0.
|
|
22
|
-
txt2detection-1.0.
|
|
23
|
-
txt2detection-1.0.
|
|
19
|
+
txt2detection-1.0.14.dist-info/METADATA,sha256=1hSBgeJcwkpXkXVUoKihFdGXcPa2lctx9ym58dgVNHE,14824
|
|
20
|
+
txt2detection-1.0.14.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
21
|
+
txt2detection-1.0.14.dist-info/entry_points.txt,sha256=ep_rLlS2r1-kKE7S3iKf3SVwbCU9-FZhU9zUebitw7A,62
|
|
22
|
+
txt2detection-1.0.14.dist-info/licenses/LICENSE,sha256=BK8Ppqlc4pdgnNzIxnxde0taoQ1BgicdyqmBvMiNYgY,11364
|
|
23
|
+
txt2detection-1.0.14.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|