/** * Creates a form to delete a XSSAttack entity. * * @param XSSAttack $xSSAttack The XSSAttack entity * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm(XSSAttack $xSSAttack) { return $this->createFormBuilder()->setAction($this->generateUrl('xssattack_delete', array('id' => $xSSAttack->getId())))->setMethod('DELETE')->getForm(); }
private function sendAttack(TargetInterface $target, XSSAttack $result) { $client = $this->getGuzzle(); $req = $client->createRequest($target->getMethod(), $target->getUrl(), null, null, ["query" => [$target->getParameters()['key'] => $result->getMessage()]]); $response = $req->send(); return $response; }