Example #1
0
void DumpPacket(const ServerPacket* pack, bool iShowInfo) {
	if (iShowInfo) {
		std::cout << "Dumping ServerPacket: 0x" << std::hex << std::setfill('0') << std::setw(4) << pack->opcode << std::dec;
		std::cout << " size:" << pack->size << std::endl;
	}
	DumpPacketHex(pack->pBuffer, pack->size);
}
Example #2
0
void DumpPacket(const EQApplicationPacket* app, bool iShowInfo) {
    if (iShowInfo) {
        std::cout << "Dumping Applayer: 0x" << std::hex << std::setfill('0') << std::setw(4) << app->GetOpcode() << std::dec;
        std::cout << " size:" << app->size << std::endl;
    }
    DumpPacketHex(app->pBuffer, app->size);
//	DumpPacketAscii(app->pBuffer, app->size);
}
		void LoginServer::ProcessServerOP_LSClientAuth(ServerPacket* pack)
		{
			if (pack->size != sizeof(ServerLSClientAuth)) 
			{
				DumpPacketHex(pack->pBuffer, pack->size);
				cout << "Wrong size on ServerOP_LSClientAuth. Got: " << pack->size << ", Expected: " << sizeof(ServerLSClientAuth) << endl;
			} 
			else
			{
				ServerLSClientAuth* slsca = (ServerLSClientAuth*)pack->pBuffer;
				LSAuth_Struct* lsa = new LSAuth_Struct;
				memset(lsa, 0, sizeof(LSAuth_Struct));
				lsa->lsaccount_id = slsca->lsaccount_id;
				strncpy(lsa->name, slsca->name, 18);
				strncpy(lsa->key, slsca->key, 15);
				lsa->stale = false;
				lsa->inuse = true;
				lsa->firstconnect = true;
				this->AddAuth(lsa);
			}
		}
Example #4
0
void DumpPacketHex(const BasePacket* app)
{
	DumpPacketHex(app->pBuffer, app->size);
}
Example #5
0
void DumpPacket(const uchar* buf, uint32 size)
{
	DumpPacketHex(buf, size);
//	DumpPacketAscii(buf,size);
}