Beispiel #1
0
    def _gen_wfuzz(self, output_fn):
        try:

            with open(self.find_file(output_fn), "r") as f:
                for (
                    url1,
                    port1,
                    schema1,
                    req1,
                    resp1,
                    url2,
                    port2,
                    schema2,
                    req2,
                    resp2,
                    url3,
                    port3,
                    schema3,
                    req3,
                    resp3,
                    res1,
                    res2,
                ) in [re.split(r"\t+", x) for x in f.readlines()]:
                    raw_req1 = base64.decodestring(req2)
                    # raw_res1 = base64.decodestring(res2)

                    item = FuzzResult()
                    item.history = FuzzRequest()
                    item.history.update_from_raw_http(raw_req1, schema1)

                    yield item
        except IOError as e:
            raise FuzzExceptBadFile("Error opening wfuzz payload file. %s" % str(e))
        except EOFError:
            raise StopIteration
Beispiel #2
0
    def _gen_wfuzz(self, output_fn):
        try:

            with open(self.find_file(output_fn), 'r') as f:
                for url1, port1, schema1, req1, resp1, url2, port2, schema2, req2, resp2, url3, port3, schema3, req3, resp3, res1, res2 in map(
                        lambda x: re.split(r'\t+', x), f.readlines()):
                    raw_req1 = base64.decodestring(req2)
                    raw_res1 = base64.decodestring(res2)

                    item = FuzzResult()
                    item.history = FuzzRequest()
                    item.history.update_from_raw_http(raw_req1, schema1)

                    item.type = FuzzResult.result

                    yield item
        except IOError, e:
            raise FuzzExceptBadFile("Error opening wfuzz payload file. %s" %
                                    str(e))