forked from ZonD80/regmyudid.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pay.php
54 lines (46 loc) · 1.48 KB
/
pay.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
$CONFIG['ENC_SECRET'] = 'sdfsdfsfw21';
function validate_udid($udid) {
return (preg_match('#^([a-z0-9+]{40})$#s', $udid) && !preg_match('/fffff/', $udid));
}
function encrypt($text, $salt) {
if (!$text)
return false;
return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_128, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128, MCRYPT_MODE_ECB), MCRYPT_RAND))));
}
$udid = (string) $_POST['udid'];
if (!validate_udid($udid)) {
die('<h1>This UDID is invalid. <a href="https://regmyudid.com/#Section-5">How to find correct UDID?</a>');
}
$type = (string) $_POST['type'];
if (!in_array($type, array('REG', 'CERT'))) {
die('Hacking attempt, invalid type');
}
$udidsend = ($udid);
if ($type == 'REG') {
$src = "http://rmupayments.com/pay/standard.php?udidsend=" . urlencode($udidsend);
} elseif ($type == 'CERT') {
$src = "http://rmupayments.com/pay/advanced.php?udidsend=" . urlencode($udidsend);
}
?>
<!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<title>RegMyUDID Payment</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
</head>
<body>
<?php
/* Redirect browser */
header("Location: $src");
/* Make sure that code below does not get executed when we redirect. */
exit;
?>
</body>
</html>