Example #1
0
 /**
  * Constructor.
  *
  * @return void
  */
 public function __construct($tagProperties = array())
 {
     $this->pdf = Pdf::singleton();
     if (isset($tagProperties['ID'])) {
         $this->id = $tagProperties['ID'];
         if (!isset($this->pdf->linksIds[$this->id])) {
             $this->pdf->linksIds[$this->id] = $this->pdf->AddLink();
         }
         $this->pdf->SetLink($this->pdf->linksIds[$this->id], -1);
     }
 }
Example #2
0
 $vwidth_array = array(20, 170);
 // 196 total
 $count = 0;
 $oldip = "";
 // iterate through the IP is the results
 foreach ($arrResults as $hostIP_ctx => $scanData) {
     list($hostIP, $hostctx) = explode("#", $hostIP_ctx);
     $host_id = key(Asset_host::get_id_by_ips($dbconn, $hostIP, $hostctx));
     if (valid_hex32($host_id)) {
         $hostname = Asset_host::get_name_by_id($dbconn, $host_id);
     } else {
         $hostname = _('unknown');
     }
     $hostIP = htmlspecialchars_decode($hostIP);
     $hostname = htmlspecialchars_decode($hostname);
     $pdf->SetLink(${"IP_" . $hostIP_ctx}, $pdf->GetY());
     //print out the host cell
     $pdf->SetFillColor(229, 229, 229);
     $pdf->SetFont('', 'B', 10);
     $pdf->Cell(95, 6, $hostIP, 1, 0, 'C', 1);
     $pdf->Cell(95, 6, $hostname, 1, 0, 'C', 1);
     //$pdf->Cell(105, 6, "",1,0,'C');
     $pdf->SetFont('', '');
     $pdf->Ln();
     // now iterate through the scan results for this IP
     $all_results = array();
     foreach ($scanData as $vuln) {
         $exception = "";
         $risk_value = $vuln['risk'];
         $actual_risk = getrisk($risk_value);
         if ($vuln['exception'] != "") {