Skip to content

Commit f0e74b0

Browse files
committed
fix: Updated protocol attribute name (requests=> http & network => tcp)
1 parent 9a0b990 commit f0e74b0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pocsuite3/lib/yaml/nuclei/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ def __init__(self, template, target=''):
7171
except ValueError:
7272
pass
7373
self.json_template = yaml.safe_load(expand_preprocessors(self.yaml_template))
74+
75+
# Breaking Changes in nuclei v2.9.1, Updated protocol attribute name (requests=> http & network => tcp)
76+
# in templates, Templates with the use of requests and network will still work but will be deprecated
77+
# completely in the future.
78+
79+
if 'http' in self.json_template:
80+
self.json_template['requests'] = self.json_template['http']
81+
if 'tcp' in self.json_template:
82+
self.json_template['network'] = self.json_template['tcp']
83+
7484
self.template = dacite.from_dict(
7585
Template, hyphen_to_underscore(self.json_template),
7686
config=dacite.Config(cast=[Severify, ExtractorType, MatcherType, HTTPMethod, AttackType, NetworkInputType]))

0 commit comments

Comments
 (0)