Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 10:01

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

Advertisement



NosTale Auth Cryptographie

Discussion on NosTale Auth Cryptographie within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
Irelia<3's Avatar
 
elite*gold: 0
Join Date: Sep 2018
Posts: 245
Received Thanks: 59
NosTale Auth Cryptographie

Ich hab ein Problem der Client verbindet sich nicht mit dem Server aber der Login Server kann auf meine Pakete antworten. Jetzt ist die frage woran es liegt. Ich habe dass momentan.

TypedCredentialsLogin0577Packet.cs

using System;
using System.Linq;
using System.Threading.Tasks;
using LoginServer.Network;
using PhoenixLib.Logging;
using PhoenixLib.MultiLanguage;
using WingsAPI.Communication;
using WingsAPI.Communication.DbServer.AccountService;
using WingsAPI.Communication.ServerApi;
using WingsAPI.Communication.ServerApi.Protocol;
using WingsAPI.Communication.Sessions;
using WingsAPI.Communication.Sessions.Model;
using WingsAPI.Communication.Sessions.Request;
using WingsAPI.Communication.Sessions.Response;
using WingsAPI.Data.Account;
using WingsEmu.DTOs.Account;
using WingsEmu.Health;
using WingsEmu.Packets.ClientPackets;
using WingsEmu.Packets.Enums;

namespace LoginServer.Handlers
{
public class TypedCredentialsLogin0577PacketHandler : GenericLoginPacketHandlerBase<Nos0577Packet>
{
private readonly IAccountService _accountService;
private readonly IMaintenanceManager _maintenanceManager;
private readonly IServerApiService _serverApiService;
private readonly ISessionService _sessionService;

public TypedCredentialsLogin0577PacketHandler(ISessionSer vice sessionService, IServerApiService serverApiService, IMaintenanceManager maintenanceManager, IAccountService accountService)
{
_sessionService = sessionService;
_serverApiService = serverApiService;
_maintenanceManager = maintenanceManager;
_accountService = accountService;
}

protected override async Task HandlePacketAsync(LoginClientSession session, Nos0577Packet packet)
{
if (packet == null)
{
return;
}

AccountLoadResponse accountLoadResponse = null;
try
{
accountLoadResponse = await _accountService.LoadAccountByName(new AccountLoadByNameRequest
{
Name = packet.Name
});
}
catch (Exception e)
{
Log.Error("[NEW_TYPED_AUTH_0577] Unexpected error: ", e);
}

if (accountLoadResponse?.ResponseType != RpcResponseType.SUCCESS)
{
Log.Warn($"[NEW_TYPED_AUTH_0577] Failed to load account for accountName: '{packet.Name}'");
session.SendPacket(session.GenerateFailcPacket(Log inFailType.AccountOrPasswordWrong));
session.Disconnect();
return;
}

AccountDTO loadedAccount = accountLoadResponse.AccountDto;
if (!string.Equals(loadedAccount.Password, packet.Password, StringComparison.CurrentCultureIgnoreCase))
{
session.SendPacket(session.GenerateFailcPacket(Log inFailType.AccountOrPasswordWrong));
Log.Debug($"[NEW_TYPED_AUTH_0577] WRONG_CREDENTIALS : {loadedAccount.Name}");
session.Disconnect();
return;
}

SessionResponse modelResponse = await _sessionService.CreateSession(new CreateSessionRequest
{
AccountId = loadedAccount.Id,
AccountName = loadedAccount.Name,
AuthorityType = loadedAccount.Authority,
IpAddress = session.IpAddress
});

if (modelResponse.ResponseType != RpcResponseType.SUCCESS)
{
Log.Debug($"[NEW_TYPED_AUTH_0577] FAILED TO CREATE SESSION {loadedAccount.Id}");
session.SendPacket(session.GenerateFailcPacket(Log inFailType.AlreadyConnected));
session.Disconnect();
return;
}

AuthorityType type = loadedAccount.Authority;

AccountBanGetResponse banResponse = null;
try
{
banResponse = await _accountService.GetAccountBan(new AccountBanGetRequest
{
AccountId = loadedAccount.Id
});
}
catch (Exception e)
{
Log.Error("[NEW_TYPED_AUTH_0577] Unexpected error: ", e);
}

if (banResponse?.ResponseType != RpcResponseType.SUCCESS)
{
Log.Warn($"[NEW_TYPED_AUTH_0577] Failed to get account ban for accountId: '{loadedAccount.Id}'");
session.SendPacket(session.GenerateFailcPacket(Log inFailType.UnhandledError));
session.Disconnect();
return;
}

AccountBanDto characterPenalty = banResponse.AccountBanDto;
if (characterPenalty != null)
{
session.SendPacket(session.GenerateFailcPacket(Log inFailType.Banned));
Log.Debug($"[NEW_TYPED_AUTH_0577] ACCOUNT_BANNED : {loadedAccount.Name}");
session.Disconnect();
return;
}

switch (type)
{
case AuthorityType.Banned:
session.SendPacket(session.GenerateFailcPacket(Log inFailType.Banned));
Log.Debug("[NEW_TYPED_AUTH_0577] ACCOUNT_BANNED");
session.Disconnect();
break;

case AuthorityType.Unconfirmed:
case AuthorityType.Closed:
session.SendPacket(session.GenerateFailcPacket(Log inFailType.CantConnect));
Log.Debug("[NEW_TYPED_AUTH_0577] ACCOUNT_NOT_VERIFIED");
session.Disconnect();
break;

default:
if (_maintenanceManager.IsMaintenanceActive && loadedAccount.Authority < AuthorityType.GameMaster)
{
session.SendPacket(session.GenerateFailcPacket(Log inFailType.Maintenance));
return;
}

SessionResponse connectResponse = await _sessionService.ConnectToLoginServer(new ConnectToLoginServerRequest
{
AccountId = loadedAccount.Id,
ClientVersion = "BYPASS",
HardwareId = "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca 495991b7852b855"
});

if (connectResponse.ResponseType != RpcResponseType.SUCCESS)
{
Log.Warn("[NEW_TYPED_AUTH_0577] General Error SessionId: " + session.Id);
session.SendPacket(session.GenerateFailcPacket(Log inFailType.CantConnect));
session.Disconnect();
return;
}

Session connectedSession = connectResponse.Session;

Log.Debug($"[NEW_TYPED_AUTH_0577] Connected : {packet.Name}:{connectedSession.EncryptionKey}:{co nnectedSession.HardwareId}");

RetrieveRegisteredWorldServersResponse worldServersResponse = await _serverApiService.RetrieveRegisteredWorldServers(n ew RetrieveRegisteredWorldServersRequest
{
RequesterAuthority = loadedAccount.Authority
});

if (worldServersResponse?.WorldServers is null || !worldServersResponse.WorldServers.Any())
{
session.SendPacket(session.GenerateFailcPacket(Log inFailType.Maintenance));
session.Disconnect();
return;
}

session.SendChannelPacketList(connectedSession.Enc ryptionKey, loadedAccount.Name, RegionLanguageType.EN, worldServersResponse.WorldServers, true);
session.Disconnect();
break;
}
}
}
}

Nos0577Packet.cs


namespace WingsEmu.Packets.ClientPackets
{
[PacketHeader("NoS0577")]
public class Nos0577Packet : ClientPacket
{
[PacketIndex(0)]
public int Number { get; set; }

[PacketIndex(1)]
public string Name { get; set; }

[PacketIndex(2)]
public string Password { get; set; }

[PacketIndex(3)]
public string ClientData { get; set; }

[PacketIndex(4)]
public string AuthCode { get; set; }
}
}
Irelia<3 is offline  
Reply


Similar Threads Similar Threads
Verkaufe Rsbot-net Auth's/Sell Rsbot net Auth's for RSGP 5-8 mil ea!!!
06/26/2011 - Runescape Trading - 3 Replies
German: Heyho ich verkaufe euch Authcodes für RSbot.net und zwar für Die Scripts Auto soulwars pro und auto fighter pro Auto soulwars kostet 8 millionen RSGP Auto Fighter kostet 5 millionen RSGP Bei Trustet mitgliedern gebe ich zuerst
Selling Runescape Both Auth Codes Only 5$ each for ANY auth regular price is 10$-30$
02/19/2011 - Runescape Trading - 5 Replies
Any auth code is 5$ send me a Pm or leave a post to tell me which ones you would like http://img260.imageshack.us/img260/2675/runescapea uths.png
hab in auth ordner usr/rain/auth den kompletten inhalt gelöscht
04/09/2010 - Metin2 Private Server - 2 Replies
hi ich hab in auth ordner also usr/rain/auth den kompletten inhalt gelöscht und eine datei erstellt mit #!/bin/sh ./auth sleep 60*5 ./auth.sh nochmal ne kurzfassung: ich hab versucht den login bug zu fixxen bin in /usr/rain/auth und hab dort alles gelöscht
Auth Pack: Auth Request
12/23/2009 - CO2 Private Server - 8 Replies
I know this pops up often, and I've searched everywhere for an answer, only to not get one. I've scanned over this site, as well as 4botters for an answer, and every one of them, didn't help. I'm trying to run a 4267 server with source, and so far, this is the biggest issue. I've spent several days of scanning google for this one issue for several hours at a time now. I've changed the IP from my server to everything from my Hamachi, my router, my default gateway, and my internal (I think...



All times are GMT +1. The time now is 10:01.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

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