Exemple #1
0
*  This program is free software; you can redistribute it and/or
*  modify it under the terms of the GNU General Public License
*  as published by the Free Software Foundation; either version 2
*  of the License, or (at your option) any later version.
*  
*  This program is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*  
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software
*  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/
include 'scoredb.php';
$scoreboard = new scoreboarddb();
function decrypt($d)
{
    $decrypted = $d;
    $ivSize = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_CBC);
    $key = base64_decode("BASE_64_ENCODED_KEY");
    //This key will prevent a 3rd party from submitting false scores, so make it something long and random.
    $i = 0;
    do {
        $peices = explode(':', $decrypted);
        //See iOS source for expected formatting
        $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $key, base64_decode($peices[1]), MCRYPT_MODE_CBC, base64_decode($peices[0])), "");
        //decrypted results can be a little funky, hence the rtrim.
        $i++;
    } while ($i < 7);
    //7 layers of AES encryption, each with it's own IV keeps our score submissions safe and 7 times more process intensive to brute force.
Exemple #2
0
            echo '&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:white;">|</span>&nbsp;&nbsp;&nbsp;&nbsp;';
            echo '<a href="/TechnoTap/">Scoreboard</a><br /><br />';
            echo "<p><h2>About Techno Tap</h2></p>";
            echo '<div class="privacy"><p>';
            ?>
Techno Tap is a solo venture created by software engineer Patrick Cossette in his spare time
</p</div><br />
<center><p>Copyright &copy; 2015 Patrick Cossette</p></center>
		<?php 
            $pageFound = true;
        }
    }
}
if (!$pageFound) {
    include 'scoredb.php';
    $scoreboard = new scoreboarddb();
    echo '<br />';
    echo '<a href="/TechnoTap/?page=privacy">Privacy Policy</a>';
    echo '&nbsp;&nbsp;&nbsp;&nbsp;<span style="color:white;">|</span>&nbsp;&nbsp;&nbsp;&nbsp;';
    echo '<a href="/TechnoTap/?page=about">About</a><br /><br />';
    echo "<h2>-Scoreboard-</h2></p><br /><br />";
    $top100 = $scoreboard->getTop100Scores();
    $recent = $scoreboard->getRecentScores();
    $rank = 1;
    echo '<div class="tableContainer"><br /><table border=1 width= 300 style="float:left">';
    echo '<tr><td colspan="4"><h3><center>Top 100</center></h3></td></tr>';
    echo '<tr>';
    echo '<td><b>Rank</b></td>';
    echo '<td><b>Name</b></td>';
    echo '<td><b>Score</b></td>';
    echo '<td><b>Country</b></td>';