<?php
ini_set("memory_limit","512M");error_reporting(E_ALL); $suntzu="OVCtl.OVCtl"; system("php object.php $suntzu > typelib");$my_typelib=file('typelib');
$metodi=array();
$prop=array();
for ($i=0; $i<count($my_typelib); $i++) {
if (eregi("function",$my_typelib[$i])){
$my_typelib[$i]=str_replace("function","",$my_typelib[$i]);
$my_typelib[$i]=trim(str_replace("(","",$my_typelib[$i]));
if (!in_array($my_typelib[$i],$metodi)){
$temp=Array($my_typelib[$i]);
$metodi=array_merge($temp,$metodi);
}
}
if ((eregi("var",$my_typelib[$i])) and (!eregi("variant",$my_typelib[$i]))){
$my_typelib[$i]=str_replace("var","",$my_typelib[$i]);
$my_typelib[$i]=str_replace("$","",$my_typelib[$i]);
$my_typelib[$i]=trim(str_replace(";","",$my_typelib[$i]));
if (!in_array($my_typelib[$i],$prop)){
$temp=Array($my_typelib[$i]);
$prop=array_merge($temp,$prop);
}
}
}
for ($i=0; $i<count($prop); $i++){
echo "property' -> ".$prop[$i]."\n";
}
for ($i=0; $i<count($metodi); $i++){
echo "metodo -> ".$metodi[$i]."\n";
}
$pattern=array( '$bof','$bof,$I','$I,$bof','$bof,$I,$I',
'$I,$bof,$I','$I,$I,$bof','$bof,$I,$I,$I',
'$I,$bof,$I,$I','$I,$I,$bof,$I','$I,$I,$I,$bof',
'$bof,$I,$I,$I,$I','$I,$bof,$I,$I,$I','$I,$I,$bof,$I,$I',
'$I,$I,$I,$bof,$I','$I,$I,$I,$I,$bof','$bof,$I,$I,$I,$I,$I',
'$I,$bof,$I,$I,$I,$I','$I,$I,$bof,$I,$I,$I','$I,$I,$I,$bof,$I,$I',
'$I,$I,$I,$I,$bof,$I','$I,$I,$I,$I,$I,$bof'
);
$objIndexServer = new COM($suntzu);
for ($u=9999; $u<=10000;$u++){
for ($k=1; $k<=255; $k++){
$bof="a".str_repeat(chr($k),$u);
for ($i=0; $i<count($prop); $i++)
{ try {
echo "proprieta' -> ".$prop[$i].":".$k.":".$u."\n";
$objIndexServer->$prop[$i] = $bof;
} catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
}
for ($o=0;$o<count($pattern);$o++) {
echo 'pattern: '.$o.":".$u."\n";
if (strtolower($metodi[$i]) <> "saveas"){
eval('
for ($i=0; $i<count($metodi); $i++)
if ($metodi[$i] <> "GetTypeInfoCount"){
{ try {
echo "metodo -> ".$metodi[$i].":".$k."\n";
$I=1;
$objIndexServer->$metodi[$i]('.$pattern[$o].');
} catch (Exception $e) {
echo "Caught exception: ", $e->getMessage(), "\n";
}
}}
}'
);
}
}
}
$objIndexServer = null;
?>