Frederick
04-21-2008, 04:13 PM
EGenius Encryption decryptor - Something else i made, really really simple.
The EGenius Encrpytion is used on very few websites but this does come in handy when you have an encrypted hash.
For example:
HlxEXvJR7Q==
Some big websites that use this encryption include 'Cambridge Universitys Rugby Club'.
<?php
Class EGenius_Encryption {
/* Version: 1.0.0.1
Namespace: eGenius
An object to encrypt strings of text
such as passwords.
Properties:
s_array: An array.
K_array: An array.
return_val;
num_count;
alp_count;
lwr_count;
cms_c;
cms_m;
Methods:
get_ascii_val: obtains the ascii value
of the character.
encrypt_value: encrypts and decrypts a value.
encrypt: uses encrypt_values to encrypt and then
wraps the encrypted value with further
protection.
decrypt: unwraps the encrypted value and uses
encrypt_value to decrypt the value.
*/
var $s_array = array();
var $K_array = array();
var $return_val;
var $num_count;
var $alp_count;
var $lwr_count;
var $cms_c;
var $cms_m;
// Method to return the decimal value of an ascii character...
function get_ascii_val($passed_val){
//This assigns all the ascii vals to the $asc_chars() array...
for($x_val = 0; $x_val <= $this->cms_c; $x_val = $x_val + 1){
$asc_chars[chr($x_val)] = $x_val;
}
return $asc_chars[$passed_val];
} // end (method)get_ascii_val
// Basic method to encrypt/decrypt. Input_val gets crypted/decrypted using key_val...
Function encrypt_value($input_val, $key_val){
$this->cms_c = 256;
$this->cms_m = $this->cms_c+1;
//Create an array of 0 - 255 and initialise
for ($i = 0; $i <= $this->cms_c; $i++){
$s_array[$i] = $i;
}
$j = 1;
// Create an array of 0 - 255 and initialise with a calculated chr value...
for ($i = 0; $i <= $this->cms_c; $i++){
if ($j > strlen($key_val)){
$j = 1;
}
$K_array[$i] = $this -> get_ascii_val(substr($key_val, $j, 1));
$j++;
}
// Shuffle the array values around to give a 'random' value...
$j = 0;
for ($i = 0; $i <= $this->cms_c; $i++){
$j = ($j + $s_array[$i] + $K_array[$i]) % $this->cms_m;
$temp_var = $s_array[$i];
$s_array[$i] = $s_array[$j];
$s_array[$j] = $temp_var;
}
// Create the 'encrypted' string from the 2 initialised arrays...
$i = 0;
$j = 0;
for ($x = 0; $x < strlen($input_val); $x++){
$i = ($i + 1) % $this->cms_m;
$j = ($j + $s_array[$i]) % $this->cms_m;
$temp_var = $s_array[$i];
$s_array[$i] = $s_array[$j];
$s_array[$j] = $temp_var;
$t = ($s_array[$i] + ($s_array[$j] % $this->cms_m)) % $this->cms_m;
$y = $s_array[$t];
$comp_val = $this -> get_ascii_val(substr($input_val, $x, 1)) ^ $y;
$calc_val = Chr($this -> get_ascii_val(substr($input_val, $x, 1)) ^ $y);
$return_val = $return_val.$calc_val;
}
return $return_val;
} // end (method) encrypt_value
function encrypt($data) {
return base64_encode($this->encrypt_value($data, '5f292279a9bdde42d51bcc9cf130741e'));
} // end (method) encrypt
function decrypt($data) {
return $this->encrypt_value(base64_decode($data), '5f292279a9bdde42d51bcc9cf130741e');
} // end (method) decrypt
} // end (class) eGenius.Encryption
$cryptit = new EGenius_Encryption();
echo "<HTML>";
echo "<TITLE>EGenius - Decryptor</TITLE>";
echo "<BODY>";
echo "<body BGCOLOR=Silver>";
echo "<center><h1><u>E-Genius Decryptor - Created by KOUM</u></h1></center>";
echo '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
echo "<B>Enter Encrypted Pass:</b><br>";
echo '<input type="text" name="password" /><br><br>';
echo '<input name="submit" type="submit" id="submit" value="Decrypt Me!" />';
echo '</form>';
echo '<br><br><br>';
echo '<center>© Koum (TheDefaced.org)</center>';
echo '</body>';
echo '</HTML>';
$password = $_POST["password"];
$decrypt = $cryptit->decrypt($password);
echo $_POST["password"] . " Decrypted Returns the value of <b><u>" . $decrypt . "</b></u>";
?>
The EGenius Encrpytion is used on very few websites but this does come in handy when you have an encrypted hash.
For example:
HlxEXvJR7Q==
Some big websites that use this encryption include 'Cambridge Universitys Rugby Club'.
<?php
Class EGenius_Encryption {
/* Version: 1.0.0.1
Namespace: eGenius
An object to encrypt strings of text
such as passwords.
Properties:
s_array: An array.
K_array: An array.
return_val;
num_count;
alp_count;
lwr_count;
cms_c;
cms_m;
Methods:
get_ascii_val: obtains the ascii value
of the character.
encrypt_value: encrypts and decrypts a value.
encrypt: uses encrypt_values to encrypt and then
wraps the encrypted value with further
protection.
decrypt: unwraps the encrypted value and uses
encrypt_value to decrypt the value.
*/
var $s_array = array();
var $K_array = array();
var $return_val;
var $num_count;
var $alp_count;
var $lwr_count;
var $cms_c;
var $cms_m;
// Method to return the decimal value of an ascii character...
function get_ascii_val($passed_val){
//This assigns all the ascii vals to the $asc_chars() array...
for($x_val = 0; $x_val <= $this->cms_c; $x_val = $x_val + 1){
$asc_chars[chr($x_val)] = $x_val;
}
return $asc_chars[$passed_val];
} // end (method)get_ascii_val
// Basic method to encrypt/decrypt. Input_val gets crypted/decrypted using key_val...
Function encrypt_value($input_val, $key_val){
$this->cms_c = 256;
$this->cms_m = $this->cms_c+1;
//Create an array of 0 - 255 and initialise
for ($i = 0; $i <= $this->cms_c; $i++){
$s_array[$i] = $i;
}
$j = 1;
// Create an array of 0 - 255 and initialise with a calculated chr value...
for ($i = 0; $i <= $this->cms_c; $i++){
if ($j > strlen($key_val)){
$j = 1;
}
$K_array[$i] = $this -> get_ascii_val(substr($key_val, $j, 1));
$j++;
}
// Shuffle the array values around to give a 'random' value...
$j = 0;
for ($i = 0; $i <= $this->cms_c; $i++){
$j = ($j + $s_array[$i] + $K_array[$i]) % $this->cms_m;
$temp_var = $s_array[$i];
$s_array[$i] = $s_array[$j];
$s_array[$j] = $temp_var;
}
// Create the 'encrypted' string from the 2 initialised arrays...
$i = 0;
$j = 0;
for ($x = 0; $x < strlen($input_val); $x++){
$i = ($i + 1) % $this->cms_m;
$j = ($j + $s_array[$i]) % $this->cms_m;
$temp_var = $s_array[$i];
$s_array[$i] = $s_array[$j];
$s_array[$j] = $temp_var;
$t = ($s_array[$i] + ($s_array[$j] % $this->cms_m)) % $this->cms_m;
$y = $s_array[$t];
$comp_val = $this -> get_ascii_val(substr($input_val, $x, 1)) ^ $y;
$calc_val = Chr($this -> get_ascii_val(substr($input_val, $x, 1)) ^ $y);
$return_val = $return_val.$calc_val;
}
return $return_val;
} // end (method) encrypt_value
function encrypt($data) {
return base64_encode($this->encrypt_value($data, '5f292279a9bdde42d51bcc9cf130741e'));
} // end (method) encrypt
function decrypt($data) {
return $this->encrypt_value(base64_decode($data), '5f292279a9bdde42d51bcc9cf130741e');
} // end (method) decrypt
} // end (class) eGenius.Encryption
$cryptit = new EGenius_Encryption();
echo "<HTML>";
echo "<TITLE>EGenius - Decryptor</TITLE>";
echo "<BODY>";
echo "<body BGCOLOR=Silver>";
echo "<center><h1><u>E-Genius Decryptor - Created by KOUM</u></h1></center>";
echo '<form action="' . $_SERVER["PHP_SELF"] . '" method="post">';
echo "<B>Enter Encrypted Pass:</b><br>";
echo '<input type="text" name="password" /><br><br>';
echo '<input name="submit" type="submit" id="submit" value="Decrypt Me!" />';
echo '</form>';
echo '<br><br><br>';
echo '<center>© Koum (TheDefaced.org)</center>';
echo '</body>';
echo '</HTML>';
$password = $_POST["password"];
$decrypt = $cryptit->decrypt($password);
echo $_POST["password"] . " Decrypted Returns the value of <b><u>" . $decrypt . "</b></u>";
?>