-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjapi.php
More file actions
50 lines (42 loc) · 1.13 KB
/
japi.php
File metadata and controls
50 lines (42 loc) · 1.13 KB
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
<?php
// Including necessary files
include_once("inc/config.inc.php");
include_once("class/db.class.php");
include_once("class/japi.class.php");
// Check if there is a need to wake up the silly class. Maybe we'll stop right here.
// Very simple - should block simple attempts
//if (!$_GET['action']) exit;
//error_reporting(E_ALL);
// Initiating classes
$db = new db;
$japi = new japi;
if ($_GET["en"])
{
$string = serialize(array("mode" => "getUserInfo","uid" => $_GET['id'],"pwd" => $_GET['pw']));
$japi->encrypt_data($string);
echo $japi->urlsafe_b64encode(trim($japi->encrypted_data));
echo "<br><br>";
echo trim($japi->encrypted_data);
exit;
}
// Enabling Debug
$japi->debug_toggle_state();
// OK first we have to know, wahts going on. decrypting requestdata
$japi->decrypt_data($_GET['action']);
// Performing security check
$japi->verify_data();
// Switch for requestmode
switch($japi->decrypted_data['mode'])
{
case "getUserInfo":
$japi->debug_message("Requesting Userinfo");
$japi->get_user_info();
break;
case "getAllyInfo":
$japi->debug_message("Requesting Allyinfo");
$japi->get_ally_info();
break;
default:
exit;
}
?>