Pong

Indította Symple, 2017-06-25, 00:05:01

Heló, sziasztok!
Ma már nagyon nagyon nagyon sok kérdést tettem fel, viszont megint hibába ütköztem.
Szóval: Belépek a kliensbe, bejelentkezek és csak annyit kapok, hogy Kapcsolódás a szerverhez..
Az indítómban lévő pong ugyanaz mint az itt /usr/home/game/share lévő game nevű fájlban.
Kikaptam a hu kliensből a pongos indítót, átírtam ott is, és azzal ment rendesen, de az általam fordítottal meg nem. (sőt, más indítóval sem)
Nem értem, hogy ez miért lehet, és hogyan lehetne javítani..

2017-06-25, 08:14:09 #1 Utolsó szerkesztés: 2017-06-25, 08:16:24 Szerző: TrueLev
Ha a gamefájlból kivetted az improved packet encryptiont akkor az indító forrásból is ki kell.

Szerintem nem vete ki ,de nem tudja hogy a 40k-ban alapbol a packet encryption van helyete.
Ami ma meggyötör,holnap gyÅ'zni segít.

Azért gondolom hogy kivette, mert ahogy mondja Sanchez pongos indítójával felengedi.
(Vagy szerveren nem is 40k-t használ)

Idézetet írta: TrueLev Dátum 2017-06-25, 08:14:09
Ha a gamefájlból kivetted az improved packet encryptiont akkor az indító forrásból is ki kell.

én ezt megcsináltam, belép a karakter, de amint megmozdulok levág a fenébe :D
én nem ajánlom.

Mert az nem úgy van hogy csak kikommentezek 3 sort meg átírok 1-et azt jó lesz az.

2017-06-25, 16:16:25 #6 Utolsó szerkesztés: 2017-06-25, 16:18:22 Szerző: Csedwik
desc.cpp

#ifndef _IMPROVED_PACKET_ENCRYPTION_
m_bEncrypted = false;
#endif
m_pInputProcessor = &m_inputLogin;
break;

case PHASE_GAME:
case PHASE_DEAD:
#ifndef _IMPROVED_PACKET_ENCRYPTION_
m_bEncrypted = false;
#endif
m_pInputProcessor = &m_inputMain;
break;

case PHASE_AUTH:
#ifndef _IMPROVED_PACKET_ENCRYPTION_
m_bEncrypted = false;
#endif

Így nézzen ki ez a rész

packet_info.cpp
CPacketInfoCG::CPacketInfoCG()
{
Set(HEADER_CG_TEXT, sizeof(TPacketCGText), "Text", false);
Set(HEADER_CG_HANDSHAKE, sizeof(TPacketCGHandshake), "Handshake", false);
Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync", true);
Set(HEADER_CG_MARK_LOGIN, sizeof(TPacketCGMarkLogin), "MarkLogin", false);
Set(HEADER_CG_MARK_IDXLIST, sizeof(TPacketCGMarkIDXList), "MarkIdxList", false);
Set(HEADER_CG_MARK_CRCLIST, sizeof(TPacketCGMarkCRCList), "MarkCrcList", false);
Set(HEADER_CG_MARK_UPLOAD, sizeof(TPacketCGMarkUpload), "MarkUpload", false);
#ifdef _IMPROVED_PACKET_ENCRYPTION_
Set(HEADER_CG_KEY_AGREEMENT, sizeof(TPacketKeyAgreement), "KeyAgreement", false);
#endif

Set(HEADER_CG_GUILD_SYMBOL_UPLOAD, sizeof(TPacketCGGuildSymbolUpload), "SymbolUpload", false);
Set(HEADER_CG_SYMBOL_CRC, sizeof(TPacketCGSymbolCRC), "SymbolCRC", false);
Set(HEADER_CG_LOGIN, sizeof(TPacketCGLogin), "Login", true);
Set(HEADER_CG_LOGIN2, sizeof(TPacketCGLogin2), "Login2", true);
Set(HEADER_CG_LOGIN3, sizeof(TPacketCGLogin3), "Login3", true);
Set(HEADER_CG_LOGIN5_OPENID, sizeof(TPacketCGLogin5), "Login5", true); //OpenID
Set(HEADER_CG_ATTACK, sizeof(TPacketCGAttack), "Attack", true);
Set(HEADER_CG_CHAT, sizeof(TPacketCGChat), "Chat", true);
Set(HEADER_CG_WHISPER, sizeof(TPacketCGWhisper), "Whisper", true);

Set(HEADER_CG_CHARACTER_SELECT, sizeof(TPacketCGPlayerSelect), "Select", true);
Set(HEADER_CG_CHARACTER_CREATE, sizeof(TPacketCGPlayerCreate), "Create", true);
Set(HEADER_CG_CHARACTER_DELETE, sizeof(TPacketCGPlayerDelete), "Delete", true);
Set(HEADER_CG_ENTERGAME, sizeof(TPacketCGEnterGame), "EnterGame", true);

Set(HEADER_CG_ITEM_USE, sizeof(TPacketCGItemUse), "ItemUse", true);
Set(HEADER_CG_ITEM_DROP, sizeof(TPacketCGItemDrop), "ItemDrop", true);
Set(HEADER_CG_ITEM_DROP2, sizeof(TPacketCGItemDrop2), "ItemDrop2", true);
Set(HEADER_CG_ITEM_MOVE, sizeof(TPacketCGItemMove), "ItemMove", true);
Set(HEADER_CG_ITEM_PICKUP, sizeof(TPacketCGItemPickup), "ItemPickup", true);

Set(HEADER_CG_QUICKSLOT_ADD, sizeof(TPacketCGQuickslotAdd), "QuickslotAdd", true);
Set(HEADER_CG_QUICKSLOT_DEL, sizeof(TPacketCGQuickslotDel), "QuickslotDel", true);
Set(HEADER_CG_QUICKSLOT_SWAP, sizeof(TPacketCGQuickslotSwap), "QuickslotSwap", true);

Set(HEADER_CG_SHOP, sizeof(TPacketCGShop), "Shop", true);

Set(HEADER_CG_ON_CLICK, sizeof(TPacketCGOnClick), "OnClick", true);
Set(HEADER_CG_EXCHANGE, sizeof(TPacketCGExchange), "Exchange", true);
Set(HEADER_CG_CHARACTER_POSITION, sizeof(TPacketCGPosition), "Position", true);
Set(HEADER_CG_SCRIPT_ANSWER, sizeof(TPacketCGScriptAnswer), "ScriptAnswer", true);
Set(HEADER_CG_SCRIPT_BUTTON, sizeof(TPacketCGScriptButton), "ScriptButton", true);
Set(HEADER_CG_QUEST_INPUT_STRING, sizeof(TPacketCGQuestInputString), "QuestInputString", true);
Set(HEADER_CG_QUEST_CONFIRM, sizeof(TPacketCGQuestConfirm), "QuestConfirm", true);

Set(HEADER_CG_MOVE, sizeof(TPacketCGMove), "Move", true);
Set(HEADER_CG_SYNC_POSITION, sizeof(TPacketCGSyncPosition), "SyncPosition", true);

Set(HEADER_CG_FLY_TARGETING, sizeof(TPacketCGFlyTargeting), "FlyTarget", true);
Set(HEADER_CG_ADD_FLY_TARGETING, sizeof(TPacketCGFlyTargeting), "AddFlyTarget", true);
Set(HEADER_CG_SHOOT, sizeof(TPacketCGShoot), "Shoot", true);

Set(HEADER_CG_USE_SKILL, sizeof(TPacketCGUseSkill), "UseSkill", true);

Set(HEADER_CG_ITEM_USE_TO_ITEM, sizeof(TPacketCGItemUseToItem), "UseItemToItem", true);
Set(HEADER_CG_TARGET, sizeof(TPacketCGTarget), "Target", true);
Set(HEADER_CG_WARP, sizeof(TPacketCGWarp), "Warp", true);
Set(HEADER_CG_MESSENGER, sizeof(TPacketCGMessenger), "Messenger", true);

Set(HEADER_CG_PARTY_REMOVE, sizeof(TPacketCGPartyRemove), "PartyRemove", true);
Set(HEADER_CG_PARTY_INVITE, sizeof(TPacketCGPartyInvite), "PartyInvite", true);
Set(HEADER_CG_PARTY_INVITE_ANSWER, sizeof(TPacketCGPartyInviteAnswer), "PartyInviteAnswer", true);
Set(HEADER_CG_PARTY_SET_STATE, sizeof(TPacketCGPartySetState), "PartySetState", true);
Set(HEADER_CG_PARTY_USE_SKILL, sizeof(TPacketCGPartyUseSkill), "PartyUseSkill", true);
Set(HEADER_CG_PARTY_PARAMETER, sizeof(TPacketCGPartyParameter), "PartyParam", true);

Set(HEADER_CG_EMPIRE, sizeof(TPacketCGEmpire), "Empire", true);
Set(HEADER_CG_SAFEBOX_CHECKOUT, sizeof(TPacketCGSafeboxCheckout), "SafeboxCheckout", true);
Set(HEADER_CG_SAFEBOX_CHECKIN, sizeof(TPacketCGSafeboxCheckin), "SafeboxCheckin", true);

Set(HEADER_CG_SAFEBOX_ITEM_MOVE, sizeof(TPacketCGItemMove), "SafeboxItemMove", true);

Set(HEADER_CG_GUILD, sizeof(TPacketCGGuild), "Guild", true);
Set(HEADER_CG_ANSWER_MAKE_GUILD, sizeof(TPacketCGAnswerMakeGuild), "AnswerMakeGuild", true);

Set(HEADER_CG_FISHING, sizeof(TPacketCGFishing), "Fishing", true);
Set(HEADER_CG_ITEM_GIVE, sizeof(TPacketCGGiveItem), "ItemGive", true);
Set(HEADER_CG_HACK, sizeof(TPacketCGHack), "Hack", true);
Set(HEADER_CG_MYSHOP, sizeof(TPacketCGMyShop), "MyShop", true);

Set(HEADER_CG_REFINE, sizeof(TPacketCGRefine), "Refine", true);
Set(HEADER_CG_CHANGE_NAME, sizeof(TPacketCGChangeName), "ChangeName", true);

Set(HEADER_CG_CLIENT_VERSION, sizeof(TPacketCGClientVersion), "Version", true);
Set(HEADER_CG_CLIENT_VERSION2, sizeof(TPacketCGClientVersion2), "Version", true);
Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", true);
Set(HEADER_CG_MALL_CHECKOUT, sizeof(TPacketCGSafeboxCheckout), "MallCheckout", true);

Set(HEADER_CG_SCRIPT_SELECT_ITEM, sizeof(TPacketCGScriptSelectItem), "ScriptSelectItem", true);
Set(HEADER_CG_PASSPOD_ANSWER, sizeof(TPacketCGPasspod), "PasspodAnswer", true);

Set(HEADER_CG_HS_ACK, sizeof(TPacketGCHSCheck), "HackShieldResponse", false);
Set(HEADER_CG_XTRAP_ACK, sizeof(TPacketXTrapCSVerify), "XTrapResponse", false);
Set(HEADER_CG_DRAGON_SOUL_REFINE, sizeof(TPacketCGDragonSoulRefine), "DragonSoulRefine", false);
Set(HEADER_CG_STATE_CHECKER, sizeof(BYTE), "ServerStateCheck", false);
}


Ezt a részt így írd át:
CPacketInfoCG::CPacketInfoCG()
{
Set(HEADER_CG_TEXT, sizeof(TPacketCGText), "Text", false);
Set(HEADER_CG_HANDSHAKE, sizeof(TPacketCGHandshake), "Handshake", false);
Set(HEADER_CG_TIME_SYNC, sizeof(TPacketCGHandshake), "TimeSync", false);
Set(HEADER_CG_MARK_LOGIN, sizeof(TPacketCGMarkLogin), "MarkLogin", false);
Set(HEADER_CG_MARK_IDXLIST, sizeof(TPacketCGMarkIDXList), "MarkIdxList", false);
Set(HEADER_CG_MARK_CRCLIST, sizeof(TPacketCGMarkCRCList), "MarkCrcList", false);
Set(HEADER_CG_MARK_UPLOAD, sizeof(TPacketCGMarkUpload), "MarkUpload", false);
#ifdef _IMPROVED_PACKET_ENCRYPTION_
Set(HEADER_CG_KEY_AGREEMENT, sizeof(TPacketKeyAgreement), "KeyAgreement", false);
#endif

Set(HEADER_CG_GUILD_SYMBOL_UPLOAD, sizeof(TPacketCGGuildSymbolUpload), "SymbolUpload", false);
Set(HEADER_CG_SYMBOL_CRC, sizeof(TPacketCGSymbolCRC), "SymbolCRC", false);
Set(HEADER_CG_LOGIN, sizeof(TPacketCGLogin), "Login", false);
Set(HEADER_CG_LOGIN2, sizeof(TPacketCGLogin2), "Login2", false);
Set(HEADER_CG_LOGIN3, sizeof(TPacketCGLogin3), "Login3", false);
Set(HEADER_CG_LOGIN5_OPENID, sizeof(TPacketCGLogin5), "Login5", false); //OpenID
Set(HEADER_CG_ATTACK, sizeof(TPacketCGAttack), "Attack", false);
Set(HEADER_CG_CHAT, sizeof(TPacketCGChat), "Chat", false);
Set(HEADER_CG_WHISPER, sizeof(TPacketCGWhisper), "Whisper", false);

Set(HEADER_CG_CHARACTER_SELECT, sizeof(TPacketCGPlayerSelect), "Select", false);
Set(HEADER_CG_CHARACTER_CREATE, sizeof(TPacketCGPlayerCreate), "Create", false);
Set(HEADER_CG_CHARACTER_DELETE, sizeof(TPacketCGPlayerDelete), "Delete", false);
Set(HEADER_CG_ENTERGAME, sizeof(TPacketCGEnterGame), "EnterGame", false);

Set(HEADER_CG_ITEM_USE, sizeof(TPacketCGItemUse), "ItemUse", false);
Set(HEADER_CG_ITEM_DROP, sizeof(TPacketCGItemDrop), "ItemDrop", false);
Set(HEADER_CG_ITEM_DROP2, sizeof(TPacketCGItemDrop2), "ItemDrop2", false);
Set(HEADER_CG_ITEM_MOVE, sizeof(TPacketCGItemMove), "ItemMove", false);
Set(HEADER_CG_ITEM_PICKUP, sizeof(TPacketCGItemPickup), "ItemPickup", false);

Set(HEADER_CG_QUICKSLOT_ADD, sizeof(TPacketCGQuickslotAdd), "QuickslotAdd", false);
Set(HEADER_CG_QUICKSLOT_DEL, sizeof(TPacketCGQuickslotDel), "QuickslotDel", false);
Set(HEADER_CG_QUICKSLOT_SWAP, sizeof(TPacketCGQuickslotSwap), "QuickslotSwap", false);

Set(HEADER_CG_SHOP, sizeof(TPacketCGShop), "Shop", false);

Set(HEADER_CG_ON_CLICK, sizeof(TPacketCGOnClick), "OnClick", false);
Set(HEADER_CG_EXCHANGE, sizeof(TPacketCGExchange), "Exchange", false);
Set(HEADER_CG_CHARACTER_POSITION, sizeof(TPacketCGPosition), "Position", false);
Set(HEADER_CG_SCRIPT_ANSWER, sizeof(TPacketCGScriptAnswer), "ScriptAnswer", false);
Set(HEADER_CG_SCRIPT_BUTTON, sizeof(TPacketCGScriptButton), "ScriptButton", false);
Set(HEADER_CG_QUEST_INPUT_STRING, sizeof(TPacketCGQuestInputString), "QuestInputString", false);
Set(HEADER_CG_QUEST_CONFIRM, sizeof(TPacketCGQuestConfirm), "QuestConfirm", false);

Set(HEADER_CG_MOVE, sizeof(TPacketCGMove), "Move", false);
Set(HEADER_CG_SYNC_POSITION, sizeof(TPacketCGSyncPosition), "SyncPosition", false);

Set(HEADER_CG_FLY_TARGETING, sizeof(TPacketCGFlyTargeting), "FlyTarget", false);
Set(HEADER_CG_ADD_FLY_TARGETING, sizeof(TPacketCGFlyTargeting), "AddFlyTarget", false);
Set(HEADER_CG_SHOOT, sizeof(TPacketCGShoot), "Shoot", false);

Set(HEADER_CG_USE_SKILL, sizeof(TPacketCGUseSkill), "UseSkill", false);

Set(HEADER_CG_ITEM_USE_TO_ITEM, sizeof(TPacketCGItemUseToItem), "UseItemToItem", false);
Set(HEADER_CG_TARGET, sizeof(TPacketCGTarget), "Target", false);
Set(HEADER_CG_WARP, sizeof(TPacketCGWarp), "Warp", false);
Set(HEADER_CG_MESSENGER, sizeof(TPacketCGMessenger), "Messenger", false);

Set(HEADER_CG_PARTY_REMOVE, sizeof(TPacketCGPartyRemove), "PartyRemove", false);
Set(HEADER_CG_PARTY_INVITE, sizeof(TPacketCGPartyInvite), "PartyInvite", false);
Set(HEADER_CG_PARTY_INVITE_ANSWER, sizeof(TPacketCGPartyInviteAnswer), "PartyInviteAnswer", false);
Set(HEADER_CG_PARTY_SET_STATE, sizeof(TPacketCGPartySetState), "PartySetState", false);
Set(HEADER_CG_PARTY_USE_SKILL, sizeof(TPacketCGPartyUseSkill), "PartyUseSkill", false);
Set(HEADER_CG_PARTY_PARAMETER, sizeof(TPacketCGPartyParameter), "PartyParam", false);

Set(HEADER_CG_EMPIRE, sizeof(TPacketCGEmpire), "Empire", false);
Set(HEADER_CG_SAFEBOX_CHECKOUT, sizeof(TPacketCGSafeboxCheckout), "SafeboxCheckout", false);
Set(HEADER_CG_SAFEBOX_CHECKIN, sizeof(TPacketCGSafeboxCheckin), "SafeboxCheckin", false);

Set(HEADER_CG_SAFEBOX_ITEM_MOVE, sizeof(TPacketCGItemMove), "SafeboxItemMove", false);

Set(HEADER_CG_GUILD, sizeof(TPacketCGGuild), "Guild", false);
Set(HEADER_CG_ANSWER_MAKE_GUILD, sizeof(TPacketCGAnswerMakeGuild), "AnswerMakeGuild", false);

Set(HEADER_CG_FISHING, sizeof(TPacketCGFishing), "Fishing", false);
Set(HEADER_CG_ITEM_GIVE, sizeof(TPacketCGGiveItem), "ItemGive", false);
Set(HEADER_CG_HACK, sizeof(TPacketCGHack), "Hack", false);
Set(HEADER_CG_MYSHOP, sizeof(TPacketCGMyShop), "MyShop", false);

Set(HEADER_CG_REFINE, sizeof(TPacketCGRefine), "Refine", false);
Set(HEADER_CG_CHANGE_NAME, sizeof(TPacketCGChangeName), "ChangeName", false);

Set(HEADER_CG_CLIENT_VERSION, sizeof(TPacketCGClientVersion), "Version", false);
Set(HEADER_CG_CLIENT_VERSION2, sizeof(TPacketCGClientVersion2), "Version", false);
Set(HEADER_CG_PONG, sizeof(BYTE), "Pong", false);
Set(HEADER_CG_MALL_CHECKOUT, sizeof(TPacketCGSafeboxCheckout), "MallCheckout", false);

Set(HEADER_CG_SCRIPT_SELECT_ITEM, sizeof(TPacketCGScriptSelectItem), "ScriptSelectItem", false);
Set(HEADER_CG_PASSPOD_ANSWER, sizeof(TPacketCGPasspod), "PasspodAnswer", false);

Set(HEADER_CG_HS_ACK, sizeof(TPacketGCHSCheck), "HackShieldResponse", false);
Set(HEADER_CG_XTRAP_ACK, sizeof(TPacketXTrapCSVerify), "XTrapResponse", false);
Set(HEADER_CG_DRAGON_SOUL_REFINE, sizeof(TPacketCGDragonSoulRefine), "DragonSoulRefine", false);
Set(HEADER_CG_STATE_CHECKER, sizeof(BYTE), "ServerStateCheck", false);
}


service.h
#define _IMPROVED_PACKET_ENCRYPTION_
kommenteld ki

Bin/eterbase/ServiceDefs.h
#define _IMPROVED_PACKET_ENCRYPTION_
kikommenteled

AccountConnector.cpp if (IsSecurityMode())
return SendSequence();

kikommenteled

GuildMarkDownloader.cpp
if (IsSecurityMode())
return SendSequence();
else

kommenteld ki

GuildMarkUploader.cpp
if (IsSecurityMode())
return SendSequence();
else

kommenteld ki

PythonNetworkStream.cpp
if (IsSecurityMode())
return SendSequence();
else

kommenteld ki

eterlib/NetStream.cpp
ezt
void CNetworkStream::SetSecurityMode(bool isSecurityMode, const char* c_szTeaKey)
{
m_isSecurityMode = isSecurityMode;
memcpy(m_szEncryptKey, c_szTeaKey, TEA_KEY_LENGTH);
memcpy(m_szDecryptKey, c_szTeaKey, TEA_KEY_LENGTH);
}

átírod így:void CNetworkStream::SetSecurityMode(bool isSecurityMode, const char* c_szTeaKey)
{
/*m_isSecurityMode = isSecurityMode;
memcpy(m_szEncryptKey, c_szTeaKey, TEA_KEY_LENGTH);
memcpy(m_szDecryptKey, c_szTeaKey, TEA_KEY_LENGTH);*/
}

Ennél megcsinálod ugyan ezt a kikommentelést
void CNetworkStream::SetSecurityMode(bool isSecurityMode, const char* c_szTeaEncryptKey, const char* c_szTeaDecryptKey)
{
m_isSecurityMode = isSecurityMode;
memcpy(m_szEncryptKey, c_szTeaEncryptKey, TEA_KEY_LENGTH);
memcpy(m_szDecryptKey, c_szTeaDecryptKey, TEA_KEY_LENGTH);
}

Keresd ugyan abban a fájlban
m_bUseSequence = isOn;
kommenteld ki

Skype:Csedwik

2017-06-25, 16:20:38 #7 Utolsó szerkesztés: 2017-06-25, 17:02:00 Szerző: TrueLev
Én csak annyit csinálltam amit deven írtak, nálam működik, nem dob le.
Teljes clean és rebuild kell neki szerintem, db-t sem árt újrafordítani a common miatt.
(Bár én csak tesztként tettem be, nem hinném hogy élesbe használnám ezt.)