initial commit
This commit is contained in:
18
CTF/Decryptify1.2/php/test2.php
Normal file
18
CTF/Decryptify1.2/php/test2.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
function calculate_seed_value($email, $constant_value) {
|
||||
$email_length = strlen($email);
|
||||
$email_hex = hexdec(substr($email, 0, 8));
|
||||
$seed_value = hexdec($email_length + $constant_value + $email_hex);
|
||||
|
||||
return $seed_value;
|
||||
}
|
||||
|
||||
$email = "hello@fake.thm";
|
||||
$constant_value = 99999;
|
||||
|
||||
$seed_value = calculate_seed_value($email, $constant_value);
|
||||
mt_srand($seed_value);
|
||||
$random = mt_rand();
|
||||
$invite_code = base64_encode($random);
|
||||
echo "The invite code for " . $email . " is: " . $invite_code;
|
||||
?>
|
||||
Reference in New Issue
Block a user