diff --git a/ProjectLighthouse/Types/LoginData.cs b/ProjectLighthouse/Types/LoginData.cs index 7cb1b5ff..256fb2c9 100644 --- a/ProjectLighthouse/Types/LoginData.cs +++ b/ProjectLighthouse/Types/LoginData.cs @@ -11,6 +11,7 @@ namespace LBPUnion.ProjectLighthouse.Types { // - LBP2 digital, with the RPCN username `jvyden` // POST /LITTLEBIGPLANETPS3_XML/login?applicationID=21414&languageID=1&lbp2=1&beta=0&titleID=NPUA80662&country=us // !�0220333||/u||=0� jvydebruUP9000-NPUA80662_008D + // Data is 251 bytes long. /// /// The data sent from POST /LOGIN. /// @@ -20,20 +21,14 @@ namespace LBPUnion.ProjectLighthouse.Types { // public int UnknownNumber { get; set; } // Seems to increment by 1000 every login attempt public static LoginData CreateFromString(string str) { - do { - str = str.Replace("\b", string.Empty); // Trim backspace characters - } while(str.Contains('\b')); + str = str.Replace("\b", ""); // Remove backspace characters using MemoryStream ms = new(Encoding.ASCII.GetBytes(str)); using BinaryReader reader = new(ms); LoginData loginData = new(); - - BinaryHelper.ReadUntilByte(reader, 0x20); // Skips to relevant part - -// byte[] endBytes = reader.ReadBytes((int)(ms.Length - reader.BaseStream.Position)); -// string end = Encoding.ASCII.GetString(endBytes); + reader.BaseStream.Position = 80; loginData.Username = BinaryHelper.ReadString(reader).Replace("\0", string.Empty); return loginData;