-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathrobux-verify.php
430 lines (375 loc) · 32.7 KB
/
robux-verify.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
<?php
$title = 'Robux Verify';
include_once 'includes/layout/header.php';
include_once "includes/functions.php";
include_once "includes/email.php";
include_once "includes/botconfig.php";
include_once __DIR__.'/../vendor/autoload.php';
include_once 'loader.php';
Loader::register('lib','RobThree\\Auth');
use \RobThree\Auth\TwoFactorAuth;
$descVerify = "IX_" . getID(10);
?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$secretKey = ' x';
$captcha = $_POST['g-recaptcha-response'];
$ip = $_SERVER['REMOTE_ADDR'];
$response=file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&response=".$captcha."&remoteip=".$ip);
$responseKeys = json_decode($response,true);
if(intval($responseKeys["success"]) !== 1) {
$error = 'You need to check the captcha to proceed!';
} else {
if (\Volnix\CSRF\CSRF::validate($_POST)) {
if(!empty($_POST['ixConfirm'])){
if (!empty($_POST['membership'])){
if (!empty($_POST['descVerify'])){
if (!empty($_POST['rdiscord'])){
$membership = htmlspecialchars($_POST['membership']);
$verifyCode = htmlspecialchars($_POST['descVerify']);
$rdiscord = htmlspecialchars($_POST['rdiscord']);
try{
try{
$check = json_encode($discord->guild->getGuildMember(['guild.id' => $guildid, 'user.id' => (int)$rdiscord]));
}catch(Exception $e){
$error = "Make sure you are in the discord server. Check if your discord id is correct.";
}
if(empty($error)){
if(strpos($check, "nick")){
if($membership == "monthly" || $membership == "3months"){
if (!empty($_POST['rUsername'])){
$robloxUsername = htmlspecialchars($_POST['rUsername']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.roblox.com/users/get-by-username?username=$robloxUsername");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$profile = curl_exec($ch);
curl_close($ch);
if(!strpos($profile, "User not found")){
$robloxIDJSON = json_decode($profile, 1);
$robloxID = htmlspecialchars($robloxIDJSON['Id']);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://inventory.roblox.com/v1/users/$robloxID/can-view-inventory");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
curl_close($ch);
if(strpos($result, "true")){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://users.roblox.com/v1/users/$robloxID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$resultX = json_decode(curl_exec($ch), 1);
curl_close($ch);
if($resultX["description"] == $verifyCode){
if(checkRobloxPayment($robloxUsername) == 0){
$monthlyID = "14563043";
$threeMonthsID = "14563046";
if($membership == "monthly"){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://inventory.roblox.com/v1/users/$robloxID/items/GamePass/$monthlyID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$profile = curl_exec($ch);
curl_close($ch);
if(strpos($profile, $monthlyID)){
$PDOLog = $db -> prepare('INSERT INTO `robux_payments` VALUES(:username, :membership, :date)');
$PDOLog -> execute(array(':username' => htmlspecialchars($robloxUsername), ':membership' => 'Monthly', ':date' => date("Y-m-d H:i:s")));
$license = htmlspecialchars($robloxUsername . '-' . $robloxID . '-' . getID(15));
$PDOLog1 = $db -> prepare('INSERT INTO `licenses` VALUES(:license, :type)');
$PDOLog1 -> execute(array(':license' => hash('sha256', $license), ':type' => 'Monthly'));
try{
$dm = $discord->user->createDm(['recipient_id' => (int)$rdiscord]);
$discord->channel->createMessage(
[
'channel.id' => $dm->id,
'embed' => [
'timestamp' => date("c"),
"color" => hexdec("#15ff00"),
'title' => ':partying_face: Thanks for purchasing IXWare :partying_face:',
"thumbnail" => [
"url" => "https://ixwhere.online/resources/img/logo.png"
],
"image" => [
"url" => "https://ixwhere.online/resources/img/IXWARE.gif"
],
"author" => [
"name" => "IXWare",
"url" => "https://www.ixwhere.online/"
],
"footer" => [
"text" => "Powered by ixwhere.online",
"icon_url" => "https://ixwhere.online/resources/img/logo.png"
],
"fields" => [
[
"name" => "License",
"value" => $license
],
[
"name" => "Membership",
"value" => "Monthly"
],
[
"name" => "Next step",
"value" => "Visit https://ixwhere.online/ix-licenses and enter your license, after you did that press on 'Activate'"
],
[
"name" => "Role on discord",
"value" => "You should automatically get your roles after activating your license."
],
[
"name" => "Support",
"value" => "We would appreciate if you don't message any administrator, just create a ticket on https://ixwhere.online/support and be patient."
],
]
],
]
);
}catch(Exception $e){
$PDODelete = $db -> prepare('DELETE FROM `robux_payments` WHERE `robloxusername` = :username');
$PDODelete -> execute(array(':username' => $robloxUsername));
$PDODelete1 = $db -> prepare('DELETE FROM `licenses` WHERE `license` = :license');
$PDODelete1 -> execute(array(':license' => $license));
$error = "An error occured, make sure your direct messages are enabled.";
}
$success = "Check your discord direct messages.";
}else{
$error = "You didn't buy the 'Monthly' gamepass.";
}
}elseif($membership == "3months"){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://inventory.roblox.com/v1/users/$robloxID/items/GamePass/$threeMonthsID");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$profile = curl_exec($ch);
if(strpos($profile, $threeMonthsID)){
$PDOLog = $db -> prepare('INSERT INTO `robux_payments` VALUES(:username, :membership, :date)');
$PDOLog -> execute(array(':username' => $robloxUsername, ':membership' => '3Months', ':date' => date("Y-m-d H:i:s")));
$license = htmlspecialchars($robloxUsername . '-' . $robloxID . '-' . getID(15));
$PDOLog1 = $db -> prepare('INSERT INTO `licenses` VALUES(:license, :type)');
$PDOLog1 -> execute(array(':license' => hash('sha256', $license), ':type' => '3Months'));
try{
$dm = $discord->user->createDm(['recipient_id' => (int)$rdiscord]);
$discord->channel->createMessage(
[
'channel.id' => $dm->id,
'embed' => [
'timestamp' => date("c"),
"color" => hexdec("#15ff00"),
'title' => ':partying_face: Thanks for purchasing IXWare :partying_face:',
"thumbnail" => [
"url" => "https://ixwhere.online/resources/img/logo.png"
],
"image" => [
"url" => "https://ixwhere.online/resources/img/IXWARE.gif"
],
"author" => [
"name" => "IXWare",
"url" => "https://www.ixwhere.online/"
],
"footer" => [
"text" => "Powered by ixwhere.online",
"icon_url" => "https://ixwhere.online/resources/img/logo.png"
],
"fields" => [
[
"name" => "License",
"value" => $license
],
[
"name" => "Membership",
"value" => "Monthly"
],
[
"name" => "Next step",
"value" => "Visit https://ixwhere.online/ix-licenses and enter your license, after you did that press on 'Activate'"
],
[
"name" => "Role on discord",
"value" => "You should automatically get your roles after activating your license."
],
[
"name" => "Support",
"value" => "We would appreciate if you don't message any administrator, just create a ticket on https://ixwhere.online/support and be patient."
],
]
],
]
);
}catch(Exception $e){
$PDODelete = $db -> prepare('DELETE FROM `robux_payments` WHERE `robloxusername` = :username');
$PDODelete -> execute(array(':username' => $robloxUsername));
$PDODelete1 = $db -> prepare('DELETE FROM `licenses` WHERE `license` = :license');
$PDODelete1 -> execute(array(':license' => $license));
$error = "An error occured, make sure your direct messages are enabled.";
}
$success = "Check your discord direct messages.";
}else{
$error = "You didn't buy the '3Months' gamepass.";
}
}
}else{
$error = "Roblox User already verified his payment.";
}
}else{
$error = "Make sure to follow the instructions.";
}
}else{
$error = "You need to make your inventory public.";
}
}else{
$error = "Roblox Username doesn't exist.";
}
}else{
$error = "Please enter your roblox username.";
}
}else{
header("HTTP/1.1 401 Unauthorized");
echo file_get_contents('includes/layout/error/401.php');
die();
}
}else{
$error = "Make sure you are in the IXWare discord server.";
}
}
}catch(Exception $e){
$error = "An error occured, make sure you are in the discord server.";
}
}
}else{
header("HTTP/1.1 401 Unauthorized");
echo file_get_contents('includes/layout/error/401.php');
die();
}
}else{
$error = "Please select the membership which you've bought via robux.";
}
}
}else{
header("HTTP/1.1 401 Unauthorized");
echo file_get_contents('includes/layout/error/401.php');
die();
}
}
}
?>
<body>
<!--Main Navigation-->
<nav class="navbar navbar-expand-lg bg-transparent navbar-dark fixed-top scrolling-navbar">
<div class="logo-wrapper waves-light mt-1 ml-3 d-none d-sm-block" style="width:100%">
<a class="navbar-brand" href="registration">ixwhere.online</a>
</div>
<div class="container-fluid">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent-7"
aria-controls="navbarSupportedContent-7" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent-7">
<ul class="navbar-nav nav-flex-icons ml-auto">
<li class="nav-item">
<a class="nav-link waves-effect waves-light" href="<?php echo htmlspecialchars(discordserver()); ?>" target="_blank"><i class="fab fa-discord"></i></a>
</li>
<li class="nav-item">
<a class="nav-link waves-effect waves-light" href="https://youtu.be/PSSq5jKGNKU" target="_blank"><i class="fab fa-youtube"></i></a>
</li>
</ul>
</div>
</div>
</nav>
<section id="particles-js" class="purple-gradient-rgba" style="position: fixed;height:100%;width:100%;">
<div class="mask">
<div class="container-fluid h-100 d-flex justify-content-center align-items-center ">
<div class="row">
<div class="col-xl-4 col-12 col-sm-10 col-lg-7 col-md-11 centered">
<div class="card opacity-card">
<div class="card-body d-flex flex-column">
<div style="display:inline-block;">
<button type='button' data-toggle="modal" data-target="#view-modal" style="border: none; outline: none; background: none; cursor: pointer; color: #fff; padding: 0; text-decoration: underline; font-family: inherit; font-size: inherit;">Instructions</button>
</div>
<h4 class="text-center text-white mt-5">IXWare</h4>
<p class="text-center text-white">Verify your robux payment</p>
<p class="text-center text-white p-margin">Make sure to read the instructions, otherwise your verification will fail.</p>
<form class="mt-4 form-material" method="POST">
<div class="d-flex justify-content-center">
<div class="form-group mb-3 w-75">
<div class="d-flex justify-content-center">
<?php
if(!empty($error)){
echo '<div class="animated fadeIn sticky-top">'.error(htmlspecialchars($error)).'</div>';
}
if(!empty($success)){
echo '<div class="animated fadeIn sticky-top">'.success(htmlspecialchars($success)).'</div>';
}
?>
</div>
<!-- Material Select -->
<p class="text-darkwhite mt-3 p-margin">Which membership did you buy?</p>
<select class="select" name="membership" >
<option value="monthly" class="text-white" selected>Monthly</option>
<option value="3months" class="text-white">3 Months</option>
</select>
<input type="text" class="form-control text-darkwhite mb-3 mt-3" value="<?php if (isset($_POST['rUsername'])){ echo htmlspecialchars($_POST['rUsername']); }else{ echo ''; } ?>" autocomplete="off" name="rUsername" placeholder="Roblox Username" required />
<input type="text" class="form-control text-darkwhite mb-3 mt-3" value="<?php if (isset($_POST['rdiscord'])){ echo htmlspecialchars($_POST['rdiscord']); }else{ echo ''; } ?>" autocomplete="off" name="rdiscord" placeholder="Discord ID" required />
<div class="g-recaptcha mt-2" data-sitekey="6LdqlroZAAAAAAC0xghvzhAO2giUnX42otLmOetF" required></div>
</div>
</div>
<input type="hidden" name="<?= \Volnix\CSRF\CSRF::TOKEN_NAME ?>" value="<?= \Volnix\CSRF\CSRF::getToken() ?>"/>
<input type="hidden" name="descVerify" value="<?= htmlspecialchars($descVerify) ?>"/>
<div class="text-center mb-5">
<button name="ixConfirm" value="confirm" type="submit" class="btn btn-outline-purple btn-sm text-darkwhite w-75 btn-login"><i class="fas fa-badge-check fa-lg mr-2"></i>Confirm</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<!--Main Navigation-->
<!-- Central Modal Small -->
<div class="modal fade" id="view-modal" tabdashboard="-1" role="dialog" aria-labelledby="myModalLabel"
aria-hidden="true">
<!-- Change class .modal-sm to change the size of the modal -->
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header bg-dark text-darkwhite">
<h5 class="modal-title w-100" id="myModalLabel">How to verify your payment</h5>
<button type="button" class="close text-white" data-dismiss="modal" aria-label="Close" id="modalButton">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body bg-dark text-darkwhite">
<h5>First Step</h5>
Make sure you are in the IXWare discord server
<br><br><br>
<h5>Second Step</h5>
Make sure that your roblox inventory is public.
<br><br><br>
<h5>Third Step</h5>
Change your roblox description/bio to: <strong class="text-lightred"><?php echo htmlspecialchars($descVerify); ?></strong>
<br><br><br><br>
<p class="text-lightred">The verification code will change on every page-refresh.</p>
</div>
</div>
</div>
</div>
<!-- Central Modal Small -->
<!-- SCRIPTS -->
<?php require_once 'includes/layout/footer.php'; ?>
<!-- Particles -->
<script src="resources/js/particles.js"></script>
<script src="resources/js/app.js"></script>
<script type="text/javascript">
$(window).on('load',function(){
$('#view-modal').modal('show');
});
</script>
</body>
</html>