- Mesaj
- 357
- Çözümler
- 3
- Beğeni
- 249
- Puan
- 764
- Ticaret Puanı
- 0
input_auth.cpp aç ve arat
burayı bul
düzenle
altına ekle
main.cpp aç
altında bul
"-t : traffic proflie on\n"
bununla değiştir
arat
değiştir
arat
altına ekle
C++:
case HEADER_CG_LOGIN3:
Login(d, c_pData);
burayı bul
C++:
case HEADER_CG_HANDSHAKE:
break;
düzenle
C++:
case HEADER_CG_KEY_AGREEMENT:
Handshake(d, c_pData);
break;
C++:
#ifdef _IMPROVED_PACKET_ENCRYPTION_
case HEADER_CG_KEY_AGREEMENT:
{
TPacketKeyAgreement* p = (TPacketKeyAgreement*) c_pData;
d->SendKeyAgreementCompleted();
d->ProcessOutput();
if (!d->IsCipherPrepared())
{
sys_err ("Cipher isn't prepared. %s maybe a Hacker.", inet_ntoa(d->GetAddr().sin_addr));
d->DelayedDisconnect(5);
break;
}
if (d->FinishHandshake(p->wAgreedLength, p->data, p->wDataLength))
{
d->SetPhase(PHASE_AUTH);
}
else
{
sys_log(0, "[CInputAuth] Key agreement failed: al=%u dl=%u",
p->wAgreedLength, p->wDataLength);
d->SetPhase(PHASE_CLOSE);
}
break;
}
#endif
main.cpp aç
Kod:
ITEM_MANAGER::instance().Update();
altında bul
"-t : traffic proflie on\n"
bununla değiştir
Kod:
"-t : traffic proflie on\n"
"-a : run in auth-server mode (forces PHASE_AUTH)\n"
"-A <ip:port>: configure auth master endpoint and enable auth mode\n");
arat
C++:
while ((ch = getopt(argc, argv, "npverltI")) != -1)
değiştir
C++:
while ((ch = getopt(argc, argv, "npverltIaA:")) != -1)
arat
Kod:
// END_OF_TRAFFIC_PROFILER
altına ekle
C++:
case 'a':
g_bAuthServer = true;
printf("Auth server mode enabled (command-line)\n");
break;
case 'A':
{
if (optind < argc)
{
std::string authOpt = argv[optind++];
size_t colonPos = authOpt.find(':');
if (colonPos == std::string::npos)
{
fprintf(stderr, "-A requires <ip:port>\n");
return 0;
}
g_bAuthServer = true;
g_stAuthMasterIP = authOpt.substr(0, colonPos);
str_to_number(g_wAuthMasterPort, authOpt.c_str() + colonPos + 1);
printf("Auth master %s:%u (command-line)\n", g_stAuthMasterIP.c_str(), g_wAuthMasterPort);
optreset = 1;
}
}
break;