Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
80
Server/NFAuthTool/AuthTest/AuthTest.cpp
Normal file
80
Server/NFAuthTool/AuthTest/AuthTest.cpp
Normal file
@@ -0,0 +1,80 @@
|
||||
// AuthTest.cpp : 콘솔 응용 프로그램에 대한 진입점을 정의합니다.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "../NFAuthClient/AuthClient.h"
|
||||
#include <conio.h>
|
||||
|
||||
void ShowHelp()
|
||||
{
|
||||
printf("\n--------------------------------\n");
|
||||
printf("H : help\n");
|
||||
printf("H : help\n");
|
||||
printf("Q : quit\n");
|
||||
printf("S : Send IRC Packet\n");
|
||||
printf("A : Send Auth Packet\n");
|
||||
printf("--------------------------------\n");
|
||||
}
|
||||
|
||||
int main(int argc, CHAR* argv[])
|
||||
{
|
||||
char strMD5[40];
|
||||
GetMD5(argv[0], strMD5);
|
||||
printf(strMD5);
|
||||
printf("\n");
|
||||
|
||||
CPacketEvent event;
|
||||
DWORD dwConnectTick = timeGetTime();
|
||||
if(!g_NetAuth.Init("192.168.0.7", 14050))
|
||||
{
|
||||
printf("error!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_NetAuth.SetEventListener(&event);
|
||||
|
||||
g_IPSec.LoadAllowIPZ(L"./AllowIPList.bin");
|
||||
|
||||
bool bExit = false;
|
||||
while(!bExit)
|
||||
{
|
||||
if(kbhit())
|
||||
{
|
||||
char ch = getch();
|
||||
switch(ch)
|
||||
{
|
||||
case 'h':
|
||||
ShowHelp();
|
||||
break;
|
||||
case 'q':
|
||||
bExit = true;
|
||||
break;
|
||||
case 's':
|
||||
g_NetAuth.Send_IRC("/SND", "테스트패킷전송");
|
||||
break;
|
||||
case 'a':
|
||||
GetMD5(argv[0], strMD5);
|
||||
g_NetAuth.Send_AUTH(MAKEWPARAM(AT_LOGIN, 0), strMD5);
|
||||
break;
|
||||
case 'l':
|
||||
g_NetAuth.Send_CMD(CS_IPLIST, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(abs(timeGetTime()-dwConnectTick) > 5000)
|
||||
{
|
||||
dwConnectTick = timeGetTime();
|
||||
if(!g_NetAuth.IsConnect())
|
||||
g_NetAuth.Init("192.168.0.7", 14050);
|
||||
}
|
||||
|
||||
g_NetAuth.Update();
|
||||
|
||||
Sleep(1);
|
||||
}
|
||||
|
||||
printf("exit...\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user