├── CentosAuth APIs ├── class.php ├── database.php └── index.php ├── CentosAuth C# Classes ├── Auth.cs ├── Handle.cs └── UserInfo.cs ├── CentosAuth Panel ├── Auth │ ├── class.php │ ├── database.php │ └── index.php ├── Panel │ ├── centos.gif │ ├── epic.css │ ├── index.php │ ├── logout.php │ ├── semantic.min.css │ ├── tokens.php │ ├── users.php │ └── variables.php ├── css │ └── semantic.min.css ├── include │ └── settings.php └── index.php ├── CentosAuth.sql ├── Example Program ├── CentosAuth.sln ├── CentosAuth │ ├── App.config │ ├── Auth.cs │ ├── CentosAuth.csproj │ ├── Handle.cs │ ├── Login.Designer.cs │ ├── Login.cs │ ├── Login.resx │ ├── Main.Designer.cs │ ├── Main.cs │ ├── Main.resx │ ├── Program.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Register.Designer.cs │ ├── Register.cs │ ├── Register.resx │ ├── UserInfo.cs │ ├── bin │ │ └── Debug │ │ │ ├── Newtonsoft.Json.dll │ │ │ ├── Newtonsoft.Json.xml │ │ │ ├── cent auth.exe │ │ │ ├── cent auth.exe.config │ │ │ ├── cent auth.pdb │ │ │ ├── cent auth.vshost.exe │ │ │ ├── cent auth.vshost.exe.config │ │ │ ├── cent auth.vshost.exe.manifest │ │ │ └── cent auth_patched.exe │ ├── obj │ │ └── Debug │ │ │ ├── CentosAuth.csproj.CoreCompileInputs.cache │ │ │ ├── CentosAuth.csproj.FileListAbsolute.txt │ │ │ ├── CentosAuth.csproj.GenerateResource.cache │ │ │ ├── CentosAuth.csprojAssemblyReference.cache │ │ │ ├── DesignTimeResolveAssemblyReferences.cache │ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache │ │ │ ├── cent auth.csproj.CoreCompileInputs.cache │ │ │ ├── cent auth.csproj.FileListAbsolute.txt │ │ │ ├── cent auth.csproj.GenerateResource.cache │ │ │ ├── cent auth.csprojAssemblyReference.cache │ │ │ ├── cent auth.csprojResolveAssemblyReference.cache │ │ │ ├── cent auth.exe │ │ │ ├── cent auth.pdb │ │ │ ├── cent_auth.Login.resources │ │ │ ├── cent_auth.Main.resources │ │ │ ├── cent_auth.Properties.Resources.resources │ │ │ └── cent_auth.Register.resources │ └── packages.config └── packages │ └── Newtonsoft.Json.11.0.2 │ ├── LICENSE.md │ ├── Newtonsoft.Json.11.0.2.nupkg │ └── lib │ ├── net20 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net35 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net40 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── net45 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── netstandard1.0 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── netstandard1.3 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── netstandard2.0 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ ├── portable-net40+sl5+win8+wp8+wpa81 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml │ └── portable-net45+win8+wp8+wpa81 │ ├── Newtonsoft.Json.dll │ └── Newtonsoft.Json.xml ├── README.md └── _config.yml /CentosAuth APIs/class.php: -------------------------------------------------------------------------------- 1 | connect(); 7 | } 8 | public function Encrypt($string) 9 | { 10 | $plaintext = $string; 11 | $password = base64_decode($_POST['session_id']); 12 | $method = 'aes-256-cbc'; 13 | $password = substr(hash('sha256', $password, true), 0, 32); 14 | $iv = base64_decode($_POST['session_salt']); 15 | $encrypted = base64_encode(openssl_encrypt($plaintext, $method, $password, OPENSSL_RAW_DATA, $iv)); 16 | return $encrypted; 17 | } 18 | public function Decrypt($string) 19 | { 20 | $plaintext = $string; 21 | $password = base64_decode($_POST['session_id']); 22 | $method = 'aes-256-cbc'; 23 | $password = substr(hash('sha256', $password, true), 0, 32); 24 | $iv = base64_decode($_POST['session_salt']); 25 | $decrypted = openssl_decrypt(base64_decode($plaintext), $method, $password, OPENSSL_RAW_DATA, $iv); 26 | return $decrypted; 27 | } 28 | public function generatestring($length) 29 | { 30 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxwz'; 31 | $charactersLength = strlen($characters); 32 | $randomString = ''; 33 | for ($i = 0; $i < $length; $i++) { 34 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 35 | } 36 | return strtoupper($randomString); 37 | } 38 | public function Login($username,$password,$HWID) 39 | { 40 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 41 | $query->execute(array("license"=>$this->Decrypt($username))); 42 | $result = $query->fetch(PDO::FETCH_ASSOC); 43 | if($result) 44 | { 45 | if(password_verify($this->Decrypt($password),$result['password'])) 46 | { 47 | $date = new DateTime($result['expiry_date']); 48 | $today = new DateTime(); 49 | if($result['hwid'] == $this->Decrypt($HWID)) 50 | { 51 | if($date > $today) 52 | { 53 | $encrypted_var = array(); 54 | $offset = $this->db->prepare("SELECT * FROM vars"); 55 | $offset->execute(); 56 | $offsets = $offset->fetchAll(); 57 | foreach ($offsets as $row) 58 | { 59 | $encrypted_var[$row["name"]] = $this->Encrypt($row["value"]); 60 | } 61 | $ip = (isset($_SERVER["HTTP_CF_CONNECTING_IP"])?$_SERVER["HTTP_CF_CONNECTING_IP"]:$_SERVER['REMOTE_ADDR']); 62 | die($this->Encrypt('{ 63 | "result":"success", 64 | "logged_in":"true", 65 | "id":"'.$result['id'].'", 66 | "username":"'.$result['username'].'", 67 | "password":"'.$this->Decrypt($password).'", 68 | "hwid":"'.$result['hwid'].'", 69 | "email":"'.$result['email'].'", 70 | "rank":"'.$result['rank'].'", 71 | "ip":"'.$ip.'", 72 | "expiry":"'.$result['expiry_date'].'", 73 | "vars":'.json_encode($encrypted_var, JSON_FORCE_OBJECT).', 74 | "session_id":"'.$_POST['session_id'].'", 75 | "session_salt":"'.$_POST['session_salt'].'"}')); 76 | } 77 | else 78 | { 79 | die($this->Encrypt('{ 80 | "result":"time_expired", 81 | "session_id":"'.$_POST['session_id'].'", 82 | "session_salt":"'.$_POST['session_salt'].'"}')); 83 | } 84 | } 85 | else if($result['hwid'] == '') 86 | { 87 | if($date > $today) 88 | { 89 | $this->update("users", array("hwid"=>$this->Decrypt($hwid)), "username", $this->Decrypt($username)); 90 | die($this->Encrypt('{ 91 | "result":"hwid_updated", 92 | "session_id":"'.$_POST['session_id'].'", 93 | "session_salt":"'.$_POST['session_salt'].'"}')); 94 | } 95 | else 96 | { 97 | die($this->Encrypt('{ 98 | "result":"time_expired", 99 | "session_id":"'.$_POST['session_id'].'", 100 | "session_salt":"'.$_POST['session_salt'].'"}')); 101 | } 102 | } 103 | else 104 | { 105 | die($this->Encrypt('{ 106 | "result":"invalid_hwid", 107 | "session_id":"'.$_POST['session_id'].'", 108 | "session_salt":"'.$_POST['session_salt'].'"}')); 109 | } 110 | } 111 | else 112 | { 113 | die($this->Encrypt('{ 114 | "result":"invalid_details", 115 | "session_id":"'.$_POST['session_id'].'", 116 | "session_salt":"'.$_POST['session_salt'].'"}')); 117 | } 118 | } 119 | else 120 | { 121 | die($this->Encrypt('{ 122 | "result":"invalid_details", 123 | "session_id":"'.$_POST['session_id'].'", 124 | "session_salt":"'.$_POST['session_salt'].'"}')); 125 | } 126 | } 127 | public function Register($username,$password,$rep_pass,$email,$token,$hwid) 128 | { 129 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 130 | $query->execute(array("license"=>$this->Decrypt($username))); 131 | $result = $query->fetch(PDO::FETCH_ASSOC); 132 | if(!$result) 133 | { 134 | $email_check = $this->db->prepare("SELECT * FROM users WHERE email = :license"); 135 | $email_check->execute(array("license"=>$this->Decrypt($email))); 136 | $email_result = $email_check->fetch(PDO::FETCH_ASSOC); 137 | if(!$email_result) 138 | { 139 | if($this->Decrypt($password) == $this->Decrypt($rep_pass)) 140 | { 141 | $token_check = $this->db->prepare("SELECT * FROM tokens WHERE token = :license AND used != 1"); 142 | $token_check->execute(array("license"=>$this->Decrypt($token))); 143 | $token_result = $token_check->fetch(PDO::FETCH_ASSOC); 144 | if($token_result) 145 | { 146 | $today = new DateTime(); 147 | $newDate = $today->modify('+'.$token_result['days'].' days'); 148 | $date2 = $newDate; 149 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 150 | $this->insert_query("users", array( 151 | "username"=>$this->Decrypt($username), 152 | "password"=>password_hash($this->Decrypt($password), PASSWORD_BCRYPT), 153 | "email"=>$this->Decrypt($email), 154 | "hwid"=>$this->Decrypt($hwid), 155 | "expiry_date"=>$TIME 156 | )); 157 | $this->update("tokens", array("used"=>1), "id", $token_result['id']); 158 | die($this->Encrypt('{ 159 | "result":"success", 160 | "username":"'.$this->Decrypt($username).'", 161 | "session_id":"'.$_POST['session_id'].'", 162 | "session_salt":"'.$_POST['session_salt'].'"}')); 163 | } 164 | else 165 | { 166 | die($this->Encrypt('{ 167 | "result":"invalid token", 168 | "session_id":"'.$_POST['session_id'].'", 169 | "session_salt":"'.$_POST['session_salt'].'"}')); 170 | } 171 | } 172 | else 173 | { 174 | die($this->Encrypt('{ 175 | "result":"invalid passwords", 176 | "session_id":"'.$_POST['session_id'].'", 177 | "session_salt":"'.$_POST['session_salt'].'"}')); 178 | } 179 | } 180 | else 181 | { 182 | die($this->Encrypt('{ 183 | "result":"email used", 184 | "session_id":"'.$_POST['session_id'].'", 185 | "session_salt":"'.$_POST['session_salt'].'"}')); 186 | } 187 | } 188 | else 189 | { 190 | die($this->Encrypt('{ 191 | "result":"invalid username", 192 | "session_id":"'.$_POST['session_id'].'", 193 | "session_salt":"'.$_POST['session_salt'].'"}')); 194 | } 195 | } 196 | public function RedeemToken($username,$password,$token) 197 | { 198 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 199 | $query->execute(array("license"=>$this->Decrypt($username))); 200 | $result = $query->fetch(PDO::FETCH_ASSOC); 201 | if($result) 202 | { 203 | if(password_verify($this->Decrypt($password),$result['password'])) 204 | { 205 | $token_check = $this->db->prepare("SELECT * FROM tokens WHERE token = :license"); 206 | $token_check->execute(array("license"=>$this->Decrypt($token))); 207 | $token_result = $token_check->fetch(PDO::FETCH_ASSOC); 208 | if($token_result) 209 | { 210 | $date = new DateTime($result['expiry_date']); 211 | $today = new DateTime(); 212 | if($date > $today) 213 | { 214 | $newDate = $date->modify('+'.$token_result['days'].' days'); 215 | $date2 = $newDate; 216 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 217 | $this->update("users", array("rank"=>$token_result['rank'],"expiry_date"=>$TIME), "username", $result['username']); 218 | $this->update("tokens", array("used"=>1,"used_by"=>$this->Decrypt($username)), "token", $token_result['token']); 219 | die($this->Encrypt('{ 220 | "result":"success", 221 | "session_id":"'.$_POST['session_id'].'", 222 | "session_salt":"'.$_POST['session_salt'].'"}')); 223 | } 224 | else 225 | { 226 | $newDate = $today->modify('+'.$token_result['days'].' days'); 227 | $date2 = $newDate; 228 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 229 | $this->update("users", array("rank"=>$token_result['rank'],"expiry_date"=>$TIME), "username", $result['username']); 230 | $this->update("tokens", array("used"=>1,"used_by"=>$this->Decrypt($username)), "token", $token_result['token']); 231 | die($this->Encrypt('{ 232 | "result":"success", 233 | "session_id":"'.$_POST['session_id'].'", 234 | "session_salt":"'.$_POST['session_salt'].'"}')); 235 | } 236 | } 237 | else 238 | { 239 | die($this->Encrypt('{ 240 | "result":"invalid token", 241 | "session_id":"'.$_POST['session_id'].'", 242 | "session_salt":"'.$_POST['session_salt'].'"}')); 243 | } 244 | } 245 | else 246 | { 247 | die($this->Encrypt('{ 248 | "result":"invalid details", 249 | "session_id":"'.$_POST['session_id'].'", 250 | "session_salt":"'.$_POST['session_salt'].'"}')); 251 | } 252 | } 253 | else 254 | { 255 | die($this->Encrypt('{ 256 | "result":"invalid details", 257 | "session_id":"'.$_POST['session_id'].'", 258 | "session_salt":"'.$_POST['session_salt'].'"}')); 259 | } 260 | } 261 | 262 | } -------------------------------------------------------------------------------- /CentosAuth APIs/database.php: -------------------------------------------------------------------------------- 1 | db = new PDO("mysql:host=" . $this->db_host . ";dbname=" . $this->db_name, $this->db_user, $this->db_password); 13 | 14 | if(!$this->db){ 15 | die("Failed to connect"); 16 | } 17 | } 18 | 19 | public function custom_query($query,$arr = NULL){ 20 | $q = $this->db->prepare($query); 21 | $q->execute($arr); 22 | return $q->fetchall(); 23 | } 24 | 25 | public function delete_all($table){ 26 | $q = $this->db->prepare("TRUNCATE TABLE $table"); 27 | return $q->execute(); 28 | } 29 | 30 | public function select_all($table){ 31 | $q = $this->db->prepare("SELECT * FROM $table"); 32 | $q->execute(); 33 | return $q->fetchall(); 34 | } 35 | 36 | public function select($what,$table, $specifier = NULL,$val = NULL, $type = NULL){ 37 | if(!$type){ 38 | $q = $this->db->prepare("SELECT $what FROM $table WHERE $specifier = :s"); 39 | $q->execute(array("s"=>$val)); 40 | return $q->fetchall(); 41 | }else{ 42 | $q = $this->db->prepare("SELECT $what FROM $table"); 43 | $q->execute(array("s"=>$val)); 44 | return $q->fetchall(); 45 | } 46 | 47 | } 48 | 49 | public function insert_query($where, $col){ 50 | $vals = NULL; 51 | $column = NULL; 52 | foreach ($col as $key => $val){ 53 | if($column){ 54 | $column .= " , `".$key."`"; 55 | }else{ 56 | $column .= "`".$key."`"; 57 | } 58 | 59 | if($vals){ 60 | $vals .= ",:".$key; 61 | }else{ 62 | $vals .= ":".$key; 63 | } 64 | } 65 | $q = $this->db->prepare("INSERT INTO $where ($column) VALUES ($vals) "); 66 | return $q->execute($col); 67 | } 68 | 69 | public function update($where,$col,$specifier,$spec){ //where = table, col = column, spesifier = spesify column i.e where xx, spec = value i.e where = spec 70 | $vals = NULL; 71 | $column = NULL; 72 | foreach ($col as $key => $val){ 73 | if($column){ 74 | $column .= " , `".$key."` = :".$key; 75 | }else{ 76 | $column .= "`".$key."` = :".$key; 77 | } 78 | 79 | } 80 | 81 | $q = $this->db->prepare("UPDATE $where SET $column WHERE $specifier = :spec "); 82 | $col['spec'] = $spec; 83 | return $q->execute($col); 84 | 85 | } 86 | public function insert_id(){ 87 | return $this->db->mysqli_insert_id(); 88 | } 89 | static function sanitize($val){ 90 | return htmlspecialchars($val); 91 | } 92 | 93 | public function generateRandomString() { 94 | $length = rand(4, 4); 95 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; 96 | $charactersLength = strlen($characters); 97 | $randomString = ''; 98 | for ($i = 0; $i < $length; $i++) { 99 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 100 | } 101 | return strtoupper($randomString); 102 | } 103 | public function generateRandomStringCUS($int) { 104 | $length = rand($int, $int); 105 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 106 | $charactersLength = strlen($characters); 107 | $randomString = ''; 108 | for ($i = 0; $i < $length; $i++) { 109 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 110 | } 111 | return strtoupper($randomString); 112 | } 113 | 114 | } -------------------------------------------------------------------------------- /CentosAuth APIs/index.php: -------------------------------------------------------------------------------- 1 | Load_Assemblys($_POST['version']); break; 21 | //case "set_up": $set_up->Validate_Version($_POST['version']); break; 22 | //case "user_pic": $auth->Get_User_Picture(); break; 23 | case "login": $auth->Login($username,$password,$hwid); break; 24 | case "register": $auth->Register($username,$password,$rep_pass,$email,$token,$hwid); break; 25 | //case "log_info": $logger->Log_History($_POST['clan'],$_POST['level'],$_POST['prestige'],$_POST['psn'],$_POST['ip'],$_POST['port'],$_POST['npid'],$_POST['xuid'],$_POST['game']); break; 26 | //case "changepw": $auth->Change_Password($username,$password,$hwid,$_POST['new_password']); break; 27 | //case "forgotpw": $auth->Forgot_Password($username,$hwid);break; 28 | //case "exception": $exception->Log_Exception($_POST['stack_trace'],$_POST['exception_info']);break; 29 | case "redeem": $auth->RedeemToken($username,$password,$token);break; 30 | //case "resolve": $auth->Resolve_PSN($username,$password);break; 31 | } 32 | } -------------------------------------------------------------------------------- /CentosAuth C# Classes/Auth.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.Specialized; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Forms; 9 | using static cent_auth.Handle; 10 | namespace cent_auth 11 | { 12 | class Auth 13 | { 14 | private static Dictionary Vars = new Dictionary(); 15 | private static string Var_KEY { get; set; } 16 | private static string Var_SALT { get; set; } 17 | public static bool Login(string Username,string Password) 18 | { 19 | try 20 | { 21 | Start_Session(); 22 | var values = new NameValueCollection(); 23 | values["type"] = "login"; 24 | values["username"] = Payload_ENCRYPT(Username); 25 | values["password"] = Payload_ENCRYPT(Password); 26 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 27 | values["session_id"] = ENCRYPT_KEY; 28 | values["session_salt"] = ENCRYPT_SALT; 29 | string meme = Payload(values, true); 30 | dynamic json = JsonConvert.DeserializeObject(meme); 31 | switch ((string)json.result) 32 | { 33 | case "success": 34 | UserInfo.ID = (int)json.id; 35 | UserInfo.Logged_In = bool.Parse((string)json.logged_in); 36 | UserInfo.Username = (string)json.username; 37 | UserInfo.Email = (string)json.email; 38 | UserInfo.HWID = (string)json.hwid; 39 | UserInfo.Expiry = (string)json.expiry; 40 | UserInfo.Rank = (int)json.rank; 41 | UserInfo.IP = (string)json.ip; 42 | Vars = JsonConvert.DeserializeObject>(json.vars.ToString()); 43 | Var_KEY = (string)json.session_id; 44 | Var_SALT = (string)json.session_salt; 45 | MessageBox.Show(string.Format("Welcome {0}, Login Success!", UserInfo.Username), "Login Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 46 | return true; 47 | case "invalid_details": 48 | MessageBox.Show("Incorrect username/password", "Incorrect details", MessageBoxButtons.OK, MessageBoxIcon.Error); 49 | return false; 50 | case "invalid_hwid": 51 | MessageBox.Show("Incorrect HWID \n", "Incorrect HWID", MessageBoxButtons.OK, MessageBoxIcon.Error); 52 | return false; 53 | case "hwid_updated": 54 | MessageBox.Show("Your computer HWID has been updated\nYour account is now locked to this computer", "Computer HWID has been updated", MessageBoxButtons.OK, MessageBoxIcon.Information); 55 | return false; 56 | case "time_expired": 57 | MessageBox.Show("Time EXPIRED! \n It appears your time is expired", "Time EXPIRED!", MessageBoxButtons.OK, MessageBoxIcon.Error); 58 | return false; 59 | case "net_error": 60 | MessageBox.Show("It appears an Internet/Server error has occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 61 | return false; 62 | default: 63 | MessageBox.Show("An unknown error has occured", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 64 | return false; 65 | } 66 | } 67 | catch 68 | { 69 | return false; 70 | } 71 | } 72 | public static bool Register(string Username,string Email, string Password, string Repeat_Password,string Token) 73 | { 74 | try 75 | { 76 | if (Password == Repeat_Password) 77 | { 78 | Start_Session(); 79 | var values = new NameValueCollection(); 80 | values["type"] = "register"; 81 | values["username"] = Payload_ENCRYPT(Username); 82 | values["password"] = Payload_ENCRYPT(Password); 83 | values["rep_pass"] = Payload_ENCRYPT(Repeat_Password); 84 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 85 | values["email"] = Payload_ENCRYPT(Email); 86 | values["token"] = Payload_ENCRYPT(Token); 87 | values["session_id"] = ENCRYPT_KEY; 88 | values["session_salt"] = ENCRYPT_SALT; 89 | string meme = Payload(values, true); 90 | dynamic json = JsonConvert.DeserializeObject(meme); 91 | switch ((string)json.result) 92 | { 93 | case "success": 94 | MessageBox.Show(string.Format("Welcome {0}, Register Success!", (string)json.username), "Register Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 95 | return false; 96 | case "invalid token": 97 | MessageBox.Show("Invalid Token, please check your entries and try again", "Invalid Token", MessageBoxButtons.OK, MessageBoxIcon.Error); 98 | return false; 99 | case "invalid passwords": 100 | MessageBox.Show("Passwords do not match \n Please check your passwords match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 101 | return false; 102 | case "email used": 103 | MessageBox.Show("It appears this email has already been used", "Email Already Used", MessageBoxButtons.OK, MessageBoxIcon.Error); 104 | return false; 105 | case "invalid username": 106 | MessageBox.Show("It appears this username is already taken", "Username Taken", MessageBoxButtons.OK, MessageBoxIcon.Error); 107 | return false; 108 | case "net_error": 109 | MessageBox.Show("It appears an Internet/Server error has occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 110 | return false; 111 | default: 112 | MessageBox.Show("An unknown error has occurred!", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 113 | return false; 114 | } 115 | } 116 | else 117 | { 118 | MessageBox.Show("Passwords do not match \n Please check your passwords match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 119 | return false; 120 | } 121 | } 122 | catch 123 | { 124 | return false; 125 | } 126 | } 127 | public static bool Redeem_Token(string Username, string Password, string Token) 128 | { 129 | try 130 | { 131 | 132 | Start_Session(); 133 | var values = new NameValueCollection(); 134 | values["type"] = "redeem"; 135 | values["username"] = Payload_ENCRYPT(Username); 136 | values["password"] = Payload_ENCRYPT(Password); 137 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 138 | values["token"] = Payload_ENCRYPT(Token); 139 | values["session_id"] = ENCRYPT_KEY; 140 | values["session_salt"] = ENCRYPT_SALT; 141 | string meme = Payload(values, true); 142 | dynamic json = JsonConvert.DeserializeObject(meme); 143 | switch ((string)json.result) 144 | { 145 | case "success": 146 | MessageBox.Show(string.Format("Welcome {0} Token Redeem Success", (string)json.username), "Token Redeem Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 147 | return false; 148 | case "invalid token": 149 | MessageBox.Show("Invalid Token Please Check Your Entries And Try Again", "Invalid Token", MessageBoxButtons.OK, MessageBoxIcon.Error); 150 | return false; 151 | case "invalid details": 152 | MessageBox.Show("Passwords Do Not Match \n Please Check Your Passwords Match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 153 | return false; 154 | case "net_error": 155 | MessageBox.Show("It Appears an Internet/Server Error Has Occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 156 | return false; 157 | default: 158 | MessageBox.Show("An Unknown Error Has Occured And Info Forwarded Onto Our Dev", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 159 | return false; 160 | } 161 | } 162 | catch 163 | { 164 | return false; 165 | } 166 | } 167 | public static object Var(string Name) 168 | { 169 | try 170 | { 171 | ENCRYPT_KEY = Var_KEY; 172 | ENCRYPT_SALT = Var_SALT; 173 | return Payload_DECRYPT(Vars[Name].ToString()); 174 | } 175 | catch 176 | { 177 | return "unknown variable"; 178 | } 179 | } 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /CentosAuth C# Classes/Handle.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.Specialized; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Management; 8 | using System.Net; 9 | using System.Security.Cryptography; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace cent_auth 14 | { 15 | class Handle 16 | { 17 | public static string URL = "https://yoursite.com"; 18 | public static string ENCRYPT_KEY { get; set; } 19 | public static string ENCRYPT_SALT { get; set; } 20 | public static string Payload_DECRYPT(string value) 21 | { 22 | string message = value; 23 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 24 | SHA256 mySHA256 = SHA256Managed.Create(); 25 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 26 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 27 | string decrypted = String_Encryption.DecryptString(message, key, iv); 28 | return decrypted; 29 | } 30 | public static string Payload_ENCRYPT(string value) 31 | { 32 | string message = value; 33 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 34 | SHA256 mySHA256 = SHA256Managed.Create(); 35 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 36 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 37 | string decrypted = String_Encryption.EncryptString(message, key, iv); 38 | return decrypted; 39 | } 40 | private static string Session_ID(int length) 41 | { 42 | Random random = new Random(); 43 | const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; 44 | return new string(Enumerable.Repeat(chars, length) 45 | .Select(s => s[random.Next(s.Length)]).ToArray()); 46 | } 47 | public static void Start_Session() 48 | { 49 | ENCRYPT_KEY = Convert.ToBase64String(Encoding.Default.GetBytes(Session_ID(32))); 50 | ENCRYPT_SALT = Convert.ToBase64String(Encoding.Default.GetBytes(Session_ID(16))); 51 | } 52 | public static string Payload(NameValueCollection Values, bool encrypted = false) 53 | { 54 | try 55 | { 56 | switch (encrypted) 57 | { 58 | case false: 59 | return Encoding.Default.GetString(new WebClient().UploadValues(URL, Values)); 60 | case true: 61 | SHA256 mySHA256 = SHA256Managed.Create(); 62 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)))); 63 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 64 | string decrypted = String_Encryption.DecryptString(Encoding.Default.GetString(new WebClient().UploadValues(URL, Values)), key, iv); 65 | return decrypted; 66 | default: 67 | Dictionary ERROR = new Dictionary(); 68 | ERROR.Add("result", "net_error"); 69 | return JsonConvert.SerializeObject(ERROR); 70 | 71 | } 72 | } 73 | catch (WebException E) 74 | { 75 | Dictionary ERROR = new Dictionary(); 76 | HttpWebResponse response = (HttpWebResponse)E.Response; 77 | switch (response.StatusCode) 78 | { 79 | case HttpStatusCode.NotFound: 80 | ERROR.Add("result", "net_error"); 81 | break; 82 | case HttpStatusCode.RequestEntityTooLarge: 83 | ERROR.Add("result", "net_error"); 84 | break; 85 | case HttpStatusCode.ServiceUnavailable: 86 | ERROR.Add("result", "net_error"); 87 | break; 88 | case HttpStatusCode.Forbidden: 89 | ERROR.Add("result", "net_error"); 90 | break; 91 | } 92 | ERROR.Add("result", "net_error"); 93 | return JsonConvert.SerializeObject(ERROR); 94 | } 95 | } 96 | public static string Payload(string URL, NameValueCollection Values, bool encrypted = false) 97 | { 98 | try 99 | { 100 | switch (encrypted) 101 | { 102 | case false: 103 | return Encoding.Default.GetString(new WebClient { Proxy = null }.UploadValues(URL, Values)); 104 | case true: 105 | string message = Encoding.Default.GetString(new WebClient { Proxy = null }.UploadValues(URL, Values)); 106 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 107 | SHA256 mySHA256 = SHA256Managed.Create(); 108 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 109 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 110 | string decrypted = String_Encryption.DecryptString(message, key, iv); 111 | return decrypted; 112 | default: 113 | Dictionary ERROR = new Dictionary(); 114 | ERROR.Add("result", "net_error"); 115 | return JsonConvert.SerializeObject(ERROR); 116 | 117 | } 118 | } 119 | catch (WebException E) 120 | { 121 | Dictionary ERROR = new Dictionary(); 122 | HttpWebResponse response = (HttpWebResponse)E.Response; 123 | switch (response.StatusCode) 124 | { 125 | case HttpStatusCode.NotFound: 126 | ERROR.Add("result", "net_error"); 127 | break; 128 | case HttpStatusCode.RequestEntityTooLarge: 129 | ERROR.Add("result", "net_error"); 130 | break; 131 | case HttpStatusCode.ServiceUnavailable: 132 | ERROR.Add("result", "net_error"); 133 | break; 134 | case HttpStatusCode.Forbidden: 135 | ERROR.Add("result", "net_error"); 136 | break; 137 | } 138 | Console.WriteLine(E.ToString()); 139 | ERROR.Add("result", "net_error"); 140 | return JsonConvert.SerializeObject(ERROR); 141 | } 142 | } 143 | class String_Encryption 144 | { 145 | public static string EncryptString(string plainText, byte[] key, byte[] iv) 146 | { 147 | Aes encryptor = Aes.Create(); 148 | encryptor.Mode = CipherMode.CBC; 149 | encryptor.Key = key; 150 | encryptor.IV = iv; 151 | MemoryStream memoryStream = new MemoryStream(); 152 | ICryptoTransform aesEncryptor = encryptor.CreateEncryptor(); 153 | CryptoStream cryptoStream = new CryptoStream(memoryStream, aesEncryptor, CryptoStreamMode.Write); 154 | byte[] plainBytes = Encoding.ASCII.GetBytes(plainText); 155 | cryptoStream.Write(plainBytes, 0, plainBytes.Length); 156 | cryptoStream.FlushFinalBlock(); 157 | byte[] cipherBytes = memoryStream.ToArray(); 158 | memoryStream.Close(); 159 | cryptoStream.Close(); 160 | string cipherText = Convert.ToBase64String(cipherBytes, 0, cipherBytes.Length); 161 | return cipherText; 162 | } 163 | 164 | public static string DecryptString(string cipherText, byte[] key, byte[] iv) 165 | { 166 | Aes encryptor = Aes.Create(); 167 | encryptor.Mode = CipherMode.CBC; 168 | encryptor.Key = key; 169 | encryptor.IV = iv; 170 | MemoryStream memoryStream = new MemoryStream(); 171 | ICryptoTransform aesDecryptor = encryptor.CreateDecryptor(); 172 | CryptoStream cryptoStream = new CryptoStream(memoryStream, aesDecryptor, CryptoStreamMode.Write); 173 | string plainText = String.Empty; 174 | try 175 | { 176 | byte[] cipherBytes = Convert.FromBase64String(cipherText); 177 | cryptoStream.Write(cipherBytes, 0, cipherBytes.Length); 178 | cryptoStream.FlushFinalBlock(); 179 | byte[] plainBytes = memoryStream.ToArray(); 180 | plainText = Encoding.ASCII.GetString(plainBytes, 0, plainBytes.Length); 181 | } 182 | finally 183 | { 184 | memoryStream.Close(); 185 | cryptoStream.Close(); 186 | } 187 | return plainText; 188 | } 189 | } 190 | } 191 | public class HWID 192 | { 193 | public static string getUniqueID() 194 | { 195 | string drive = "C"; 196 | if (drive == string.Empty) 197 | { 198 | foreach (DriveInfo compDrive in DriveInfo.GetDrives()) 199 | { 200 | if (compDrive.IsReady) 201 | { 202 | drive = compDrive.RootDirectory.ToString(); 203 | break; 204 | } 205 | } 206 | } 207 | if (drive.EndsWith(":\\")) 208 | { 209 | drive = drive.Substring(0, drive.Length - 2); 210 | } 211 | string volumeSerial = getVolumeSerial(drive); 212 | string cpuID = getCPUID(); 213 | return cpuID.Substring(13) + cpuID.Substring(1, 4) + volumeSerial + cpuID.Substring(4, 4); 214 | } 215 | static string getVolumeSerial(string drive) 216 | { 217 | ManagementObject disk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + drive + @":"""); 218 | disk.Get(); 219 | string volumeSerial = disk["VolumeSerialNumber"].ToString(); 220 | disk.Dispose(); 221 | return volumeSerial; 222 | } 223 | public static string PCUSERNAME() 224 | { 225 | return Environment.UserName; 226 | } 227 | public static string PCNAME() 228 | { 229 | return Environment.MachineName; 230 | } 231 | static string getCPUID() 232 | { 233 | string cpuInfo = ""; 234 | ManagementClass managClass = new ManagementClass("win32_processor"); 235 | ManagementObjectCollection managCollec = managClass.GetInstances(); 236 | foreach (ManagementObject managObj in managCollec) 237 | { 238 | if (cpuInfo == "") 239 | { 240 | cpuInfo = managObj.Properties["processorID"].Value.ToString(); 241 | break; 242 | } 243 | } 244 | return cpuInfo; 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /CentosAuth C# Classes/UserInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace cent_auth 8 | { 9 | class UserInfo 10 | { 11 | public static int ID { get; set; } 12 | public static string Username { get; set; } 13 | public static string Email { get; set; } 14 | public static string HWID { get; set; } 15 | public static string Expiry { get; set; } 16 | public static int Rank { get; set; } 17 | public static string IP { get; set; } 18 | public static bool Expired { get; set; } 19 | public static bool Logged_In { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /CentosAuth Panel/Auth/class.php: -------------------------------------------------------------------------------- 1 | connect(); 7 | } 8 | public function Encrypt($string) 9 | { 10 | $plaintext = $string; 11 | $password = base64_decode($_POST['session_id']); 12 | $method = 'aes-256-cbc'; 13 | $password = substr(hash('sha256', $password, true), 0, 32); 14 | $iv = base64_decode($_POST['session_salt']); 15 | $encrypted = base64_encode(openssl_encrypt($plaintext, $method, $password, OPENSSL_RAW_DATA, $iv)); 16 | return $encrypted; 17 | } 18 | public function Decrypt($string) 19 | { 20 | $plaintext = $string; 21 | $password = base64_decode($_POST['session_id']); 22 | $method = 'aes-256-cbc'; 23 | $password = substr(hash('sha256', $password, true), 0, 32); 24 | $iv = base64_decode($_POST['session_salt']); 25 | $decrypted = openssl_decrypt(base64_decode($plaintext), $method, $password, OPENSSL_RAW_DATA, $iv); 26 | return $decrypted; 27 | } 28 | public function generatestring($length) 29 | { 30 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxwz'; 31 | $charactersLength = strlen($characters); 32 | $randomString = ''; 33 | for ($i = 0; $i < $length; $i++) { 34 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 35 | } 36 | return strtoupper($randomString); 37 | } 38 | public function Login($username,$password,$HWID) 39 | { 40 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 41 | $query->execute(array("license"=>$this->Decrypt($username))); 42 | $result = $query->fetch(PDO::FETCH_ASSOC); 43 | if($result) 44 | { 45 | if(password_verify($this->Decrypt($password),$result['password'])) 46 | { 47 | $date = new DateTime($result['expiry_date']); 48 | $today = new DateTime(); 49 | if($result['hwid'] == $this->Decrypt($HWID)) 50 | { 51 | if($date > $today) 52 | { 53 | $encrypted_var = array(); 54 | $offset = $this->db->prepare("SELECT * FROM vars"); 55 | $offset->execute(); 56 | $offsets = $offset->fetchAll(); 57 | foreach ($offsets as $row) 58 | { 59 | $encrypted_var[$row["name"]] = $this->Encrypt($row["value"]); 60 | } 61 | $ip = (isset($_SERVER["HTTP_CF_CONNECTING_IP"])?$_SERVER["HTTP_CF_CONNECTING_IP"]:$_SERVER['REMOTE_ADDR']); 62 | die($this->Encrypt('{ 63 | "result":"success", 64 | "logged_in":"true", 65 | "id":"'.$result['id'].'", 66 | "username":"'.$result['username'].'", 67 | "password":"'.$this->Decrypt($password).'", 68 | "hwid":"'.$result['hwid'].'", 69 | "email":"'.$result['email'].'", 70 | "rank":"'.$result['rank'].'", 71 | "ip":"'.$ip.'", 72 | "expiry":"'.$result['expiry_date'].'", 73 | "vars":'.json_encode($encrypted_var, JSON_FORCE_OBJECT).', 74 | "session_id":"'.$_POST['session_id'].'", 75 | "session_salt":"'.$_POST['session_salt'].'"}')); 76 | } 77 | else 78 | { 79 | die($this->Encrypt('{ 80 | "result":"time_expired", 81 | "session_id":"'.$_POST['session_id'].'", 82 | "session_salt":"'.$_POST['session_salt'].'"}')); 83 | } 84 | } 85 | else if($result['hwid'] == '') 86 | { 87 | if($date > $today) 88 | { 89 | $this->update("users", array("hwid"=>$this->Decrypt($hwid)), "username", $this->Decrypt($username)); 90 | die($this->Encrypt('{ 91 | "result":"hwid_updated", 92 | "session_id":"'.$_POST['session_id'].'", 93 | "session_salt":"'.$_POST['session_salt'].'"}')); 94 | } 95 | else 96 | { 97 | die($this->Encrypt('{ 98 | "result":"time_expired", 99 | "session_id":"'.$_POST['session_id'].'", 100 | "session_salt":"'.$_POST['session_salt'].'"}')); 101 | } 102 | } 103 | else 104 | { 105 | die($this->Encrypt('{ 106 | "result":"invalid_hwid", 107 | "session_id":"'.$_POST['session_id'].'", 108 | "session_salt":"'.$_POST['session_salt'].'"}')); 109 | } 110 | } 111 | else 112 | { 113 | die($this->Encrypt('{ 114 | "result":"invalid_details", 115 | "session_id":"'.$_POST['session_id'].'", 116 | "session_salt":"'.$_POST['session_salt'].'"}')); 117 | } 118 | } 119 | else 120 | { 121 | die($this->Encrypt('{ 122 | "result":"invalid_details", 123 | "session_id":"'.$_POST['session_id'].'", 124 | "session_salt":"'.$_POST['session_salt'].'"}')); 125 | } 126 | } 127 | public function Register($username,$password,$rep_pass,$email,$token,$hwid) 128 | { 129 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 130 | $query->execute(array("license"=>$this->Decrypt($username))); 131 | $result = $query->fetch(PDO::FETCH_ASSOC); 132 | if(!$result) 133 | { 134 | $email_check = $this->db->prepare("SELECT * FROM users WHERE email = :license"); 135 | $email_check->execute(array("license"=>$this->Decrypt($email))); 136 | $email_result = $email_check->fetch(PDO::FETCH_ASSOC); 137 | if(!$email_result) 138 | { 139 | if($this->Decrypt($password) == $this->Decrypt($rep_pass)) 140 | { 141 | $token_check = $this->db->prepare("SELECT * FROM tokens WHERE token = :license AND used != 1"); 142 | $token_check->execute(array("license"=>$this->Decrypt($token))); 143 | $token_result = $token_check->fetch(PDO::FETCH_ASSOC); 144 | if($token_result) 145 | { 146 | $today = new DateTime(); 147 | $newDate = $today->modify('+'.$token_result['days'].' days'); 148 | $rank = $token_result['rank']; 149 | $date2 = $newDate; 150 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 151 | $this->insert_query("users", array( 152 | "username"=>$this->Decrypt($username), 153 | "password"=>password_hash($this->Decrypt($password), PASSWORD_BCRYPT), 154 | "email"=>$this->Decrypt($email), 155 | "hwid"=>$this->Decrypt($hwid), 156 | "rank"=>$rank, 157 | "expiry_date"=>$TIME 158 | )); 159 | $this->update("tokens", array("used"=>1,"used_by"=>$this->Decrypt($username)), "id", $token_result['id']); 160 | die($this->Encrypt('{ 161 | "result":"success", 162 | "username":"'.$this->Decrypt($username).'", 163 | "session_id":"'.$_POST['session_id'].'", 164 | "session_salt":"'.$_POST['session_salt'].'"}')); 165 | } 166 | else 167 | { 168 | die($this->Encrypt('{ 169 | "result":"invalid token", 170 | "session_id":"'.$_POST['session_id'].'", 171 | "session_salt":"'.$_POST['session_salt'].'"}')); 172 | } 173 | } 174 | else 175 | { 176 | die($this->Encrypt('{ 177 | "result":"invalid passwords", 178 | "session_id":"'.$_POST['session_id'].'", 179 | "session_salt":"'.$_POST['session_salt'].'"}')); 180 | } 181 | } 182 | else 183 | { 184 | die($this->Encrypt('{ 185 | "result":"email used", 186 | "session_id":"'.$_POST['session_id'].'", 187 | "session_salt":"'.$_POST['session_salt'].'"}')); 188 | } 189 | } 190 | else 191 | { 192 | die($this->Encrypt('{ 193 | "result":"invalid username", 194 | "session_id":"'.$_POST['session_id'].'", 195 | "session_salt":"'.$_POST['session_salt'].'"}')); 196 | } 197 | } 198 | public function RedeemToken($username,$password,$token) 199 | { 200 | $query = $this->db->prepare("SELECT * FROM users WHERE username = :license"); 201 | $query->execute(array("license"=>$this->Decrypt($username))); 202 | $result = $query->fetch(PDO::FETCH_ASSOC); 203 | if($result) 204 | { 205 | if(password_verify($this->Decrypt($password),$result['password'])) 206 | { 207 | $token_check = $this->db->prepare("SELECT * FROM tokens WHERE token = :license AND used != 1"); 208 | $token_check->execute(array("license"=>$this->Decrypt($token))); 209 | $token_result = $token_check->fetch(PDO::FETCH_ASSOC); 210 | if($token_result) 211 | { 212 | $date = new DateTime($result['expiry_date']); 213 | $today = new DateTime(); 214 | if($date > $today) 215 | { 216 | $newDate = $date->modify('+'.$token_result['days'].' days'); 217 | $date2 = $newDate; 218 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 219 | $this->update("users", array("rank"=>$token_result['rank'],"expiry_date"=>$TIME), "username", $result['username']); 220 | $this->update("tokens", array("used"=>1,"used_by"=>$this->Decrypt($username)), "token", $token_result['token']); 221 | die($this->Encrypt('{ 222 | "result":"success", 223 | "session_id":"'.$_POST['session_id'].'", 224 | "session_salt":"'.$_POST['session_salt'].'"}')); 225 | } 226 | else 227 | { 228 | $newDate = $today->modify('+'.$token_result['days'].' days'); 229 | $date2 = $newDate; 230 | $TIME = ''.$date2->format('Y-m-d H:i:s').''; 231 | $this->update("users", array("rank"=>$token_result['rank'],"expiry_date"=>$TIME), "username", $result['username']); 232 | $this->update("tokens", array("used"=>1,"used_by"=>$this->Decrypt($username)), "token", $token_result['token']); 233 | die($this->Encrypt('{ 234 | "result":"success", 235 | "session_id":"'.$_POST['session_id'].'", 236 | "session_salt":"'.$_POST['session_salt'].'"}')); 237 | } 238 | } 239 | else 240 | { 241 | die($this->Encrypt('{ 242 | "result":"invalid token", 243 | "session_id":"'.$_POST['session_id'].'", 244 | "session_salt":"'.$_POST['session_salt'].'"}')); 245 | } 246 | } 247 | else 248 | { 249 | die($this->Encrypt('{ 250 | "result":"invalid details", 251 | "session_id":"'.$_POST['session_id'].'", 252 | "session_salt":"'.$_POST['session_salt'].'"}')); 253 | } 254 | } 255 | else 256 | { 257 | die($this->Encrypt('{ 258 | "result":"invalid token", 259 | "session_id":"'.$_POST['session_id'].'", 260 | "session_salt":"'.$_POST['session_salt'].'"}')); 261 | } 262 | } 263 | 264 | } -------------------------------------------------------------------------------- /CentosAuth Panel/Auth/database.php: -------------------------------------------------------------------------------- 1 | db = new PDO("mysql:host=" . $this->db_host . ";dbname=" . $this->db_name, $this->db_user, $this->db_password); 13 | 14 | if(!$this->db){ 15 | die("Failed to connect"); 16 | } 17 | } 18 | 19 | public function custom_query($query,$arr = NULL){ 20 | $q = $this->db->prepare($query); 21 | $q->execute($arr); 22 | return $q->fetchall(); 23 | } 24 | 25 | public function delete_all($table){ 26 | $q = $this->db->prepare("TRUNCATE TABLE $table"); 27 | return $q->execute(); 28 | } 29 | 30 | public function select_all($table){ 31 | $q = $this->db->prepare("SELECT * FROM $table"); 32 | $q->execute(); 33 | return $q->fetchall(); 34 | } 35 | 36 | public function select($what,$table, $specifier = NULL,$val = NULL, $type = NULL){ 37 | if(!$type){ 38 | $q = $this->db->prepare("SELECT $what FROM $table WHERE $specifier = :s"); 39 | $q->execute(array("s"=>$val)); 40 | return $q->fetchall(); 41 | }else{ 42 | $q = $this->db->prepare("SELECT $what FROM $table"); 43 | $q->execute(array("s"=>$val)); 44 | return $q->fetchall(); 45 | } 46 | 47 | } 48 | 49 | public function insert_query($where, $col){ 50 | $vals = NULL; 51 | $column = NULL; 52 | foreach ($col as $key => $val){ 53 | if($column){ 54 | $column .= " , `".$key."`"; 55 | }else{ 56 | $column .= "`".$key."`"; 57 | } 58 | 59 | if($vals){ 60 | $vals .= ",:".$key; 61 | }else{ 62 | $vals .= ":".$key; 63 | } 64 | } 65 | $q = $this->db->prepare("INSERT INTO $where ($column) VALUES ($vals) "); 66 | return $q->execute($col); 67 | } 68 | 69 | public function update($where,$col,$specifier,$spec){ //where = table, col = column, spesifier = spesify column i.e where xx, spec = value i.e where = spec 70 | $vals = NULL; 71 | $column = NULL; 72 | foreach ($col as $key => $val){ 73 | if($column){ 74 | $column .= " , `".$key."` = :".$key; 75 | }else{ 76 | $column .= "`".$key."` = :".$key; 77 | } 78 | 79 | } 80 | 81 | $q = $this->db->prepare("UPDATE $where SET $column WHERE $specifier = :spec "); 82 | $col['spec'] = $spec; 83 | return $q->execute($col); 84 | 85 | } 86 | public function insert_id(){ 87 | return $this->db->mysqli_insert_id(); 88 | } 89 | static function sanitize($val){ 90 | return htmlspecialchars($val); 91 | } 92 | 93 | public function generateRandomString() { 94 | $length = rand(4, 4); 95 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'; 96 | $charactersLength = strlen($characters); 97 | $randomString = ''; 98 | for ($i = 0; $i < $length; $i++) { 99 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 100 | } 101 | return strtoupper($randomString); 102 | } 103 | public function generateRandomStringCUS($int) { 104 | $length = rand($int, $int); 105 | $characters = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 106 | $charactersLength = strlen($characters); 107 | $randomString = ''; 108 | for ($i = 0; $i < $length; $i++) { 109 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 110 | } 111 | return strtoupper($randomString); 112 | } 113 | 114 | } -------------------------------------------------------------------------------- /CentosAuth Panel/Auth/index.php: -------------------------------------------------------------------------------- 1 | Load_Assemblys($_POST['version']); break; 21 | //case "set_up": $set_up->Validate_Version($_POST['version']); break; 22 | //case "user_pic": $auth->Get_User_Picture(); break; 23 | case "login": $auth->Login($username,$password,$hwid); break; 24 | case "register": $auth->Register($username,$password,$rep_pass,$email,$token,$hwid); break; 25 | //case "log_info": $logger->Log_History($_POST['clan'],$_POST['level'],$_POST['prestige'],$_POST['psn'],$_POST['ip'],$_POST['port'],$_POST['npid'],$_POST['xuid'],$_POST['game']); break; 26 | //case "changepw": $auth->Change_Password($username,$password,$hwid,$_POST['new_password']); break; 27 | //case "forgotpw": $auth->Forgot_Password($username,$hwid);break; 28 | //case "exception": $exception->Log_Exception($_POST['stack_trace'],$_POST['exception_info']);break; 29 | case "redeem": $auth->RedeemToken($username,$password,$token);break; 30 | //case "resolve": $auth->Resolve_PSN($username,$password);break; 31 | } 32 | } -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/centos.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/CentosAuth Panel/Panel/centos.gif -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/epic.css: -------------------------------------------------------------------------------- 1 | /* W3.CSS 4.12 November 2018 by Jan Egil and Borge Refsnes */ 2 | html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} 3 | /* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ 4 | html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} 5 | article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block} 6 | audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} 7 | audio:not([controls]){display:none;height:0}[hidden],template{display:none} 8 | a{background-color:transparent;-webkit-text-decoration-skip:objects} 9 | a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} 10 | dfn{font-style:italic}mark{background:#ff0;color:#000} 11 | small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} 12 | sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none}svg:not(:root){overflow:hidden} 13 | code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} 14 | button,input,select,textarea{font:inherit;margin:0}optgroup{font-weight:bold} 15 | button,input{overflow:visible}button,select{text-transform:none} 16 | button,html [type=button],[type=reset],[type=submit]{-webkit-appearance:button} 17 | button::-moz-focus-inner, [type=button]::-moz-focus-inner, [type=reset]::-moz-focus-inner, [type=submit]::-moz-focus-inner{border-style:none;padding:0} 18 | button:-moz-focusring, [type=button]:-moz-focusring, [type=reset]:-moz-focusring, [type=submit]:-moz-focusring{outline:1px dotted ButtonText} 19 | fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} 20 | legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} 21 | [type=checkbox],[type=radio]{padding:0} 22 | [type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} 23 | [type=search]{-webkit-appearance:textfield;outline-offset:-2px} 24 | [type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none} 25 | ::-webkit-input-placeholder{color:inherit;opacity:0.54} 26 | ::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} 27 | /* End extract */ 28 | html,body{font-family:Verdana,sans-serif;font-size:15px;line-height:1.5}html{overflow-x:hidden} 29 | h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.w3-serif{font-family:serif} 30 | h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin:10px 0}.w3-wide{letter-spacing:4px} 31 | hr{border:0;border-top:1px solid #eee;margin:20px 0} 32 | .w3-image{max-width:100%;height:auto}img{vertical-align:middle}a{color:inherit} 33 | .w3-table,.w3-table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.w3-table-all{border:1px solid #232323} 34 | .w3-bordered tr,.w3-table-all tr{border-bottom:1px solid #232323}.w3-striped tbody tr:nth-child(even){background-color:#232323} 35 | .w3-table-all tr:nth-child(odd){background-color:#232323}.w3-table-all tr:nth-child(even){background-color:#232323} 36 | .w3-hoverable tbody tr:hover,.w3-ul.w3-hoverable li:hover{background-color:#ccc}.w3-centered tr th,.w3-centered tr td{text-align:center} 37 | .w3-table td,.w3-table th,.w3-table-all td,.w3-table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} 38 | .w3-table th:first-child,.w3-table td:first-child,.w3-table-all th:first-child,.w3-table-all td:first-child{padding-left:16px} 39 | .w3-btn,.w3-button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} 40 | .w3-btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)} 41 | .w3-btn,.w3-button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} 42 | .w3-disabled,.w3-btn:disabled,.w3-button:disabled{cursor:not-allowed;opacity:0.3}.w3-disabled *,:disabled *{pointer-events:none} 43 | .w3-btn.w3-disabled:hover,.w3-btn:disabled:hover{box-shadow:none} 44 | .w3-badge,.w3-tag{background-color:#000;color:#232323;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.w3-badge{border-radius:50%} 45 | .w3-ul{list-style-type:none;padding:0;margin:0}.w3-ul li{padding:8px 16px;border-bottom:1px solid #232323}.w3-ul li:last-child{border-bottom:none} 46 | .w3-tooltip,.w3-display-container{position:relative}.w3-tooltip .w3-text{display:none}.w3-tooltip:hover .w3-text{display:inline-block} 47 | .w3-ripple:active{opacity:0.5}.w3-ripple{transition:opacity 0s} 48 | .w3-input{padding:8px;display:block;border:none;border-bottom:1px solid #ccc;width:100%} 49 | .w3-select{padding:9px 0;width:100%;border:none;border-bottom:1px solid #ccc} 50 | .w3-dropdown-click,.w3-dropdown-hover{position:relative;display:inline-block;cursor:pointer} 51 | .w3-dropdown-hover:hover .w3-dropdown-content{display:block} 52 | .w3-dropdown-hover:first-child,.w3-dropdown-click:hover{background-color:#ccc;color:#000} 53 | .w3-dropdown-hover:hover > .w3-button:first-child,.w3-dropdown-click:hover > .w3-button:first-child{background-color:#ccc;color:#000} 54 | .w3-dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} 55 | .w3-check,.w3-radio{width:24px;height:24px;position:relative;top:6px} 56 | .w3-sidebar{height:100%;width:200px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} 57 | .w3-bar-block .w3-dropdown-hover,.w3-bar-block .w3-dropdown-click{width:100%} 58 | .w3-bar-block .w3-dropdown-hover .w3-dropdown-content,.w3-bar-block .w3-dropdown-click .w3-dropdown-content{min-width:100%} 59 | .w3-bar-block .w3-dropdown-hover .w3-button,.w3-bar-block .w3-dropdown-click .w3-button{width:100%;text-align:left;padding:8px 16px} 60 | .w3-main,#main{transition:margin-left .4s} 61 | .w3-modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} 62 | .w3-modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} 63 | .w3-bar{width:100%;overflow:hidden}.w3-center .w3-bar{display:inline-block;width:auto} 64 | .w3-bar .w3-bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} 65 | .w3-bar .w3-dropdown-hover,.w3-bar .w3-dropdown-click{position:static;float:left} 66 | .w3-bar .w3-button{white-space:normal} 67 | .w3-bar-block .w3-bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} 68 | .w3-bar-block.w3-center .w3-bar-item{text-align:center}.w3-block{display:block;width:100%} 69 | .w3-responsive{display:block;overflow-x:auto} 70 | .w3-container:after,.w3-container:before,.w3-panel:after,.w3-panel:before,.w3-row:after,.w3-row:before,.w3-row-padding:after,.w3-row-padding:before, 71 | .w3-cell-row:before,.w3-cell-row:after,.w3-clear:after,.w3-clear:before,.w3-bar:before,.w3-bar:after{content:"";display:table;clear:both} 72 | .w3-col,.w3-half,.w3-third,.w3-twothird,.w3-threequarter,.w3-quarter{float:left;width:100%} 73 | .w3-col.s1{width:8.33333%}.w3-col.s2{width:16.66666%}.w3-col.s3{width:24.99999%}.w3-col.s4{width:33.33333%} 74 | .w3-col.s5{width:41.66666%}.w3-col.s6{width:49.99999%}.w3-col.s7{width:58.33333%}.w3-col.s8{width:66.66666%} 75 | .w3-col.s9{width:74.99999%}.w3-col.s10{width:83.33333%}.w3-col.s11{width:91.66666%}.w3-col.s12{width:99.99999%} 76 | @media (min-width:601px){.w3-col.m1{width:8.33333%}.w3-col.m2{width:16.66666%}.w3-col.m3,.w3-quarter{width:24.99999%}.w3-col.m4,.w3-third{width:33.33333%} 77 | .w3-col.m5{width:41.66666%}.w3-col.m6,.w3-half{width:49.99999%}.w3-col.m7{width:58.33333%}.w3-col.m8,.w3-twothird{width:66.66666%} 78 | .w3-col.m9,.w3-threequarter{width:74.99999%}.w3-col.m10{width:83.33333%}.w3-col.m11{width:91.66666%}.w3-col.m12{width:99.99999%}} 79 | @media (min-width:993px){.w3-col.l1{width:8.33333%}.w3-col.l2{width:16.66666%}.w3-col.l3{width:24.99999%}.w3-col.l4{width:33.33333%} 80 | .w3-col.l5{width:41.66666%}.w3-col.l6{width:49.99999%}.w3-col.l7{width:58.33333%}.w3-col.l8{width:66.66666%} 81 | .w3-col.l9{width:74.99999%}.w3-col.l10{width:83.33333%}.w3-col.l11{width:91.66666%}.w3-col.l12{width:99.99999%}} 82 | .w3-rest{overflow:hidden}.w3-stretch{margin-left:-16px;margin-right:-16px} 83 | .w3-content,.w3-auto{margin-left:auto;margin-right:auto}.w3-content{max-width:980px}.w3-auto{max-width:1140px} 84 | .w3-cell-row{display:table;width:100%}.w3-cell{display:table-cell} 85 | .w3-cell-top{vertical-align:top}.w3-cell-middle{vertical-align:middle}.w3-cell-bottom{vertical-align:bottom} 86 | .w3-hide{display:none!important}.w3-show-block,.w3-show{display:block!important}.w3-show-inline-block{display:inline-block!important} 87 | @media (max-width:1205px){.w3-auto{max-width:95%}} 88 | @media (max-width:600px){.w3-modal-content{margin:0 10px;width:auto!important}.w3-modal{padding-top:30px} 89 | .w3-dropdown-hover.w3-mobile .w3-dropdown-content,.w3-dropdown-click.w3-mobile .w3-dropdown-content{position:relative} 90 | .w3-hide-small{display:none!important}.w3-mobile{display:block;width:100%!important}.w3-bar-item.w3-mobile,.w3-dropdown-hover.w3-mobile,.w3-dropdown-click.w3-mobile{text-align:center} 91 | .w3-dropdown-hover.w3-mobile,.w3-dropdown-hover.w3-mobile .w3-btn,.w3-dropdown-hover.w3-mobile .w3-button,.w3-dropdown-click.w3-mobile,.w3-dropdown-click.w3-mobile .w3-btn,.w3-dropdown-click.w3-mobile .w3-button{width:100%}} 92 | @media (max-width:768px){.w3-modal-content{width:500px}.w3-modal{padding-top:50px}} 93 | @media (min-width:993px){.w3-modal-content{width:900px}.w3-hide-large{display:none!important}.w3-sidebar.w3-collapse{display:block!important}} 94 | @media (max-width:992px) and (min-width:601px){.w3-hide-medium{display:none!important}} 95 | @media (max-width:992px){.w3-sidebar.w3-collapse{display:none}.w3-main{margin-left:0!important;margin-right:0!important}.w3-auto{max-width:100%}} 96 | .w3-top,.w3-bottom{position:fixed;width:100%;z-index:1}.w3-top{top:0}.w3-bottom{bottom:0} 97 | .w3-overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} 98 | .w3-display-topleft{position:absolute;left:0;top:0}.w3-display-topright{position:absolute;right:0;top:0} 99 | .w3-display-bottomleft{position:absolute;left:0;bottom:0}.w3-display-bottomright{position:absolute;right:0;bottom:0} 100 | .w3-display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} 101 | .w3-display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} 102 | .w3-display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} 103 | .w3-display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 104 | .w3-display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} 105 | .w3-display-container:hover .w3-display-hover{display:block}.w3-display-container:hover span.w3-display-hover{display:inline-block}.w3-display-hover{display:none} 106 | .w3-display-position{position:absolute} 107 | .w3-circle{border-radius:50%} 108 | .w3-round-small{border-radius:2px}.w3-round,.w3-round-medium{border-radius:4px}.w3-round-large{border-radius:8px}.w3-round-xlarge{border-radius:16px}.w3-round-xxlarge{border-radius:32px} 109 | .w3-row-padding,.w3-row-padding>.w3-half,.w3-row-padding>.w3-third,.w3-row-padding>.w3-twothird,.w3-row-padding>.w3-threequarter,.w3-row-padding>.w3-quarter,.w3-row-padding>.w3-col{padding:0 8px} 110 | .w3-container,.w3-panel{padding:0.01em 16px}.w3-panel{margin-top:16px;margin-bottom:16px} 111 | .w3-code,.w3-codespan{font-family:Consolas,"courier new";font-size:16px} 112 | .w3-code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} 113 | .w3-codespan{color:crimson;background-color:#232323;padding-left:4px;padding-right:4px;font-size:110%} 114 | .w3-card,.w3-card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16),0 2px 10px 0 rgba(0,0,0,0.12)} 115 | .w3-card-4,.w3-hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} 116 | .w3-spin{animation:w3-spin 2s infinite linear}@keyframes w3-spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} 117 | .w3-animate-fading{animation:fading 10s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} 118 | .w3-animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} 119 | .w3-animate-top{position:relative;animation:animatetop 0.4s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} 120 | .w3-animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} 121 | .w3-animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} 122 | .w3-animate-bottom{position:relative;animation:animatebottom 0.4s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} 123 | .w3-animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} 124 | .w3-animate-input{transition:width 0.4s ease-in-out}.w3-animate-input:focus{width:100%!important} 125 | .w3-opacity,.w3-hover-opacity:hover{opacity:0.60}.w3-opacity-off,.w3-hover-opacity-off:hover{opacity:1} 126 | .w3-opacity-max{opacity:0.25}.w3-opacity-min{opacity:0.75} 127 | .w3-greyscale-max,.w3-grayscale-max,.w3-hover-greyscale:hover,.w3-hover-grayscale:hover{filter:grayscale(100%)} 128 | .w3-greyscale,.w3-grayscale{filter:grayscale(75%)}.w3-greyscale-min,.w3-grayscale-min{filter:grayscale(50%)} 129 | .w3-sepia{filter:sepia(75%)}.w3-sepia-max,.w3-hover-sepia:hover{filter:sepia(100%)}.w3-sepia-min{filter:sepia(50%)} 130 | .w3-tiny{font-size:10px!important}.w3-small{font-size:12px!important}.w3-medium{font-size:15px!important}.w3-large{font-size:18px!important} 131 | .w3-xlarge{font-size:24px!important}.w3-xxlarge{font-size:36px!important}.w3-xxxlarge{font-size:48px!important}.w3-jumbo{font-size:64px!important} 132 | .w3-left-align{text-align:left!important}.w3-right-align{text-align:right!important}.w3-justify{text-align:justify!important}.w3-center{text-align:center!important} 133 | .w3-border-0{border:0!important}.w3-border{border:1px solid #ccc!important} 134 | .w3-border-top{border-top:1px solid #ccc!important}.w3-border-bottom{border-bottom:1px solid #ccc!important} 135 | .w3-border-left{border-left:1px solid #ccc!important}.w3-border-right{border-right:1px solid #ccc!important} 136 | .w3-topbar{border-top:6px solid #ccc!important}.w3-bottombar{border-bottom:6px solid #ccc!important} 137 | .w3-leftbar{border-left:6px solid #ccc!important}.w3-rightbar{border-right:6px solid #ccc!important} 138 | .w3-section,.w3-code{margin-top:16px!important;margin-bottom:16px!important} 139 | .w3-margin{margin:16px!important}.w3-margin-top{margin-top:16px!important}.w3-margin-bottom{margin-bottom:16px!important} 140 | .w3-margin-left{margin-left:16px!important}.w3-margin-right{margin-right:16px!important} 141 | .w3-padding-small{padding:4px 8px!important}.w3-padding{padding:8px 16px!important}.w3-padding-large{padding:12px 24px!important} 142 | .w3-padding-16{padding-top:16px!important;padding-bottom:16px!important}.w3-padding-24{padding-top:24px!important;padding-bottom:24px!important} 143 | .w3-padding-32{padding-top:32px!important;padding-bottom:32px!important}.w3-padding-48{padding-top:48px!important;padding-bottom:48px!important} 144 | .w3-padding-64{padding-top:64px!important;padding-bottom:64px!important} 145 | .w3-left{float:left!important}.w3-right{float:right!important} 146 | .w3-button:hover{color:#000!important;background-color:#ccc!important} 147 | .w3-transparent,.w3-hover-none:hover{background-color:transparent!important} 148 | .w3-hover-none:hover{box-shadow:none!important} 149 | /* Colors */ 150 | .w3-amber,.w3-hover-amber:hover{color:#000!important;background-color:#ffc107!important} 151 | .w3-aqua,.w3-hover-aqua:hover{color:#000!important;background-color:#00ffff!important} 152 | .w3-blue,.w3-hover-blue:hover{color:#fff!important;background-color:#2196F3!important} 153 | .w3-light-blue,.w3-hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} 154 | .w3-brown,.w3-hover-brown:hover{color:#fff!important;background-color:#795548!important} 155 | .w3-cyan,.w3-hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} 156 | .w3-blue-grey,.w3-hover-blue-grey:hover,.w3-blue-gray,.w3-hover-blue-gray:hover{color:#fff!important;background-color:#607d8b!important} 157 | .w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#4CAF50!important} 158 | .w3-light-green,.w3-hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} 159 | .w3-indigo,.w3-hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} 160 | .w3-khaki,.w3-hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} 161 | .w3-lime,.w3-hover-lime:hover{color:#000!important;background-color:#cddc39!important} 162 | .w3-orange,.w3-hover-orange:hover{color:#000!important;background-color:#ff9800!important} 163 | .w3-deep-orange,.w3-hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} 164 | .w3-pink,.w3-hover-pink:hover{color:#fff!important;background-color:#e91e63!important} 165 | .w3-purple,.w3-hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} 166 | .w3-deep-purple,.w3-hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} 167 | .w3-red,.w3-hover-red:hover{color:#fff!important;background-color:#f44336!important} 168 | .w3-sand,.w3-hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} 169 | .w3-teal,.w3-hover-teal:hover{color:#fff!important;background-color:#009688!important} 170 | .w3-yellow,.w3-hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} 171 | .w3-white,.w3-hover-white:hover{color:#000!important;background-color:#fff!important} 172 | .w3-black,.w3-hover-black:hover{color:#fff!important;background-color:#000!important} 173 | .w3-grey,.w3-hover-grey:hover,.w3-gray,.w3-hover-gray:hover{color:#000!important;background-color:#9e9e9e!important} 174 | .w3-light-grey,.w3-hover-light-grey:hover,.w3-light-gray,.w3-hover-light-gray:hover{color:#000!important;background-color:#232323!important} 175 | .w3-dark-grey,.w3-hover-dark-grey:hover,.w3-dark-gray,.w3-hover-dark-gray:hover{color:#fff!important;background-color:#616161!important} 176 | .w3-pale-red,.w3-hover-pale-red:hover{color:#000!important;background-color:#ffdddd!important} 177 | .w3-pale-green,.w3-hover-pale-green:hover{color:#000!important;background-color:#ddffdd!important} 178 | .w3-pale-yellow,.w3-hover-pale-yellow:hover{color:#000!important;background-color:#ffffcc!important} 179 | .w3-pale-blue,.w3-hover-pale-blue:hover{color:#000!important;background-color:#ddffff!important} 180 | .w3-text-amber,.w3-hover-text-amber:hover{color:#ffc107!important} 181 | .w3-text-aqua,.w3-hover-text-aqua:hover{color:#00ffff!important} 182 | .w3-text-blue,.w3-hover-text-blue:hover{color:#2196F3!important} 183 | .w3-text-light-blue,.w3-hover-text-light-blue:hover{color:#87CEEB!important} 184 | .w3-text-brown,.w3-hover-text-brown:hover{color:#795548!important} 185 | .w3-text-cyan,.w3-hover-text-cyan:hover{color:#00bcd4!important} 186 | .w3-text-blue-grey,.w3-hover-text-blue-grey:hover,.w3-text-blue-gray,.w3-hover-text-blue-gray:hover{color:#607d8b!important} 187 | .w3-text-green,.w3-hover-text-green:hover{color:#4CAF50!important} 188 | .w3-text-light-green,.w3-hover-text-light-green:hover{color:#8bc34a!important} 189 | .w3-text-indigo,.w3-hover-text-indigo:hover{color:#3f51b5!important} 190 | .w3-text-khaki,.w3-hover-text-khaki:hover{color:#b4aa50!important} 191 | .w3-text-lime,.w3-hover-text-lime:hover{color:#cddc39!important} 192 | .w3-text-orange,.w3-hover-text-orange:hover{color:#ff9800!important} 193 | .w3-text-deep-orange,.w3-hover-text-deep-orange:hover{color:#ff5722!important} 194 | .w3-text-pink,.w3-hover-text-pink:hover{color:#e91e63!important} 195 | .w3-text-purple,.w3-hover-text-purple:hover{color:#9c27b0!important} 196 | .w3-text-deep-purple,.w3-hover-text-deep-purple:hover{color:#673ab7!important} 197 | .w3-text-red,.w3-hover-text-red:hover{color:#f44336!important} 198 | .w3-text-sand,.w3-hover-text-sand:hover{color:#fdf5e6!important} 199 | .w3-text-teal,.w3-hover-text-teal:hover{color:#009688!important} 200 | .w3-text-yellow,.w3-hover-text-yellow:hover{color:#d2be0e!important} 201 | .w3-text-white,.w3-hover-text-white:hover{color:#fff!important} 202 | .w3-text-black,.w3-hover-text-black:hover{color:#000!important} 203 | .w3-text-grey,.w3-hover-text-grey:hover,.w3-text-gray,.w3-hover-text-gray:hover{color:#757575!important} 204 | .w3-text-light-grey,.w3-hover-text-light-grey:hover,.w3-text-light-gray,.w3-hover-text-light-gray:hover{color:#232323!important} 205 | .w3-text-dark-grey,.w3-hover-text-dark-grey:hover,.w3-text-dark-gray,.w3-hover-text-dark-gray:hover{color:#3a3a3a!important} 206 | .w3-border-amber,.w3-hover-border-amber:hover{border-color:#ffc107!important} 207 | .w3-border-aqua,.w3-hover-border-aqua:hover{border-color:#00ffff!important} 208 | .w3-border-blue,.w3-hover-border-blue:hover{border-color:#2196F3!important} 209 | .w3-border-light-blue,.w3-hover-border-light-blue:hover{border-color:#87CEEB!important} 210 | .w3-border-brown,.w3-hover-border-brown:hover{border-color:#795548!important} 211 | .w3-border-cyan,.w3-hover-border-cyan:hover{border-color:#00bcd4!important} 212 | .w3-border-blue-grey,.w3-hover-border-blue-grey:hover,.w3-border-blue-gray,.w3-hover-border-blue-gray:hover{border-color:#607d8b!important} 213 | .w3-border-green,.w3-hover-border-green:hover{border-color:#4CAF50!important} 214 | .w3-border-light-green,.w3-hover-border-light-green:hover{border-color:#8bc34a!important} 215 | .w3-border-indigo,.w3-hover-border-indigo:hover{border-color:#3f51b5!important} 216 | .w3-border-khaki,.w3-hover-border-khaki:hover{border-color:#f0e68c!important} 217 | .w3-border-lime,.w3-hover-border-lime:hover{border-color:#cddc39!important} 218 | .w3-border-orange,.w3-hover-border-orange:hover{border-color:#ff9800!important} 219 | .w3-border-deep-orange,.w3-hover-border-deep-orange:hover{border-color:#ff5722!important} 220 | .w3-border-pink,.w3-hover-border-pink:hover{border-color:#e91e63!important} 221 | .w3-border-purple,.w3-hover-border-purple:hover{border-color:#9c27b0!important} 222 | .w3-border-deep-purple,.w3-hover-border-deep-purple:hover{border-color:#673ab7!important} 223 | .w3-border-red,.w3-hover-border-red:hover{border-color:#f44336!important} 224 | .w3-border-sand,.w3-hover-border-sand:hover{border-color:#fdf5e6!important} 225 | .w3-border-teal,.w3-hover-border-teal:hover{border-color:#009688!important} 226 | .w3-border-yellow,.w3-hover-border-yellow:hover{border-color:#ffeb3b!important} 227 | .w3-border-white,.w3-hover-border-white:hover{border-color:#fff!important} 228 | .w3-border-black,.w3-hover-border-black:hover{border-color:#000!important} 229 | .w3-border-grey,.w3-hover-border-grey:hover,.w3-border-gray,.w3-hover-border-gray:hover{border-color:#9e9e9e!important} 230 | .w3-border-light-grey,.w3-hover-border-light-grey:hover,.w3-border-light-gray,.w3-hover-border-light-gray:hover{border-color:#232323!important} 231 | .w3-border-dark-grey,.w3-hover-border-dark-grey:hover,.w3-border-dark-gray,.w3-hover-border-dark-gray:hover{border-color:#616161!important} 232 | .w3-border-pale-red,.w3-hover-border-pale-red:hover{border-color:#ffe7e7!important}.w3-border-pale-green,.w3-hover-border-pale-green:hover{border-color:#e7ffe7!important} 233 | .w3-border-pale-yellow,.w3-hover-border-pale-yellow:hover{border-color:#ffffcc!important}.w3-border-pale-blue,.w3-hover-border-pale-blue:hover{border-color:#e7ffff!important} -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/index.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | CentosAuth - Hub 14 | 15 | 16 | 17 | 18 | 19 | 44 | 45 | 46 | 47 |
48 | 58 |
59 |
60 |
61 |

Hub

62 |
Thanks for purchasing.
63 | If you need any help with the setup, you can message me on Discord (Centos#3363)

64 |

65 |
<3
66 |
67 | 68 | 69 | 70 | 71 | 72 | ]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); 83 | 84 | // Remove javascript: and vbscript: protocols 85 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data); 86 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data); 87 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data); 88 | 89 | // Only works in IE: 90 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 91 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 92 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data); 93 | 94 | // Remove namespaced elements (we do not need them) 95 | $data = preg_replace('#]*+>#i', '', $data); 96 | 97 | do 98 | { 99 | // Remove really unwanted tags 100 | $old_data = $data; 101 | $data = preg_replace('#]*+>#i', '', $data); 102 | } 103 | while ($old_data !== $data); 104 | 105 | // we are done... 106 | return $data; 107 | } 108 | ?> 109 | -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/logout.php: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/tokens.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | CentosAuth - Tokens 14 | 15 | 16 | 17 | 18 | 43 | 44 | 45 | 46 |
47 | 57 |
58 |
59 |
60 |

Generate Token

61 |
62 | 91 |

Invalid token type!

92 |
"; 93 | die(); 94 | } 95 | 96 | for($i = 0; $i < $loopcount; $i++){ 97 | $tokennn = GenerateToken(); 98 | $insertlol = mysqli_query($con, "INSERT INTO `tokens` (id, token, rank, days, used, used_by) 99 | VALUES ('', '$tokennn', '$level', '$type', 0, '')") or die(mysqli_error($con)); 100 | } 101 | if ($insertlol){ 102 | echo "
103 |

Success! Please wait...

104 |
"; 105 | echo ""; 106 | die(); 107 | } 108 | else{ 109 | echo "
110 |

Error!

111 |
"; 112 | } 113 | 114 | } 115 | 116 | 117 | 118 | 119 | function GenerateToken() { 120 | for($i = 0; $i < 1; $i++) { 121 | $randomString = ""; 122 | $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 123 | $charactersLength = strlen($characters); 124 | for ($i = 0; $i < 10; $i++) { 125 | $randomString .= $characters[rand(0, $charactersLength - 1)]; 126 | } 127 | return $randomString; 128 | } 129 | } 130 | ?> 131 |
132 |
133 |
Time:
134 | 143 |
144 |
145 |
Level:
146 |
147 | 148 |
149 |
150 |
Amount to generate:
151 |
152 | 153 |
154 |
155 | 156 | 157 |
158 | 159 |
160 |
161 |

Manage Tokens

162 | 168 |

Successfully deleted token!

169 |

"; 170 | echo ""; 171 | } 172 | else{ 173 | echo "
174 |

Error!

175 |

"; 176 | } 177 | } 178 | ?> 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 204 | 205 | 206 | 207 | '.($row['used'] == "1" ? "" : "") .' 208 | 209 | 210 | 211 | 212 | 220 | 221 |
TokenDaysUsed?Used by?Manage
'.$row['token'].''.$row['days'].'UsedNot Used'.$kekloll.' 213 | 214 | ' 215 | ; 216 | } 217 | } 218 | ?> 219 |
222 |
223 | 224 | 225 | 226 | 227 | 228 | ]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); 239 | 240 | // Remove javascript: and vbscript: protocols 241 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data); 242 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data); 243 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data); 244 | 245 | // Only works in IE: 246 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 247 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 248 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data); 249 | 250 | // Remove namespaced elements (we do not need them) 251 | $data = preg_replace('#]*+>#i', '', $data); 252 | 253 | do 254 | { 255 | // Remove really unwanted tags 256 | $old_data = $data; 257 | $data = preg_replace('#]*+>#i', '', $data); 258 | } 259 | while ($old_data !== $data); 260 | 261 | // we are done... 262 | return $data; 263 | } 264 | ?> 265 | -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/users.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | CentosAuth - Users 14 | 15 | 16 | 17 | 18 | 43 | 44 | 45 | 46 |
47 | 57 |
58 | 59 | 60 | 61 |
62 | 70 |

Successfully deleted user!

71 |

"; 72 | echo ""; 73 | } 74 | else{ 75 | echo "
76 |

Error!

77 |

"; 78 | } 79 | } 80 | ?> 81 |
82 |

Manage Users

83 |
84 |
85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 111 | 112 | 113 | 114 | '.($expired ? "" : "") .' 115 | 116 | 117 | 118 | 128 | 129 |
UsernameEmailExpiresRankManage
'.$row['username'].''.$row['email'].'Expired(". $row['expiry_date'] .")".$row['expiry_date']."'.$row['rank'].' 119 | 120 | ' 121 | ; 122 | } 123 | } 124 | 125 | 126 | ?> 127 |
130 |
131 |
132 | 133 |
134 | 135 | 136 | 137 | 138 | 139 | ]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); 150 | 151 | // Remove javascript: and vbscript: protocols 152 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data); 153 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data); 154 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data); 155 | 156 | // Only works in IE: 157 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 158 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 159 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data); 160 | 161 | // Remove namespaced elements (we do not need them) 162 | $data = preg_replace('#]*+>#i', '', $data); 163 | 164 | do 165 | { 166 | // Remove really unwanted tags 167 | $old_data = $data; 168 | $data = preg_replace('#]*+>#i', '', $data); 169 | } 170 | while ($old_data !== $data); 171 | 172 | // we are done... 173 | return $data; 174 | } 175 | ?> 176 | -------------------------------------------------------------------------------- /CentosAuth Panel/Panel/variables.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | CentosAuth - Variables 14 | 15 | 16 | 17 | 18 | 43 | 44 | 45 | 46 |
47 | 57 |
58 | 59 |
60 |
61 |

Create Variable

62 | 69 |

You cannot input empty values!

70 |

"; 71 | } 72 | else { 73 | 74 | 75 | if(strlen($varname) > 30){ 76 | echo "
77 |

Variable name too long! Max length is 30 characters

78 |

"; 79 | } 80 | else if(strlen($varvalue) > 2000){ 81 | echo "
82 |

Variable value too long! Max length is 2000 characters

83 |

"; 84 | } 85 | else { 86 | 87 | $namecheckboii = mysqli_query($con, "SELECT * FROM `vars` WHERE `name` = '$varname'") or die(mysqli_error($con)); 88 | if(mysqli_num_rows($namecheckboii) > 0){ 89 | echo "
90 |

Variable name already exists!

91 |

"; 92 | } 93 | else { 94 | 95 | $insertlol = mysqli_query($con, "INSERT INTO `vars` (id, name, value) 96 | VALUES ('', '$varname', '$varvalue')") or die(mysqli_error($con)); 97 | if($insertlol){ 98 | echo "
99 |

Successfully created variable!

100 |

"; 101 | } 102 | } 103 | } 104 | } 105 | } 106 | 107 | 108 | ?> 109 |
110 |
Variable name (e.g. MySecretVariable):
111 |
112 | 113 | 114 |
115 |
116 |
Variable value (e.g. My string value):
117 |
118 | 119 |
120 |
121 | 122 |
123 |
124 | 125 | 126 | 127 |
128 | 135 |

Successfully deleted variable!

136 |

"; 137 | } 138 | else{ 139 | echo "
140 |

Failed to delete variable!

141 |

"; 142 | } 143 | 144 | } 145 | ?> 146 |
147 |

Manage Variables

148 |
149 |
150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | ' 173 | ; 174 | } 175 | } 176 | 177 | 178 | ?> 179 | 180 | 181 |
NameValue
'.$row['name'].''.$row['value'].'
182 |
183 |
184 | 185 |
186 | 187 | 188 | 189 | 190 | 191 | ]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); 202 | 203 | // Remove javascript: and vbscript: protocols 204 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data); 205 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data); 206 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data); 207 | 208 | // Only works in IE: 209 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 210 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 211 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data); 212 | 213 | // Remove namespaced elements (we do not need them) 214 | $data = preg_replace('#]*+>#i', '', $data); 215 | 216 | do 217 | { 218 | // Remove really unwanted tags 219 | $old_data = $data; 220 | $data = preg_replace('#]*+>#i', '', $data); 221 | } 222 | while ($old_data !== $data); 223 | 224 | // we are done... 225 | return $data; 226 | } 227 | ?> 228 | -------------------------------------------------------------------------------- /CentosAuth Panel/include/settings.php: -------------------------------------------------------------------------------- 1 | 22 | -------------------------------------------------------------------------------- /CentosAuth Panel/index.php: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | CentosAuth - Login 13 | 14 | 15 | 16 | 17 | 18 |
19 | 22 |
23 |
24 |
25 |

Access Panel

26 |
27 |
28 | 29 |
30 |
31 | 32 |
33 |
34 | 51 |

Access granted! Reloading...

52 |
"; 53 | header("refresh:3; url=$yoursiteurl/Panel"); 54 | die(); 55 | } 56 | else{ 57 | echo "
58 |

Invalid access key!

59 |
"; 60 | } 61 | } 62 | ?> 63 | 64 | ]+?[\x00-\x20"\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data); 75 | 76 | // Remove javascript: and vbscript: protocols 77 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=[\x00-\x20]*([`\'"]*)[\x00-\x20]*j[\x00-\x20]*a[\x00-\x20]*v[\x00-\x20]*a[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2nojavascript...', $data); 78 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*v[\x00-\x20]*b[\x00-\x20]*s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:#iu', '$1=$2novbscript...', $data); 79 | $data = preg_replace('#([a-z]*)[\x00-\x20]*=([\'"]*)[\x00-\x20]*-moz-binding[\x00-\x20]*:#u', '$1=$2nomozbinding...', $data); 80 | 81 | // Only works in IE: 82 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?expression[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 83 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?behaviour[\x00-\x20]*\([^>]*+>#i', '$1>', $data); 84 | $data = preg_replace('#(<[^>]+?)style[\x00-\x20]*=[\x00-\x20]*[`\'"]*.*?s[\x00-\x20]*c[\x00-\x20]*r[\x00-\x20]*i[\x00-\x20]*p[\x00-\x20]*t[\x00-\x20]*:*[^>]*+>#iu', '$1>', $data); 85 | 86 | // Remove namespaced elements (we do not need them) 87 | $data = preg_replace('#]*+>#i', '', $data); 88 | 89 | do 90 | { 91 | // Remove really unwanted tags 92 | $old_data = $data; 93 | $data = preg_replace('#]*+>#i', '', $data); 94 | } 95 | while ($old_data !== $data); 96 | 97 | // we are done... 98 | return $data; 99 | } 100 | ?> 101 |
102 |
103 |
104 | 105 | -------------------------------------------------------------------------------- /CentosAuth.sql: -------------------------------------------------------------------------------- 1 | -- phpMyAdmin SQL Dump 2 | -- version 4.9.0.1 3 | -- https://www.phpmyadmin.net/ 4 | -- 5 | -- Host: 127.0.0.1 6 | -- Generation Time: Aug 19, 2019 at 02:35 AM 7 | -- Server version: 10.4.6-MariaDB 8 | -- PHP Version: 7.3.8 9 | 10 | SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; 11 | SET AUTOCOMMIT = 0; 12 | START TRANSACTION; 13 | SET time_zone = "+00:00"; 14 | 15 | 16 | /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; 17 | /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; 18 | /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; 19 | /*!40101 SET NAMES utf8mb4 */; 20 | 21 | -- 22 | -- Database: `centauth` 23 | -- 24 | 25 | -- -------------------------------------------------------- 26 | 27 | -- 28 | -- Table structure for table `panel` 29 | -- 30 | 31 | CREATE TABLE `panel` ( 32 | `id` int(1) NOT NULL, 33 | `accesskey` varchar(30) NOT NULL 34 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 35 | 36 | -- 37 | -- Dumping data for table `panel` 38 | -- 39 | 40 | INSERT INTO `panel` (`id`, `accesskey`) VALUES 41 | (1, 'mykey123'); 42 | 43 | -- -------------------------------------------------------- 44 | 45 | -- 46 | -- Table structure for table `tokens` 47 | -- 48 | 49 | CREATE TABLE `tokens` ( 50 | `id` int(11) NOT NULL, 51 | `token` text NOT NULL, 52 | `rank` int(11) NOT NULL, 53 | `days` int(11) NOT NULL, 54 | `used` int(11) NOT NULL, 55 | `used_by` text DEFAULT NULL, 56 | `time` timestamp NOT NULL DEFAULT current_timestamp() 57 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 58 | 59 | -- 60 | -- Dumping data for table `tokens` 61 | -- 62 | 63 | INSERT INTO `tokens` (`id`, `token`, `rank`, `days`, `used`, `used_by`, `time`) VALUES 64 | (10, 'WpHHSFtRLM', 1, 1, 1, 's', '2019-08-19 00:29:56'), 65 | (11, 'Xgk49bTp8I', 10, 99999, 1, 's', '2019-08-19 00:30:28'); 66 | 67 | -- -------------------------------------------------------- 68 | 69 | -- 70 | -- Table structure for table `users` 71 | -- 72 | 73 | CREATE TABLE `users` ( 74 | `id` int(11) NOT NULL, 75 | `username` text DEFAULT NULL, 76 | `password` varchar(255) DEFAULT NULL, 77 | `email` text DEFAULT NULL, 78 | `hwid` varchar(255) DEFAULT NULL, 79 | `rank` int(11) NOT NULL, 80 | `expiry_date` datetime DEFAULT NULL, 81 | `date` timestamp NULL DEFAULT current_timestamp() 82 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 83 | 84 | -- 85 | -- Dumping data for table `users` 86 | -- 87 | 88 | INSERT INTO `users` (`id`, `username`, `password`, `email`, `hwid`, `rank`, `expiry_date`, `date`) VALUES 89 | (9, 'exampleuser', '$2y$10$RS87a9QEiQsPYWF20YvSpu10brXO83RdImY2UNwS1mltyWJTzI14W', 's@gmail.com', 'hwidwazhere', 10, '2293-06-03 02:30:07', '2019-08-19 00:30:08'); 90 | 91 | -- -------------------------------------------------------- 92 | 93 | -- 94 | -- Table structure for table `vars` 95 | -- 96 | 97 | CREATE TABLE `vars` ( 98 | `id` int(11) NOT NULL, 99 | `name` text NOT NULL, 100 | `value` mediumtext NOT NULL 101 | ) ENGINE=InnoDB DEFAULT CHARSET=latin1; 102 | 103 | -- 104 | -- Dumping data for table `vars` 105 | -- 106 | 107 | INSERT INTO `vars` (`id`, `name`, `value`) VALUES 108 | (5, 'meme', 'your meme is dank, love centos <3!'); 109 | 110 | -- 111 | -- Indexes for dumped tables 112 | -- 113 | 114 | -- 115 | -- Indexes for table `panel` 116 | -- 117 | ALTER TABLE `panel` 118 | ADD PRIMARY KEY (`id`); 119 | 120 | -- 121 | -- Indexes for table `tokens` 122 | -- 123 | ALTER TABLE `tokens` 124 | ADD PRIMARY KEY (`id`); 125 | 126 | -- 127 | -- Indexes for table `users` 128 | -- 129 | ALTER TABLE `users` 130 | ADD PRIMARY KEY (`id`); 131 | 132 | -- 133 | -- Indexes for table `vars` 134 | -- 135 | ALTER TABLE `vars` 136 | ADD PRIMARY KEY (`id`); 137 | 138 | -- 139 | -- AUTO_INCREMENT for dumped tables 140 | -- 141 | 142 | -- 143 | -- AUTO_INCREMENT for table `panel` 144 | -- 145 | ALTER TABLE `panel` 146 | MODIFY `id` int(1) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; 147 | 148 | -- 149 | -- AUTO_INCREMENT for table `tokens` 150 | -- 151 | ALTER TABLE `tokens` 152 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12; 153 | 154 | -- 155 | -- AUTO_INCREMENT for table `users` 156 | -- 157 | ALTER TABLE `users` 158 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10; 159 | 160 | -- 161 | -- AUTO_INCREMENT for table `vars` 162 | -- 163 | ALTER TABLE `vars` 164 | MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; 165 | COMMIT; 166 | 167 | /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; 168 | /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; 169 | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; 170 | -------------------------------------------------------------------------------- /Example Program/CentosAuth.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CentosAuth", "CentosAuth\CentosAuth.csproj", "{A29A0871-97CA-4FCC-B676-B26A9CC16324}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {A29A0871-97CA-4FCC-B676-B26A9CC16324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {A29A0871-97CA-4FCC-B676-B26A9CC16324}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {A29A0871-97CA-4FCC-B676-B26A9CC16324}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {A29A0871-97CA-4FCC-B676-B26A9CC16324}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Auth.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.Specialized; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | using System.Windows.Forms; 9 | using static cent_auth.Handle; 10 | namespace cent_auth 11 | { 12 | class Auth 13 | { 14 | private static Dictionary Vars = new Dictionary(); 15 | private static string Var_KEY { get; set; } 16 | private static string Var_SALT { get; set; } 17 | public static bool Login(string Username,string Password) 18 | { 19 | try 20 | { 21 | Start_Session(); 22 | var values = new NameValueCollection(); 23 | values["type"] = "login"; 24 | values["username"] = Payload_ENCRYPT(Username); 25 | values["password"] = Payload_ENCRYPT(Password); 26 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 27 | values["session_id"] = ENCRYPT_KEY; 28 | values["session_salt"] = ENCRYPT_SALT; 29 | string meme = Payload(values, true); 30 | dynamic json = JsonConvert.DeserializeObject(meme); 31 | switch ((string)json.result) 32 | { 33 | case "success": 34 | UserInfo.ID = (int)json.id; 35 | UserInfo.Logged_In = bool.Parse((string)json.logged_in); 36 | UserInfo.Username = (string)json.username; 37 | UserInfo.Email = (string)json.email; 38 | UserInfo.HWID = (string)json.hwid; 39 | UserInfo.Expiry = (string)json.expiry; 40 | UserInfo.Rank = (int)json.rank; 41 | UserInfo.IP = (string)json.ip; 42 | Vars = JsonConvert.DeserializeObject>(json.vars.ToString()); 43 | Var_KEY = (string)json.session_id; 44 | Var_SALT = (string)json.session_salt; 45 | MessageBox.Show(string.Format("Welcome {0}, Login Success!", UserInfo.Username), "Login Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 46 | return true; 47 | case "invalid_details": 48 | MessageBox.Show("Incorrect username/password", "Incorrect details", MessageBoxButtons.OK, MessageBoxIcon.Error); 49 | return false; 50 | case "invalid_hwid": 51 | MessageBox.Show("Incorrect HWID \n", "Incorrect HWID", MessageBoxButtons.OK, MessageBoxIcon.Error); 52 | return false; 53 | case "hwid_updated": 54 | MessageBox.Show("Your computer HWID has been updated\nYour account is now locked to this computer", "Computer HWID has been updated", MessageBoxButtons.OK, MessageBoxIcon.Information); 55 | return false; 56 | case "time_expired": 57 | MessageBox.Show("Time EXPIRED! \n It appears your time is expired", "Time EXPIRED!", MessageBoxButtons.OK, MessageBoxIcon.Error); 58 | return false; 59 | case "net_error": 60 | MessageBox.Show("It appears an Internet/Server error has occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 61 | return false; 62 | default: 63 | MessageBox.Show("An unknown error has occured", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 64 | return false; 65 | } 66 | } 67 | catch 68 | { 69 | return false; 70 | } 71 | } 72 | public static bool Register(string Username,string Email, string Password, string Repeat_Password,string Token) 73 | { 74 | try 75 | { 76 | if (Password == Repeat_Password) 77 | { 78 | Start_Session(); 79 | var values = new NameValueCollection(); 80 | values["type"] = "register"; 81 | values["username"] = Payload_ENCRYPT(Username); 82 | values["password"] = Payload_ENCRYPT(Password); 83 | values["rep_pass"] = Payload_ENCRYPT(Repeat_Password); 84 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 85 | values["email"] = Payload_ENCRYPT(Email); 86 | values["token"] = Payload_ENCRYPT(Token); 87 | values["session_id"] = ENCRYPT_KEY; 88 | values["session_salt"] = ENCRYPT_SALT; 89 | string meme = Payload(values, true); 90 | dynamic json = JsonConvert.DeserializeObject(meme); 91 | switch ((string)json.result) 92 | { 93 | case "success": 94 | MessageBox.Show(string.Format("Welcome {0}, Register Success!", (string)json.username), "Register Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 95 | return false; 96 | case "invalid token": 97 | MessageBox.Show("Invalid Token, please check your entries and try again", "Invalid Token", MessageBoxButtons.OK, MessageBoxIcon.Error); 98 | return false; 99 | case "invalid passwords": 100 | MessageBox.Show("Passwords do not match \n Please check your passwords match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 101 | return false; 102 | case "email used": 103 | MessageBox.Show("It appears this email has already been used", "Email Already Used", MessageBoxButtons.OK, MessageBoxIcon.Error); 104 | return false; 105 | case "invalid username": 106 | MessageBox.Show("It appears this username is already taken", "Username Taken", MessageBoxButtons.OK, MessageBoxIcon.Error); 107 | return false; 108 | case "net_error": 109 | MessageBox.Show("It appears an Internet/Server error has occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 110 | return false; 111 | default: 112 | MessageBox.Show("An unknown error has occurred!", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 113 | return false; 114 | } 115 | } 116 | else 117 | { 118 | MessageBox.Show("Passwords do not match \n Please check your passwords match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 119 | return false; 120 | } 121 | } 122 | catch 123 | { 124 | return false; 125 | } 126 | } 127 | public static bool Redeem_Token(string Username, string Password, string Token) 128 | { 129 | try 130 | { 131 | 132 | Start_Session(); 133 | var values = new NameValueCollection(); 134 | values["type"] = "redeem"; 135 | values["username"] = Payload_ENCRYPT(Username); 136 | values["password"] = Payload_ENCRYPT(Password); 137 | values["hwid"] = Payload_ENCRYPT(HWID.getUniqueID()); 138 | values["token"] = Payload_ENCRYPT(Token); 139 | values["session_id"] = ENCRYPT_KEY; 140 | values["session_salt"] = ENCRYPT_SALT; 141 | string meme = Payload(values, true); 142 | dynamic json = JsonConvert.DeserializeObject(meme); 143 | switch ((string)json.result) 144 | { 145 | case "success": 146 | MessageBox.Show(string.Format("Welcome {0} Token Redeem Success", (string)json.username), "Token Redeem Success", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); 147 | return false; 148 | case "invalid token": 149 | MessageBox.Show("Invalid Token Please Check Your Entries And Try Again", "Invalid Token", MessageBoxButtons.OK, MessageBoxIcon.Error); 150 | return false; 151 | case "invalid details": 152 | MessageBox.Show("Passwords Do Not Match \n Please Check Your Passwords Match", "Passwords Do Not Match", MessageBoxButtons.OK, MessageBoxIcon.Error); 153 | return false; 154 | case "net_error": 155 | MessageBox.Show("It Appears an Internet/Server Error Has Occured", "Internet/Server Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 156 | return false; 157 | default: 158 | MessageBox.Show("An Unknown Error Has Occured And Info Forwarded Onto Our Dev", "Unknown Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 159 | return false; 160 | } 161 | } 162 | catch 163 | { 164 | return false; 165 | } 166 | } 167 | public static object Var(string Name) 168 | { 169 | try 170 | { 171 | ENCRYPT_KEY = Var_KEY; 172 | ENCRYPT_SALT = Var_SALT; 173 | return Payload_DECRYPT(Vars[Name].ToString()); 174 | } 175 | catch 176 | { 177 | return "unknown variable"; 178 | } 179 | } 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/CentosAuth.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {A29A0871-97CA-4FCC-B676-B26A9CC16324} 8 | WinExe 9 | Properties 10 | cent_auth 11 | cent auth 12 | v4.5.2 13 | 512 14 | true 15 | 16 | 17 | AnyCPU 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | DEBUG;TRACE 23 | prompt 24 | 4 25 | 26 | 27 | AnyCPU 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | ..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll 38 | True 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | Form 57 | 58 | 59 | Login.cs 60 | 61 | 62 | 63 | Form 64 | 65 | 66 | Main.cs 67 | 68 | 69 | 70 | 71 | Form 72 | 73 | 74 | Register.cs 75 | 76 | 77 | 78 | Login.cs 79 | 80 | 81 | Main.cs 82 | 83 | 84 | ResXFileCodeGenerator 85 | Resources.Designer.cs 86 | Designer 87 | 88 | 89 | True 90 | Resources.resx 91 | 92 | 93 | Register.cs 94 | 95 | 96 | 97 | SettingsSingleFileGenerator 98 | Settings.Designer.cs 99 | 100 | 101 | True 102 | Settings.settings 103 | True 104 | 105 | 106 | 107 | 108 | 109 | 110 | 117 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Handle.cs: -------------------------------------------------------------------------------- 1 | using Newtonsoft.Json; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Collections.Specialized; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Management; 8 | using System.Net; 9 | using System.Security.Cryptography; 10 | using System.Text; 11 | using System.Threading.Tasks; 12 | 13 | namespace cent_auth 14 | { 15 | class Handle 16 | { 17 | public static string URL { get; set; } 18 | public static string ENCRYPT_KEY { get; set; } 19 | public static string ENCRYPT_SALT { get; set; } 20 | public static string Payload_DECRYPT(string value) 21 | { 22 | string message = value; 23 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 24 | SHA256 mySHA256 = SHA256Managed.Create(); 25 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 26 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 27 | string decrypted = String_Encryption.DecryptString(message, key, iv); 28 | return decrypted; 29 | } 30 | public static string Payload_ENCRYPT(string value) 31 | { 32 | string message = value; 33 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 34 | SHA256 mySHA256 = SHA256Managed.Create(); 35 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 36 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 37 | string decrypted = String_Encryption.EncryptString(message, key, iv); 38 | return decrypted; 39 | } 40 | private static string Session_ID(int length) 41 | { 42 | Random random = new Random(); 43 | const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz"; 44 | return new string(Enumerable.Repeat(chars, length) 45 | .Select(s => s[random.Next(s.Length)]).ToArray()); 46 | } 47 | public static void Start_Session() 48 | { 49 | ENCRYPT_KEY = Convert.ToBase64String(Encoding.Default.GetBytes(Session_ID(32))); 50 | ENCRYPT_SALT = Convert.ToBase64String(Encoding.Default.GetBytes(Session_ID(16))); 51 | } 52 | public static string Payload(NameValueCollection Values, bool encrypted = false) 53 | { 54 | try 55 | { 56 | switch (encrypted) 57 | { 58 | case false: 59 | return Encoding.Default.GetString(new WebClient().UploadValues(URL, Values)); 60 | case true: 61 | SHA256 mySHA256 = SHA256Managed.Create(); 62 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)))); 63 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 64 | string decrypted = String_Encryption.DecryptString(Encoding.Default.GetString(new WebClient().UploadValues(URL, Values)), key, iv); 65 | return decrypted; 66 | default: 67 | Dictionary ERROR = new Dictionary(); 68 | ERROR.Add("result", "net_error"); 69 | return JsonConvert.SerializeObject(ERROR); 70 | 71 | } 72 | } 73 | catch (WebException E) 74 | { 75 | Dictionary ERROR = new Dictionary(); 76 | HttpWebResponse response = (HttpWebResponse)E.Response; 77 | switch (response.StatusCode) 78 | { 79 | case HttpStatusCode.NotFound: 80 | ERROR.Add("result", "net_error"); 81 | break; 82 | case HttpStatusCode.RequestEntityTooLarge: 83 | ERROR.Add("result", "net_error"); 84 | break; 85 | case HttpStatusCode.ServiceUnavailable: 86 | ERROR.Add("result", "net_error"); 87 | break; 88 | case HttpStatusCode.Forbidden: 89 | ERROR.Add("result", "net_error"); 90 | break; 91 | } 92 | ERROR.Add("result", "net_error"); 93 | return JsonConvert.SerializeObject(ERROR); 94 | } 95 | } 96 | public static string Payload(string URL, NameValueCollection Values, bool encrypted = false) 97 | { 98 | try 99 | { 100 | switch (encrypted) 101 | { 102 | case false: 103 | return Encoding.Default.GetString(new WebClient { Proxy = null }.UploadValues(URL, Values)); 104 | case true: 105 | string message = Encoding.Default.GetString(new WebClient { Proxy = null }.UploadValues(URL, Values)); 106 | string password = Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_KEY)); 107 | SHA256 mySHA256 = SHA256Managed.Create(); 108 | byte[] key = mySHA256.ComputeHash(Encoding.ASCII.GetBytes(password)); 109 | byte[] iv = Encoding.ASCII.GetBytes(Encoding.Default.GetString(Convert.FromBase64String(ENCRYPT_SALT))); 110 | string decrypted = String_Encryption.DecryptString(message, key, iv); 111 | return decrypted; 112 | default: 113 | Dictionary ERROR = new Dictionary(); 114 | ERROR.Add("result", "net_error"); 115 | return JsonConvert.SerializeObject(ERROR); 116 | 117 | } 118 | } 119 | catch (WebException E) 120 | { 121 | Dictionary ERROR = new Dictionary(); 122 | HttpWebResponse response = (HttpWebResponse)E.Response; 123 | switch (response.StatusCode) 124 | { 125 | case HttpStatusCode.NotFound: 126 | ERROR.Add("result", "net_error"); 127 | break; 128 | case HttpStatusCode.RequestEntityTooLarge: 129 | ERROR.Add("result", "net_error"); 130 | break; 131 | case HttpStatusCode.ServiceUnavailable: 132 | ERROR.Add("result", "net_error"); 133 | break; 134 | case HttpStatusCode.Forbidden: 135 | ERROR.Add("result", "net_error"); 136 | break; 137 | } 138 | Console.WriteLine(E.ToString()); 139 | ERROR.Add("result", "net_error"); 140 | return JsonConvert.SerializeObject(ERROR); 141 | } 142 | } 143 | class String_Encryption 144 | { 145 | public static string EncryptString(string plainText, byte[] key, byte[] iv) 146 | { 147 | Aes encryptor = Aes.Create(); 148 | encryptor.Mode = CipherMode.CBC; 149 | encryptor.Key = key; 150 | encryptor.IV = iv; 151 | MemoryStream memoryStream = new MemoryStream(); 152 | ICryptoTransform aesEncryptor = encryptor.CreateEncryptor(); 153 | CryptoStream cryptoStream = new CryptoStream(memoryStream, aesEncryptor, CryptoStreamMode.Write); 154 | byte[] plainBytes = Encoding.ASCII.GetBytes(plainText); 155 | cryptoStream.Write(plainBytes, 0, plainBytes.Length); 156 | cryptoStream.FlushFinalBlock(); 157 | byte[] cipherBytes = memoryStream.ToArray(); 158 | memoryStream.Close(); 159 | cryptoStream.Close(); 160 | string cipherText = Convert.ToBase64String(cipherBytes, 0, cipherBytes.Length); 161 | return cipherText; 162 | } 163 | 164 | public static string DecryptString(string cipherText, byte[] key, byte[] iv) 165 | { 166 | Aes encryptor = Aes.Create(); 167 | encryptor.Mode = CipherMode.CBC; 168 | encryptor.Key = key; 169 | encryptor.IV = iv; 170 | MemoryStream memoryStream = new MemoryStream(); 171 | ICryptoTransform aesDecryptor = encryptor.CreateDecryptor(); 172 | CryptoStream cryptoStream = new CryptoStream(memoryStream, aesDecryptor, CryptoStreamMode.Write); 173 | string plainText = String.Empty; 174 | try 175 | { 176 | byte[] cipherBytes = Convert.FromBase64String(cipherText); 177 | cryptoStream.Write(cipherBytes, 0, cipherBytes.Length); 178 | cryptoStream.FlushFinalBlock(); 179 | byte[] plainBytes = memoryStream.ToArray(); 180 | plainText = Encoding.ASCII.GetString(plainBytes, 0, plainBytes.Length); 181 | } 182 | finally 183 | { 184 | memoryStream.Close(); 185 | cryptoStream.Close(); 186 | } 187 | return plainText; 188 | } 189 | } 190 | } 191 | public class HWID 192 | { 193 | public static string getUniqueID() 194 | { 195 | string drive = "C"; 196 | if (drive == string.Empty) 197 | { 198 | foreach (DriveInfo compDrive in DriveInfo.GetDrives()) 199 | { 200 | if (compDrive.IsReady) 201 | { 202 | drive = compDrive.RootDirectory.ToString(); 203 | break; 204 | } 205 | } 206 | } 207 | if (drive.EndsWith(":\\")) 208 | { 209 | drive = drive.Substring(0, drive.Length - 2); 210 | } 211 | string volumeSerial = getVolumeSerial(drive); 212 | string cpuID = getCPUID(); 213 | return cpuID.Substring(13) + cpuID.Substring(1, 4) + volumeSerial + cpuID.Substring(4, 4); 214 | } 215 | static string getVolumeSerial(string drive) 216 | { 217 | ManagementObject disk = new ManagementObject(@"win32_logicaldisk.deviceid=""" + drive + @":"""); 218 | disk.Get(); 219 | string volumeSerial = disk["VolumeSerialNumber"].ToString(); 220 | disk.Dispose(); 221 | return volumeSerial; 222 | } 223 | public static string PCUSERNAME() 224 | { 225 | return Environment.UserName; 226 | } 227 | public static string PCNAME() 228 | { 229 | return Environment.MachineName; 230 | } 231 | static string getCPUID() 232 | { 233 | string cpuInfo = ""; 234 | ManagementClass managClass = new ManagementClass("win32_processor"); 235 | ManagementObjectCollection managCollec = managClass.GetInstances(); 236 | foreach (ManagementObject managObj in managCollec) 237 | { 238 | if (cpuInfo == "") 239 | { 240 | cpuInfo = managObj.Properties["processorID"].Value.ToString(); 241 | break; 242 | } 243 | } 244 | return cpuInfo; 245 | } 246 | } 247 | } 248 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Login.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace cent_auth 2 | { 3 | partial class Login 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBox1 = new System.Windows.Forms.TextBox(); 32 | this.textBox2 = new System.Windows.Forms.TextBox(); 33 | this.button1 = new System.Windows.Forms.Button(); 34 | this.button2 = new System.Windows.Forms.Button(); 35 | this.label1 = new System.Windows.Forms.Label(); 36 | this.label2 = new System.Windows.Forms.Label(); 37 | this.SuspendLayout(); 38 | // 39 | // textBox1 40 | // 41 | this.textBox1.Location = new System.Drawing.Point(12, 28); 42 | this.textBox1.Name = "textBox1"; 43 | this.textBox1.Size = new System.Drawing.Size(100, 20); 44 | this.textBox1.TabIndex = 0; 45 | // 46 | // textBox2 47 | // 48 | this.textBox2.Location = new System.Drawing.Point(12, 67); 49 | this.textBox2.Name = "textBox2"; 50 | this.textBox2.Size = new System.Drawing.Size(100, 20); 51 | this.textBox2.TabIndex = 1; 52 | // 53 | // button1 54 | // 55 | this.button1.Location = new System.Drawing.Point(12, 93); 56 | this.button1.Name = "button1"; 57 | this.button1.Size = new System.Drawing.Size(100, 23); 58 | this.button1.TabIndex = 2; 59 | this.button1.Text = "Login"; 60 | this.button1.UseVisualStyleBackColor = true; 61 | this.button1.Click += new System.EventHandler(this.button1_Click); 62 | // 63 | // button2 64 | // 65 | this.button2.Location = new System.Drawing.Point(12, 122); 66 | this.button2.Name = "button2"; 67 | this.button2.Size = new System.Drawing.Size(100, 23); 68 | this.button2.TabIndex = 3; 69 | this.button2.Text = "Register"; 70 | this.button2.UseVisualStyleBackColor = true; 71 | this.button2.Click += new System.EventHandler(this.button2_Click); 72 | // 73 | // label1 74 | // 75 | this.label1.AutoSize = true; 76 | this.label1.Location = new System.Drawing.Point(12, 9); 77 | this.label1.Name = "label1"; 78 | this.label1.Size = new System.Drawing.Size(58, 13); 79 | this.label1.TabIndex = 4; 80 | this.label1.Text = "Username:"; 81 | // 82 | // label2 83 | // 84 | this.label2.AutoSize = true; 85 | this.label2.Location = new System.Drawing.Point(12, 51); 86 | this.label2.Name = "label2"; 87 | this.label2.Size = new System.Drawing.Size(56, 13); 88 | this.label2.TabIndex = 5; 89 | this.label2.Text = "Password:"; 90 | // 91 | // Login 92 | // 93 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 94 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 95 | this.ClientSize = new System.Drawing.Size(284, 261); 96 | this.Controls.Add(this.label2); 97 | this.Controls.Add(this.label1); 98 | this.Controls.Add(this.button2); 99 | this.Controls.Add(this.button1); 100 | this.Controls.Add(this.textBox2); 101 | this.Controls.Add(this.textBox1); 102 | this.Name = "Login"; 103 | this.Text = "Form1"; 104 | this.ResumeLayout(false); 105 | this.PerformLayout(); 106 | 107 | } 108 | 109 | #endregion 110 | 111 | private System.Windows.Forms.TextBox textBox1; 112 | private System.Windows.Forms.TextBox textBox2; 113 | private System.Windows.Forms.Button button1; 114 | private System.Windows.Forms.Button button2; 115 | private System.Windows.Forms.Label label1; 116 | private System.Windows.Forms.Label label2; 117 | } 118 | } 119 | 120 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Login.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace cent_auth 12 | { 13 | public partial class Login : Form 14 | { 15 | public Login() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void button1_Click(object sender, EventArgs e) 21 | { 22 | if (Auth.Login(textBox1.Text, textBox2.Text)) 23 | { 24 | if (UserInfo.Logged_In) 25 | { 26 | new Main().Show(); 27 | Hide(); 28 | } 29 | else 30 | { 31 | 32 | } 33 | } 34 | else 35 | { 36 | 37 | } 38 | } 39 | 40 | private void button2_Click(object sender, EventArgs e) 41 | { 42 | new Register().ShowDialog(); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Login.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Main.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace cent_auth 2 | { 3 | partial class Main 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label2 = new System.Windows.Forms.Label(); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.button1 = new System.Windows.Forms.Button(); 34 | this.textBox2 = new System.Windows.Forms.TextBox(); 35 | this.textBox1 = new System.Windows.Forms.TextBox(); 36 | this.SuspendLayout(); 37 | // 38 | // label2 39 | // 40 | this.label2.AutoSize = true; 41 | this.label2.Location = new System.Drawing.Point(12, 51); 42 | this.label2.Name = "label2"; 43 | this.label2.Size = new System.Drawing.Size(41, 13); 44 | this.label2.TabIndex = 10; 45 | this.label2.Text = "Token:"; 46 | // 47 | // label1 48 | // 49 | this.label1.AutoSize = true; 50 | this.label1.Location = new System.Drawing.Point(12, 9); 51 | this.label1.Name = "label1"; 52 | this.label1.Size = new System.Drawing.Size(56, 13); 53 | this.label1.TabIndex = 9; 54 | this.label1.Text = "Password:"; 55 | // 56 | // button1 57 | // 58 | this.button1.Location = new System.Drawing.Point(12, 93); 59 | this.button1.Name = "button1"; 60 | this.button1.Size = new System.Drawing.Size(100, 23); 61 | this.button1.TabIndex = 8; 62 | this.button1.Text = "redeem"; 63 | this.button1.UseVisualStyleBackColor = true; 64 | this.button1.Click += new System.EventHandler(this.button1_Click); 65 | // 66 | // textBox2 67 | // 68 | this.textBox2.Location = new System.Drawing.Point(12, 67); 69 | this.textBox2.Name = "textBox2"; 70 | this.textBox2.Size = new System.Drawing.Size(100, 20); 71 | this.textBox2.TabIndex = 7; 72 | // 73 | // textBox1 74 | // 75 | this.textBox1.Location = new System.Drawing.Point(12, 28); 76 | this.textBox1.Name = "textBox1"; 77 | this.textBox1.Size = new System.Drawing.Size(100, 20); 78 | this.textBox1.TabIndex = 6; 79 | // 80 | // Main 81 | // 82 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 83 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 84 | this.ClientSize = new System.Drawing.Size(284, 261); 85 | this.Controls.Add(this.label2); 86 | this.Controls.Add(this.label1); 87 | this.Controls.Add(this.button1); 88 | this.Controls.Add(this.textBox2); 89 | this.Controls.Add(this.textBox1); 90 | this.Name = "Main"; 91 | this.Text = "Main"; 92 | this.Load += new System.EventHandler(this.Main_Load); 93 | this.ResumeLayout(false); 94 | this.PerformLayout(); 95 | 96 | } 97 | 98 | #endregion 99 | 100 | private System.Windows.Forms.Label label2; 101 | private System.Windows.Forms.Label label1; 102 | private System.Windows.Forms.Button button1; 103 | private System.Windows.Forms.TextBox textBox2; 104 | private System.Windows.Forms.TextBox textBox1; 105 | } 106 | } -------------------------------------------------------------------------------- /Example Program/CentosAuth/Main.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace cent_auth 12 | { 13 | public partial class Main : Form 14 | { 15 | public Main() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void Main_Load(object sender, EventArgs e) 21 | { 22 | MessageBox.Show(Auth.Var("meme").ToString()); 23 | } 24 | 25 | private void button1_Click(object sender, EventArgs e) 26 | { 27 | if (Auth.Redeem_Token(UserInfo.Username, textBox1.Text, textBox2.Text)) 28 | { 29 | 30 | } 31 | else 32 | { 33 | 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Main.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace cent_auth 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | // can make it more secure having it call to the server to retrive the actual auth url 18 | // and validate the hash of the tool for example 19 | Handle.URL = "http://localhost/Auth/index.php"; 20 | Application.EnableVisualStyles(); 21 | Application.SetCompatibleTextRenderingDefault(false); 22 | Application.Run(new Login()); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("cent auth")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("cent auth")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("a29a0871-97ca-4fcc-b676-b26a9cc16324")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Properties/Resources.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace cent_auth.Properties 12 | { 13 | 14 | 15 | /// 16 | /// A strongly-typed resource class, for looking up localized strings, etc. 17 | /// 18 | // This class was auto-generated by the StronglyTypedResourceBuilder 19 | // class via a tool like ResGen or Visual Studio. 20 | // To add or remove a member, edit your .ResX file then rerun ResGen 21 | // with the /str option, or rebuild your VS project. 22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] 23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 25 | internal class Resources 26 | { 27 | 28 | private static global::System.Resources.ResourceManager resourceMan; 29 | 30 | private static global::System.Globalization.CultureInfo resourceCulture; 31 | 32 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] 33 | internal Resources() 34 | { 35 | } 36 | 37 | /// 38 | /// Returns the cached ResourceManager instance used by this class. 39 | /// 40 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 41 | internal static global::System.Resources.ResourceManager ResourceManager 42 | { 43 | get 44 | { 45 | if ((resourceMan == null)) 46 | { 47 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cent_auth.Properties.Resources", typeof(Resources).Assembly); 48 | resourceMan = temp; 49 | } 50 | return resourceMan; 51 | } 52 | } 53 | 54 | /// 55 | /// Overrides the current thread's CurrentUICulture property for all 56 | /// resource lookups using this strongly typed resource class. 57 | /// 58 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] 59 | internal static global::System.Globalization.CultureInfo Culture 60 | { 61 | get 62 | { 63 | return resourceCulture; 64 | } 65 | set 66 | { 67 | resourceCulture = value; 68 | } 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Properties/Resources.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 107 | 108 | 109 | 2.0 110 | 111 | 112 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 113 | 114 | 115 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace cent_auth.Properties 12 | { 13 | 14 | 15 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 16 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] 17 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase 18 | { 19 | 20 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 21 | 22 | public static Settings Default 23 | { 24 | get 25 | { 26 | return defaultInstance; 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Register.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace cent_auth 2 | { 3 | partial class Register 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.label2 = new System.Windows.Forms.Label(); 32 | this.label1 = new System.Windows.Forms.Label(); 33 | this.textBox2 = new System.Windows.Forms.TextBox(); 34 | this.textBox1 = new System.Windows.Forms.TextBox(); 35 | this.label3 = new System.Windows.Forms.Label(); 36 | this.textBox3 = new System.Windows.Forms.TextBox(); 37 | this.label4 = new System.Windows.Forms.Label(); 38 | this.textBox4 = new System.Windows.Forms.TextBox(); 39 | this.label5 = new System.Windows.Forms.Label(); 40 | this.textBox5 = new System.Windows.Forms.TextBox(); 41 | this.button1 = new System.Windows.Forms.Button(); 42 | this.SuspendLayout(); 43 | // 44 | // label2 45 | // 46 | this.label2.AutoSize = true; 47 | this.label2.Location = new System.Drawing.Point(12, 51); 48 | this.label2.Name = "label2"; 49 | this.label2.Size = new System.Drawing.Size(56, 13); 50 | this.label2.TabIndex = 9; 51 | this.label2.Text = "Password:"; 52 | // 53 | // label1 54 | // 55 | this.label1.AutoSize = true; 56 | this.label1.Location = new System.Drawing.Point(12, 9); 57 | this.label1.Name = "label1"; 58 | this.label1.Size = new System.Drawing.Size(58, 13); 59 | this.label1.TabIndex = 8; 60 | this.label1.Text = "Username:"; 61 | // 62 | // textBox2 63 | // 64 | this.textBox2.Location = new System.Drawing.Point(12, 67); 65 | this.textBox2.Name = "textBox2"; 66 | this.textBox2.Size = new System.Drawing.Size(100, 20); 67 | this.textBox2.TabIndex = 7; 68 | // 69 | // textBox1 70 | // 71 | this.textBox1.Location = new System.Drawing.Point(12, 28); 72 | this.textBox1.Name = "textBox1"; 73 | this.textBox1.Size = new System.Drawing.Size(100, 20); 74 | this.textBox1.TabIndex = 6; 75 | // 76 | // label3 77 | // 78 | this.label3.AutoSize = true; 79 | this.label3.Location = new System.Drawing.Point(12, 90); 80 | this.label3.Name = "label3"; 81 | this.label3.Size = new System.Drawing.Size(94, 13); 82 | this.label3.TabIndex = 11; 83 | this.label3.Text = "Repeat Password:"; 84 | // 85 | // textBox3 86 | // 87 | this.textBox3.Location = new System.Drawing.Point(12, 106); 88 | this.textBox3.Name = "textBox3"; 89 | this.textBox3.Size = new System.Drawing.Size(100, 20); 90 | this.textBox3.TabIndex = 10; 91 | // 92 | // label4 93 | // 94 | this.label4.AutoSize = true; 95 | this.label4.Location = new System.Drawing.Point(12, 129); 96 | this.label4.Name = "label4"; 97 | this.label4.Size = new System.Drawing.Size(35, 13); 98 | this.label4.TabIndex = 13; 99 | this.label4.Text = "Email:"; 100 | // 101 | // textBox4 102 | // 103 | this.textBox4.Location = new System.Drawing.Point(12, 145); 104 | this.textBox4.Name = "textBox4"; 105 | this.textBox4.Size = new System.Drawing.Size(100, 20); 106 | this.textBox4.TabIndex = 12; 107 | // 108 | // label5 109 | // 110 | this.label5.AutoSize = true; 111 | this.label5.Location = new System.Drawing.Point(12, 168); 112 | this.label5.Name = "label5"; 113 | this.label5.Size = new System.Drawing.Size(41, 13); 114 | this.label5.TabIndex = 15; 115 | this.label5.Text = "Token:"; 116 | // 117 | // textBox5 118 | // 119 | this.textBox5.Location = new System.Drawing.Point(12, 184); 120 | this.textBox5.Name = "textBox5"; 121 | this.textBox5.Size = new System.Drawing.Size(100, 20); 122 | this.textBox5.TabIndex = 14; 123 | // 124 | // button1 125 | // 126 | this.button1.Location = new System.Drawing.Point(12, 210); 127 | this.button1.Name = "button1"; 128 | this.button1.Size = new System.Drawing.Size(100, 23); 129 | this.button1.TabIndex = 16; 130 | this.button1.Text = "Register"; 131 | this.button1.UseVisualStyleBackColor = true; 132 | this.button1.Click += new System.EventHandler(this.button1_Click); 133 | // 134 | // Register 135 | // 136 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 137 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 138 | this.ClientSize = new System.Drawing.Size(284, 261); 139 | this.Controls.Add(this.button1); 140 | this.Controls.Add(this.label5); 141 | this.Controls.Add(this.textBox5); 142 | this.Controls.Add(this.label4); 143 | this.Controls.Add(this.textBox4); 144 | this.Controls.Add(this.label3); 145 | this.Controls.Add(this.textBox3); 146 | this.Controls.Add(this.label2); 147 | this.Controls.Add(this.label1); 148 | this.Controls.Add(this.textBox2); 149 | this.Controls.Add(this.textBox1); 150 | this.Name = "Register"; 151 | this.Text = "Register"; 152 | this.ResumeLayout(false); 153 | this.PerformLayout(); 154 | 155 | } 156 | 157 | #endregion 158 | 159 | private System.Windows.Forms.Label label2; 160 | private System.Windows.Forms.Label label1; 161 | private System.Windows.Forms.TextBox textBox2; 162 | private System.Windows.Forms.TextBox textBox1; 163 | private System.Windows.Forms.Label label3; 164 | private System.Windows.Forms.TextBox textBox3; 165 | private System.Windows.Forms.Label label4; 166 | private System.Windows.Forms.TextBox textBox4; 167 | private System.Windows.Forms.Label label5; 168 | private System.Windows.Forms.TextBox textBox5; 169 | private System.Windows.Forms.Button button1; 170 | } 171 | } -------------------------------------------------------------------------------- /Example Program/CentosAuth/Register.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace cent_auth 12 | { 13 | public partial class Register : Form 14 | { 15 | public Register() 16 | { 17 | InitializeComponent(); 18 | } 19 | 20 | private void button1_Click(object sender, EventArgs e) 21 | { 22 | if (Auth.Register(textBox1.Text, textBox4.Text, textBox2.Text, textBox3.Text, textBox5.Text)) 23 | { 24 | Close(); 25 | } 26 | else 27 | { 28 | 29 | } 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/Register.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/UserInfo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace cent_auth 8 | { 9 | class UserInfo 10 | { 11 | public static int ID { get; set; } 12 | public static string Username { get; set; } 13 | public static string Email { get; set; } 14 | public static string HWID { get; set; } 15 | public static string Expiry { get; set; } 16 | public static int Rank { get; set; } 17 | public static string IP { get; set; } 18 | public static bool Expired { get; set; } 19 | public static bool Logged_In { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/bin/Debug/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/bin/Debug/cent auth.exe -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/bin/Debug/cent auth.pdb -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.vshost.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/bin/Debug/cent auth.vshost.exe -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.vshost.exe.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth.vshost.exe.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/bin/Debug/cent auth_patched.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/bin/Debug/cent auth_patched.exe -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/CentosAuth.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | bde650c8f025e91ab1717637fd43357fc93fe86f 2 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/CentosAuth.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\bin\Debug\cent auth.exe.config 2 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\bin\Debug\cent auth.exe 3 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\bin\Debug\cent auth.pdb 4 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\bin\Debug\Newtonsoft.Json.dll 5 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\bin\Debug\Newtonsoft.Json.xml 6 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\CentosAuth.csprojAssemblyReference.cache 7 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent_auth.Login.resources 8 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent_auth.Main.resources 9 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent_auth.Properties.Resources.resources 10 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent_auth.Register.resources 11 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\CentosAuth.csproj.GenerateResource.cache 12 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\CentosAuth.csproj.CoreCompileInputs.cache 13 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\CentosAuth.csproj.CopyComplete 14 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent auth.exe 15 | C:\Users\jake1\Desktop\Centos Auth\Auth\CentosAuth\obj\Debug\cent auth.pdb 16 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/CentosAuth.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/CentosAuth.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/CentosAuth.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/CentosAuth.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/DesignTimeResolveAssemblyReferences.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/DesignTimeResolveAssemblyReferences.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.csproj.CoreCompileInputs.cache: -------------------------------------------------------------------------------- 1 | bde650c8f025e91ab1717637fd43357fc93fe86f 2 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.csproj.FileListAbsolute.txt: -------------------------------------------------------------------------------- 1 | F:\Resolver Related\cent auth\cent auth\bin\Debug\cent auth.exe.config 2 | F:\Resolver Related\cent auth\cent auth\bin\Debug\cent auth.exe 3 | F:\Resolver Related\cent auth\cent auth\bin\Debug\cent auth.pdb 4 | F:\Resolver Related\cent auth\cent auth\bin\Debug\Newtonsoft.Json.dll 5 | F:\Resolver Related\cent auth\cent auth\bin\Debug\Newtonsoft.Json.xml 6 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent auth.csprojResolveAssemblyReference.cache 7 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent_auth.Login.resources 8 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent_auth.Properties.Resources.resources 9 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent_auth.Register.resources 10 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent auth.csproj.GenerateResource.Cache 11 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent auth.exe 12 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent auth.pdb 13 | F:\Resolver Related\cent auth\cent auth\obj\Debug\cent_auth.Main.resources 14 | C:\Users\jake1\Desktop\cent auth\cent auth\bin\Debug\cent auth.exe.config 15 | C:\Users\jake1\Desktop\cent auth\cent auth\bin\Debug\cent auth.exe 16 | C:\Users\jake1\Desktop\cent auth\cent auth\bin\Debug\cent auth.pdb 17 | C:\Users\jake1\Desktop\cent auth\cent auth\bin\Debug\Newtonsoft.Json.dll 18 | C:\Users\jake1\Desktop\cent auth\cent auth\bin\Debug\Newtonsoft.Json.xml 19 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.csprojAssemblyReference.cache 20 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent_auth.Login.resources 21 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent_auth.Main.resources 22 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent_auth.Properties.Resources.resources 23 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent_auth.Register.resources 24 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.csproj.GenerateResource.cache 25 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.csproj.CoreCompileInputs.cache 26 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.csproj.CopyComplete 27 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.exe 28 | C:\Users\jake1\Desktop\cent auth\cent auth\obj\Debug\cent auth.pdb 29 | D:\Auth\cent auth\bin\Debug\cent auth.exe.config 30 | D:\Auth\cent auth\obj\Debug\cent auth.exe 31 | D:\Auth\cent auth\obj\Debug\cent auth.pdb 32 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\bin\Debug\cent auth.exe.config 33 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\bin\Debug\cent auth.exe 34 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\bin\Debug\cent auth.pdb 35 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\bin\Debug\Newtonsoft.Json.dll 36 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\bin\Debug\Newtonsoft.Json.xml 37 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.csprojAssemblyReference.cache 38 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent_auth.Login.resources 39 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent_auth.Main.resources 40 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent_auth.Properties.Resources.resources 41 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent_auth.Register.resources 42 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.csproj.GenerateResource.cache 43 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.csproj.CoreCompileInputs.cache 44 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.csproj.CopyComplete 45 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.exe 46 | C:\Users\jake1\Desktop\Centos Auth\Auth\cent auth\obj\Debug\cent auth.pdb 47 | -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.csproj.GenerateResource.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent auth.csproj.GenerateResource.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.csprojAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent auth.csprojAssemblyReference.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.csprojResolveAssemblyReference.cache: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent auth.csprojResolveAssemblyReference.cache -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent auth.exe -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent auth.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent auth.pdb -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent_auth.Login.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent_auth.Login.resources -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent_auth.Main.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent_auth.Main.resources -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent_auth.Properties.Resources.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent_auth.Properties.Resources.resources -------------------------------------------------------------------------------- /Example Program/CentosAuth/obj/Debug/cent_auth.Register.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/CentosAuth/obj/Debug/cent_auth.Register.resources -------------------------------------------------------------------------------- /Example Program/CentosAuth/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2007 James Newton-King 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/Newtonsoft.Json.11.0.2.nupkg -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard1.3/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/netstandard2.0/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/portable-net40+sl5+win8+wp8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /Example Program/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TrinityNET/CentosAuth/dcfb0f1f11ca9cc97423852da4bc5b140eddb244/Example Program/packages/Newtonsoft.Json.11.0.2/lib/portable-net45+win8+wp8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CentosAuth 2 | A .NET Authentication System written in C# & PHP 3 | 4 | Features: 5 | - Automatic user expiry & token redemption 6 | - End to end encryption 7 | - Server variables 8 | - Level/ranking system 9 | - Web-based management panel 10 | 11 | Created by Centos#1337 | Developer of https://trinityseal.me 12 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-time-machine --------------------------------------------------------------------------------