-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathapi.php
More file actions
45 lines (37 loc) · 1.04 KB
/
api.php
File metadata and controls
45 lines (37 loc) · 1.04 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
<?php
function requireAll($dir) {
foreach (glob("$dir/*.php") as $file) {
require $file;
}
}
requireAll("api/utils");
requireAll("api");
if(!isset($_GET['user']) || !isset($_GET['pass'])){
$user = "USER";
$pass = "PASSWORD";
}else{
$user = $_GET['user'];
$pass = $_GET['pass'];
}
if(strlen($user) < 2 || strlen($pass) < 2) return;
$GLOBALS['config'] = \utils\Utils::getConfigJson();
$GLOBALS['startTime'] = time();
$GLOBALS['debugMode'] = $GLOBALS['config']['variable']['debug_mode'];
$GLOBALS['returnMode'] = $GLOBALS['config']['variable']['return_mode'];
$GLOBALS['exploit'] = $GLOBALS['config']['variable']['exploit'];
if($GLOBALS['config']['variable']['hydra_key'] == ""){
echo "REQUIRED: hydra_key is missing in config.json";
return;
}
try{
$newCheck = new \newAccount\StartCheck($user, $pass);
if($GLOBALS['returnMode']){
$newCheck->returnAccount("text");
}
if($GLOBALS['debugMode']){
echo PHP_EOL.'Total time spent: '.time() - $GLOBALS['startTime'].' seconds';
}
} catch(Exception $e){
echo $e->getMessage();
}
?>