def compile_template(self): _url = Static(name='url', value=self.url.encode()) _method = Static(name='method', value=self.method.encode()) template = Template(name='{}_{}'.format(self.url.replace('/', '_'), self.method), fields=[_url, _method]) self.fuzz_place = get_field_type_by_method(self.method) template.append_fields([Container(name='{}'.format(self.fuzz_place), fields=self.fuzz_params)]) return template
def compile_template(self): _url = Static(name='url', value=self.url) _method = Static(name='method', value=self.method) template = Template(name=self.name, fields=[_url, _method]) for name, field in self.field_to_param.items(): if list(field): template.append_fields([Container(name=name, fields=field)]) return template
def compile_template(self): _url = Static(name='url', value=self.url) _method = Static(name='method', value=self.method) template = Template(name=self.name, fields=[_url, _method]) for name, field in self.field_to_param.items(): if list(field): try: template.append_fields([Container(name=name, fields=field)]) except KittyException as e: self.logger.warning('Failed to add {} because {}, continue processing...'.format(name, e)) return template
def compile_template(self): _url = Static(name='url', value=self.url.encode()) _method = Static(name='method', value=self.method.encode()) template = Template(name=self.name, fields=[_url, _method]) if list(self.params): template.append_fields( [Container(name='params', fields=self.params)]) if list(self.headers): template.append_fields( [Container(name='headers', fields=self.headers)]) if list(self.data): template.append_fields([Container(name='data', fields=self.data)]) if list(self.path_variables): template.append_fields( [Container(name='path_variables', fields=self.path_variables)]) if list(self.cookies): template.append_fields( [Container(name='cookies', fields=self.cookies)]) return template
def compile_template(self): _url = Static(name='url', value=self.url.encode()) _method = Static(name='method', value=self.method.encode()) template = Template(name='{}_{}'.format(self.url.replace('/', '_'), self.method), fields=[_url, _method]) if self.parameters: template.append_fields([Container(name='parameters', fields=self.parameters)]) if self.headers: template.append_fields([Container(name='headers', fields=self.headers)]) if self.data: template.append_fields([Container(name='data', fields=self.data)]) if self.path_variables: template.append_fields([Container(name='path_variables', fields=self.path_variables)]) return template