def testMarksEndpointsAsFuzzedOnlyIfCheckRequestReproducible(self): self.assertTrue(False) with self.mockUtilityCalls(): cb, state, burpCallbacks = self._ctc() em = GenericMock() em.fuzzed = False em.setFuzzed = GenericMock() requestA = GenericMock() utility.counter = 0 def wasReproducible(): if utility.counter == 0: utility.counter += 1 return True else: return False requestA.wasReproducible = wasReproducible em.requests = [requestA] state.endpointTableModel.endpoints = {"GET|/lol": em} requestA.analyzedResponse.statusCode = 200 requestA.repeatedAnalyzedResponse.statusCode = 200 cb.fuzzButtonClicked(GenericMock()) self.assertEquals(state.endpointTableModel.setFuzzed.call_count, 0)
def testMarksEndpointsAsFuzzed(self): with self.mockUtilityCalls(): cb, state, burpCallbacks = self._ctc() em = GenericMock() em.fuzzed = False em.setFuzzed = GenericMock() requestA = GenericMock() em.requests = [requestA] state.endpointTableModel.endpoints = {"GET|/lol": em} requestA.analyzedResponse.statusCode = 200 requestA.repeatedAnalyzedResponse.statusCode = 200 cb.fuzzButtonClicked(GenericMock()) self.assertEquals(state.fuzzExecutorService.submit.call_count, 5) self.assertEquals(state.endpointTableModel.setFuzzed.call_count, 1)