Register for your free account! | Forgot your password?

You last visited: Today at 15:07

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Rigester page

Discussion on Rigester page within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
{ Angelius }'s Avatar
 
elite*gold: 0
Join Date: Aug 2010
Posts: 992
Received Thanks: 1,110
Question Rigester page

hello everyone

i have a nooby question though but that question took 5 long days of searching and looking testing bla bla to find the answer but still i couldent find it so i need your help guys .and the question is .
how come every time i try to create a user using the register page that i have and than try to log in the game it dosent work but if i created an acc using the /newacc thing it works fine the

this is the error message that appears every time i use the register page acc


here is the thing when i open the new acc that i made using the Rpage with a notepad the password in side that file is goona look like this



with the /newacc it looks like this


and another example
with Rpage


with the /newacc thing


i think its the way the COserver generate and crypt the passwords to the .usr files but i cant get to make the Register page generate the same password to the .usr file or the Game to read the passwords form the register page
the Register page code
Code:
<?php
  define ("MaxNameLength", 32);
  define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
  define ("AccountFilesPath", "C:\OldCODB\Users\\");
  define ("AccountFilesEnding", ".usr");
?>
<html>
<head>
</head>
  <body><body bgcolor="Black"> 
  <body text="Red"
    <h1><center></center></h1>
    
    <?php // New Account?
      if(isset($_POST["account"]["password"])) {
        // Variables
        $Account = $_POST["account"];
        $Password = $_POST["password"];
        $Password2 = $_POST["password2"];
        $AllRight = True;
        if($Password == $Password2){
           $NewPass = $Password;
        // Wrong Chars?
        For ($I=0; $I<StrLen(WrongChars); $I++) {
          If (StrPos($Account, SubStr(WrongChars,$I,1))) {
            Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
            $AllRight = False;

          }
        }
        
        // File Exists?
        If (file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
          Echo "<p>This Account already exists!</p>";
          $AllRight = False;
        }

        
        // All Right?
        If ($AllRight) {


          // File-Data
           $CrankKey = "CrankCo\n";
           $CrankCoPass = "$Password ";
          
           $Text .= " $Password ";
          
          
          // Create File
          File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $CrankCoKey); //key
 File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $CrankCoPass, FILE_APPEND); //password
          
          // Check File
          if(!file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
            echo "<p>Error!</p>";
          }
          
          echo "<p>The account was created succesfully!</p>";
        }
}
else
echo "The two passwords you typed are not the same.";
      }
    ?>
<center></FONT>
    <form action="" method=post>
<label for="name">Account:<div></label> <input type=text id="name" name="account" size=20 maxlength=10/>
<br>
<label for="name">Password:<div></label> <input type=password id="password" name="password" size=20 maxlength=14/>
<br>
<label for="name">Retype password:<div></label> <input type=password id="password" name="password2" size=20 maxlength=14 />
<br>
<button type="submit">Register</button>
    </form>
</body>


</center>
</html>
and the database code to create acc
Code:
        public static Main.AuthWorker.AuthInfo Authenticate(string User, string Password)
        {
            Main.AuthWorker.AuthInfo Info = new NewestCOServer.Main.AuthWorker.AuthInfo();
            Info.Account = User;

            try
            {
                while (File.Exists(@"C:\OldCODB\Users\" + User + ".usr"))
                {
                    StreamReader SR = new StreamReader(@"C:\OldCODB\Users\" + User + ".usr");
                    if (SR.ReadLine().Equals("CrankCo"))
                    {
                        string _pass = SR.ReadLine();
                        SR.Close();
                        File.Delete(@"C:\OldCODB\Users\" + User + ".usr");
                        CreateAccount(User, _pass, "");
                    }
                    else
                    {
                        SR.Close();
                    }
                    FileStream FS = new FileStream(@"C:\OldCODB\Users\" + User + ".usr", FileMode.Open);
                    BinaryReader BR = new BinaryReader(FS);
                    string RealPassword = Main.PassCrypto.EncryptPassword(Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte())));
                    string[] FileCaseSensitive = Directory.GetFiles(@"C:\OldCODB\Users\", User + ".usr");
                    string RealAccount = Path.GetFileNameWithoutExtension(FileCaseSensitive[0]);
                    if (RealPassword == Password && RealAccount == User)
                    {
                        Info.Status = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
                        Info.Character = "";
                        if (BR.BaseStream.Position != BR.BaseStream.Length)
                        {
                            byte len = BR.ReadByte();
                            Info.Character = Encoding.ASCII.GetString(BR.ReadBytes(len));
                        }

                        if (Info.Character == "")
                            Info.LogonType = 2;
                        else
                            Info.LogonType = 1;
                        if (CheckBan(RealAccount))
                            Info.LogonType = 3;
                    }
                    else
                        Info.LogonType = 255;
                    BR.Close();
                    FS.Close();

                    return Info;
                }
                Info.LogonType = 255;
            }
            catch (Exception Exc) { Console.WriteLine(Exc); }
            return Info;
        }
        public static void CreateAccount(string Name, string Password, string Status)
        {
            if (!File.Exists(@"C:\OldCODB\Users\" + Name + ".usr"))
            {
                FileStream FS = new FileStream(@"C:\OldCODB\Users\" + Name + ".usr", FileMode.CreateNew);
                BinaryWriter BW = new BinaryWriter(FS);
                BW.Write(Password);
                BW.Write(Status);
                BW.Close();
                FS.Close();
            }
        }
what im asking here is a way to make the Register page generate the same password that the newestcoserver dose and to get to the game reading it with out freezing or any wrong passwords messages
idk is some one can fix my Register page code but any help well be appreciated
thanks for your time guys
{ Angelius } is offline  
Old 09/15/2010, 10:13   #2
 
elite*gold: 0
Join Date: Aug 2010
Posts: 452
Received Thanks: 75
Quote:
Originally Posted by { Angelius } View Post



with the /newacc it looks like this


and another example
with Rpage


with the /newacc thing
The wierd signs u see, is because is wirrten in binary.


U can't edit the file directly, u have to use a binaryreader.
dowhatuwant is offline  
Reply


Similar Threads Similar Threads
Problem With The Rigester SWSRO
04/18/2010 - SRO Private Server - 5 Replies
I paid to them and i told them to register 2 accounts for me now i already waiting like 9 hours and didn't register me and no i send them the ID and pass so i dont have to get a code to the email so someone know when will they register me ?? i cant wait to play for godsaick:mofo:
Problem With The Rigester SWSRO
04/18/2010 - SRO Private Server - 0 Replies
I paid to them and i told them to register 2 accounts for me now i already waiting like 9 hours and didn't register me and no i send them the ID and pass so i dont have to get a code to the email so someone know when will they register me ?? i cant wait to play for godsaick:mofo:
We need reg page!
03/20/2010 - Silkroad Online - 3 Replies
i wanna play the server but i cant cuz i dont have account plz tell me the reg page and if works pm me plox!! I wanna playy
Reg-Page
12/19/2009 - Metin2 Private Server - 12 Replies
Morgen, mein Server läuft über Hamachi undso, nur ich möchte keine Accounts manuell über die Database machen. Also hab ich mir gedacht: Machste eine Registrierungspage ! Diese funktioniert aber nicht, da Apache in Xampp nicht starten will. Kann sich das jemand per Teamviewer genauer anschauen? Wäre sehr nett. Wer nur im Thread posten will, für den hab ich hier das Problem : http://1click-image.de/user/image/810179726.jpg



All times are GMT +1. The time now is 15:08.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.