diff --git a/launcher.php b/launcher.php
index 703526d..eb8d8a0 100644
--- a/launcher.php
+++ b/launcher.php
@@ -11,11 +11,7 @@
-----------------------------------------------------
File: launcher.php
-----------------------------------------------------
-<<<<<<< Updated upstream
- Version: 0.0.20.0 Experimental
-=======
Version: 0.0.22.0 Experimental
->>>>>>> Stashed changes
-----------------------------------------------------
Usage: All the functions of Arvind can be obtained in here
=====================================================
@@ -24,10 +20,7 @@
define('INCLUDE_CHECK',true);
define('NO_DEBUG',true);
include ("scripts/actionScript.php");
-<<<<<<< Updated upstream
-=======
require ('scripts/auth.class.php');
->>>>>>> Stashed changes
//===================================================
if(!$_REQUEST){
die("No request!");
@@ -49,34 +42,6 @@
exit;
}
-<<<<<<< Updated upstream
- try {
- //To merge
- if(!file_exists($config['uploaddirs'])) {
- die ("Skins path is not a folder!");
- }
-
- if(!file_exists($config['uploaddirp'])) {
- die ("Cloak path is not a folder!");
- }
- //******
-
- require ('scripts/auth.class.php');
- $auth = new auth($ctoken, $login, $postPass, $launchermd5, false);
-
- //$hash = generateLoginHash();
- $db->run("UPDATE LOW_PRIORITY dle_users SET lastdate='".CURRENT_TIME."', logged_ip='".REMOTE_IP."' WHERE name='$login'"); //,hash='$hash'
- if($action == 'auth') {
- require_once ('scripts/geoIP.class.php');
- $geoplugin = new geoPlugin();
- require_once ("scripts/loadFiles.php");
- }
-
-} catch(PDOException $pe) {
- die(Security::encrypt("errorsql<$>", $config['key1']).$pe);
-}
-=======
if($action == 'auth') {
$auth = new auth($action, $client, $login, $postPass, $launchermd5, $ctoken);
- }
->>>>>>> Stashed changes
+ }
\ No newline at end of file
diff --git a/scripts/auth.class.php b/scripts/auth.class.php
index 6b6d1f2..6a6607b 100644
--- a/scripts/auth.class.php
+++ b/scripts/auth.class.php
@@ -1,15 +1,9 @@
>>>>>> Stashed changes
-----------------------------------------------------
Copyright (c) 2016-2021 FoxesWorld
-----------------------------------------------------
@@ -17,84 +11,6 @@
-----------------------------------------------------
File: auth.class.php
-----------------------------------------------------
-<<<<<<< Updated upstream
- Version: 0.0.1.0 Experimental
------------------------------------------------------
- Usage: Authorisation
-=====================================================
-*/
- class auth {
-
- private $debug = false;
- protected $inputLogin;
- protected $realUser;
- protected $inputPassword;
- protected $realPass;
- protected $checkPass;
- protected $launchermd5;
-
- private $accessToken;
-
- function __construct($ctoken, $login, $postPass, $launchermd5, $debug){
- global $config, $db;
- $this->debug = $debug;
- $this->inputLogin = $this->pregMatch($login);
- $this->inputPassword = $this->pregMatch($postPass);
- $this->$launchermd5 = $this->pregMatch($launchermd5);
-
- if($ctoken == "null") {
- if($config['crypt'] === 'hash_md5' || $config['crypt'] === 'hash_foxy') {
- $this->selectPassword($this->inputLogin);
- }
- $this->checkPass = hash_name($config['crypt'], $this->realPass, $this->inputPassword, @$salt);
- $this->antiBrute();
- $this->accessToken = token();
- } else {
- $this->accessToken = $this->inputPassword;
- }
-
- $sessid = token();
- $stmt = $db->prepare("SELECT user, token FROM usersession WHERE user = :login");
- $stmt->bindValue(':login', $this->realUser);
- $stmt->execute();
- $rU = $stmt->fetch(PDO::FETCH_ASSOC);
- if($rU['user'] != null) {
- $this->realUser = $rU['user'];
- }
-
- if($ctoken != "null") {
- if($rU['token'] != $this->accessToken || $this->inputLogin != $this->realUser) {
- exit(Security::encrypt("errorLogin<$>", $config['key1']));
- }
- }
- $this->setSession($this->realUser);
- }
-
- private function selectPassword($login) {
- global $db, $config;
- $stmt = $db->prepare("SELECT ".$config['db_columnUser'].",".$config['db_columnPass']." FROM ".$config['db_table']." WHERE BINARY ".$config['db_columnUser']." = :login");
- $stmt->bindValue(':login', $login);
- $stmt->execute();
- $stmt->bindColumn($config['db_columnPass'], $this->realPass);
- $stmt->bindColumn($config['db_columnUser'], $this->realUser);
- if($this->debug === true) {
- echo '
- '.'
Selected data
'.
- 'Login: '.$this->realUser.''.
- 'Pass: '. $this->realPass.'';
- }
- $stmt->fetch();
- }
-
- private function setSession ($userToSet){
- global $db;
- if($this->inputLogin == $userToSet) {
- if($ctoken == "null") {
- $stmt = $db->prepare("UPDATE usersession SET session = '$sessid', token = :token WHERE user= :login");
- $stmt->bindValue(':token', $this->accessToken);
- } else {
- $stmt = $db->prepare("UPDATE usersession SET session = '$sessid' WHERE user = :login");
-=======
Version: 0.0.2.2 Experimental
-----------------------------------------------------
Usage: Auth + SetSession + LoadFiles
@@ -213,21 +129,14 @@ private function setSession() {
$stmt->bindValue(':token', $this->accessToken);
} else {
$stmt = $db->prepare("UPDATE usersession SET session = '".$this->sessID."' WHERE user = :login");
->>>>>>> Stashed changes
}
$stmt->bindValue(':login', $this->realUser);
$stmt->execute();
-<<<<<<< Updated upstream
- } else {
- if($ctoken == "null" || $this->inputLogin != $userToSet) {
- $stmt = $db->prepare("INSERT INTO usersession (user, session, md5, token) VALUES (:login, '$sessid', :md5, '$acesstoken')");
-=======
} else {
if($this->ctoken == "null" || $this->inputUser != $this->realUser) {
$stmt = $db->prepare("INSERT INTO usersession (user, session, md5, token) VALUES (:login, '".$this->sessID."', :md5, '".$this->accessToken."')");
->>>>>>> Stashed changes
$stmt->bindValue(':login', $this->realUser);
$stmt->bindValue(':md5', str_replace('-', '', uuidConvert($this->realUser)));
$stmt->execute();
@@ -235,42 +144,6 @@ private function setSession() {
}
}
-<<<<<<< Updated upstream
- private function pregMatch($toCheck){
- global $config;
- if (!preg_match("/^[a-zA-Z0-9_-]+$/", $toCheck)) {
- exit(Security::encrypt("errorLogin<$>", $config['key1']));
- }
-
- return $toCheck;
- }
-
- private function antiBrute(){
- global $config, $db;
- if($config['useantibrut'] === true) {
- $stmt = $db->getRow("SELECT sip,time FROM sip WHERE sip='".REMOTE_IP."' And time >'".CURRENT_TIME."'");
- $bannedIP = $stmt['sip'];
- if(REMOTE_IP == $bannedIP) {
- $stmt = $db->run("DELETE FROM sip WHERE time < '".CURRENT_TIME."';");
- exit(Security::encrypt("temp<$>", $config['key1']));
- }
-
- if ($this->inputLogin != $this->realUser) {
- $stmt = $db->run("INSERT INTO sip (sip, time)VALUES ('".REMOTE_IP."', '".$config['bantime']."')");
- exit(Security::encrypt("errorLogin<$>", $config['key1']));
- }
-
- if(!strcmp($this->realPass,$this->checkPass) == 0 || !$this->realPass) {
- $stmt = $db->run("INSERT INTO sip (sip, time)VALUES ('".REMOTE_IP."', '".$config['bantime']."')");
- exit(Security::encrypt("errorLogin<$>", $config['key1']));
- }
-
- } else {
- if ($this->checkPass != $this->realPass) {
- die(Security::encrypt('errorLogin<$>', $config['key1']));
- }
- }
-=======
private function selectRealData($login) {
global $db, $config;
$stmt = $db->prepare("SELECT ".$config['db_columnUser'].",".$config['db_columnPass']." FROM ".$config['db_table']." WHERE BINARY ".$config['db_columnUser']." = :login");
@@ -285,6 +158,5 @@ private function selectRealData($login) {
'Pass: '. $this->realPass.'';
}
$stmt->fetch();
->>>>>>> Stashed changes
}
}
\ No newline at end of file
diff --git a/scripts/loadFiles.php b/scripts/loadFiles.php
index 26f1850..11012fe 100644
--- a/scripts/loadFiles.php
+++ b/scripts/loadFiles.php
@@ -11,15 +11,9 @@
-----------------------------------------------------
File: loadFiles.class.php
-----------------------------------------------------
-<<<<<<< Updated upstream
- Версия: 0.0.1.3 Alpha
------------------------------------------------------
- Назначение: Files out + crypt + size
-=======
Version: 0.0.2.5 Experimental
-----------------------------------------------------
Usage: Files out + crypt + size
->>>>>>> Stashed changes
=====================================================
*/
@@ -39,19 +33,6 @@ function __construct($client, $sessid, $acesstoken, $realUser){
$this->version = $serverInfo[0]['version'];
$this->checkStructure();
-<<<<<<< Updated upstream
- /* Basic client structure (Alpha) */
- $clientStructureCheck = array($config['clientsDir']."assets",
- $config['clientsDir']."versions/".$version,
- $config['clientsDir']."versions/".$version."/libraries",
- $config['clientsDir']."versions/".$version."/".$version.".jar",
- $config['clientsDir']."versions/".$version."/natives/");
-
- foreach($clientStructureCheck as $key) {
- if(!file_exists($key)) {
- die(Security::encrypt("client<$> $client", $config['key1']));
- }
-=======
$md5user = strtoint(xorencode(str_replace('-', '', uuidConvert($realUser)), $config['protectionKey']));
$md5ServersDat = @md5_file($config['clientsDir']."clients/".$client."/servers.dat");
$sizeServersDat = @filesize($config['clientsDir']."clients/".$client."/servers.dat");
@@ -64,7 +45,6 @@ function __construct($client, $sessid, $acesstoken, $realUser){
$hash_md5 = hashcVersion($client);
}
echo Security::encrypt($usrsessions.$hash_md5, $config['key1']);
->>>>>>> Stashed changes
}
private function checkStructure() {
diff --git a/scripts/startUpSound.class.php b/scripts/startUpSound.class.php
index 95553c5..af90714 100644
--- a/scripts/startUpSound.class.php
+++ b/scripts/startUpSound.class.php
@@ -11,11 +11,7 @@
-----------------------------------------------------
File: startUpSound.class.php
-----------------------------------------------------
-<<<<<<< Updated upstream
- Version: 0.1.12 Alpha
-=======
Version: 0.1.13 Final
->>>>>>> Stashed changes
-----------------------------------------------------
Usage: Sound generation
=====================================================
@@ -82,11 +78,8 @@ public function generateAudio() {
*/
private function eventNow() {
$eventName = 'common';
-<<<<<<< Updated upstream
-=======
$musRange = 0;
$soundRange = 0;
->>>>>>> Stashed changes
$eventArray = array();
$dateExploded = explode ('.',startUpSound::$currentDate);
$dayToday = $dateExploded[0];
@@ -217,11 +210,7 @@ private function generateMusic($debug = false) {
startUpSound::$musFilesNum = countFilesNum($currentMusFolder, '.mp3'); //Count of music
$maxRange = startUpSound::$musFilesNum;
-<<<<<<< Updated upstream
- if(isset(static::$musRange)) {
-=======
if(isset(static::$musRange) && static::$musRange !== 0) {
->>>>>>> Stashed changes
$RandMusFile = $this->genRange('mus', static::$musRange);
} else {
$RandMusFile = 'mus'.rand($minRange,$maxRange).'.mp3'; //Getting random musFile
@@ -271,11 +260,7 @@ private function generateSound($debug = false) {
$currentSoundFolder = static::$AbsolutesoundPath.'/'.static::$eventNow.static::$easter; //Folder of Sounds
startUpSound::$soundFilesNum = countFilesNum($currentSoundFolder, '.mp3'); //Count of Sounds
-<<<<<<< Updated upstream
- if(isset(static::$soundRange)) {
-=======
if(isset(static::$soundRange) && static::$soundRange !== 0) {
->>>>>>> Stashed changes
$RandSoundFile = $this->genRange('voice', static::$soundRange);
} else {
$RandSoundFile = 'voice'.rand($minRange,static::$soundFilesNum).'.mp3'; //Getting random sound file