Exemple #1
0
 def _get_urls_from_file(self):
     # Get the contents of the output file
     for line in file('output-fr.csv'):
         if 'http' not in line:
             continue
         else:
             fr = FuzzableRequest.from_csv(line)
             yield fr.get_uri()
Exemple #2
0
    def test_export_import_with_post_data(self):
        dc = KeyValueContainer(init_val=[('a', ['1'])])
        fr = FuzzableRequest(URL("http://www.w3af.com/"), post_data=dc)

        self.assertEqual(fr.to_csv(), '"GET","http://www.w3af.com/","a=1"')

        raise SkipTest('Failing because we do NOT export headers')
        imported_fr = fr.from_csv(fr.to_csv())
        self.assertEqual(imported_fr, fr)
    def test_export_import_with_post_data(self):
        dc = KeyValueContainer(init_val=[('a', ['1'])])
        fr = FuzzableRequest(URL("http://www.w3af.com/"), post_data=dc)

        self.assertEqual(fr.to_csv(), '"GET","http://www.w3af.com/","a=1"')

        raise SkipTest('Failing because we do NOT export headers')
        imported_fr = fr.from_csv(fr.to_csv())
        self.assertEqual(imported_fr, fr)
Exemple #4
0
    def test_export_import_without_post_data(self):
        fr = FuzzableRequest(URL("http://www.w3af.com/"))
        self.assertEqual(fr.to_csv(), '"GET","http://www.w3af.com/",""')

        imported_fr = fr.from_csv(fr.to_csv())
        self.assertEqual(imported_fr, fr)
    def test_export_import_without_post_data(self):
        fr = FuzzableRequest(URL("http://www.w3af.com/"))
        self.assertEqual(fr.to_csv(), '"GET","http://www.w3af.com/",""')

        imported_fr = fr.from_csv(fr.to_csv())
        self.assertEqual(imported_fr, fr)