Esempio n. 1
0
$scramble_this = 'test.zip ';
//Open file to compress.
//$scramble_this = 'test.raw ';                       //Open file to compress.
$filesize = filesize($scramble_this);
$fhandle = fopen($scramble_this, 'rb');
$thebytes = fread($fhandle, $filesize);
fclose($fhandle);
echo 'Orgional file size ' . strlen($thebytes) . ' of test file<br>';
$coString = gzcompress($thebytes, 9);
// test if compressed can be recompressed
echo '<b>Zombie compressioned size: ' . strlen($coString) . '</b><br>';
//  need to add for loop to cycle through split key (1-254) or just one key as this is the test area before working with compressed files.
for ($scramkey = 1; $scramkey < 255; $scramkey++) {
    // loop through scramble keys
    echo $scramkey . ' scramble key ';
    $skey = dec2bin($scramkey);
    // convert to binary
    echo $skey[0] . $skey[1] . $skey[2] . $skey[3] . $skey[4] . $skey[5] . $skey[6] . $skey[7] . '<br>';
    $P0 = '';
    $P1 = '';
    //    echo 'bytes to compress are ';
    for ($c = 0; $c < $filesize; $c++) {
        // cyctle through the whole file doing a byte at a time.
        $byte = $thebytes[$c];
        // get byte to process
        //      echo ord($byte).',';
        $bb = byte2bin($byte);
        // get binary represintation todo: need a function to make into binary string
        // if key bit = 0 put bb bit in part 0 else put it into part 1
        for ($i = 0; $i <= 7; $i++) {
            // process the byte bit by bit
Esempio n. 2
0
     $isSecOfficer = false;
 }
 // security officer role
 if (substr(dec2bin($getHeaderCorpRole), 10, 1) == '1' && $getHeaderCorpID == $G_corpID) {
     $isFacMan = true;
 } else {
     $isFacMan = false;
 }
 // factory manager role
 if (substr(dec2bin($getHeaderCorpRole), 11, 1) == '1' && $getHeaderCorpID == $G_corpID) {
     $isStatMan = true;
 } else {
     $isStatMan = false;
 }
 // station manager role
 if (substr(dec2bin($getHeaderCorpRole), 12, 1) == '1' && $getHeaderCorpID == $G_corpID) {
     $isAudit = true;
 } else {
     $isAudit = false;
 }
 // auditor role
 //}
 //echo $ip;
 $checkSec = good_query_assoc("SELECT * FROM corp_members WHERE char_id={$getHeaderCharID}");
 //echo $checkSec['char_id'];
 if (empty($checkSec['sec_ip']) && $getHeaderCorpID == $G_corpID) {
     //ip is empty, then request password and insert ip and password check!
     //echo'wae';
     require_once './includes/loginform.php';
 } else {
     $week = good_query_assoc("SELECT global_pwd_interval FROM settings");
Esempio n. 3
0
 } else {
     echo fonty('r', 'Take');
 }
 if (substr(dec2bin($_GET['crprl']), 39, 1) == 1) {
     echo fonty('g', 'Query');
 } else {
     echo fonty('r', 'Query');
 }
 echo $te;
 echo $ts . 'Div7Account ' . $tm;
 if (substr(dec2bin($_GET['crprl']), 33, 1) == 1) {
     echo fonty('g', 'Take');
 } else {
     echo fonty('r', 'Take');
 }
 if (substr(dec2bin($_GET['crprl']), 40, 1) == 1) {
     echo fonty('g', 'Query');
 } else {
     echo fonty('r', 'Query');
 }
 echo $te;
 echo $te;
 echo '</table>';
 /*
 
 // division roles
 if($this->CorpRole[13]=="1")	$this->Div1HangarTake = true;
 if($this->CorpRole[14]=="1")	$this->Div2HangarTake = true;
 if($this->CorpRole[15]=="1")	$this->Div3HangarTake = true;
 if($this->CorpRole[16]=="1")	$this->Div4HangarTake = true;
 if($this->CorpRole[17]=="1")	$this->Div5HangarTake = true;
Esempio n. 4
0
while ($row = mysql_fetch_array($result)) {
    $new_tr = $i % 2 ? 'yes' : null;
    if (strtotime($row['char_log_off']) < strtotime('-4 weeks')) {
        $charLastTimeC = 'red';
    } elseif (strtotime($row['char_log_off']) < strtotime('-2 weeks')) {
        $charLastTimeC = 'orange';
    } elseif (strtotime($row['char_log_off']) < strtotime('-1 weeks')) {
        $charLastTimeC = 'yellow';
    } else {
        $charLastTimeC = 'green';
    }
    if ($row['char_role'] == '0') {
        $checkRole = 'Initiate';
    } else {
        //$checkRole = 'Other';
        if (substr(dec2bin($row['char_role']), 0, 1) == 1) {
            $checkRole = 'Director';
        } else {
            $checkRole = 'Regular';
        }
    }
    $charLastTime = ceil((time() - strtotime($row['char_log_off'])) / 86400);
    if ($evenOdd) {
        $odder = "even";
    } else {
        $odder = "odd";
    }
    $evenOdd = !$evenOdd;
    $wrt .= '<td><table border="0" cellpadding="0" cellspacing="0" width="450">';
    $wrt .= '<tr>';
    $wrt .= '	<td class="tcell' . $odder . '" width="100" rowspan="5">' . ldimg($row['char_id'], 'char', '', 'border', '64', '64') . '<br /><a class="jTip" name="CorpRoles!" id="crprls' . $i . '" href="./includes/rolecheck.php?width=300&crprl=' . $row['char_role'] . '">' . $checkRole . '</a></td>';