📄 creadargument.cpp
字号:
if( ExciteGame_SendMessage() < 0)
PostQuitMessage(0);
break;
default:
break;
}
return 0;
}
int CClientBill::DecideLine() //林绢柳 扼牢甫 盒籍秦辑 绢恫 扼牢阑 静绊 乐绰瘤 犬牢茄促.
{
// _asm int 3;
if(FindWindow("DRAGONRAJA_CLASS","DragonRaja Online"))
{
WhatLineIUse = -1;
return 0;//魄窜 角菩
}
int Now = Check_NowNuri(); //唱 唱穿穿府?
int Thr = Check_Thrunet(); //唱 滴风齿?
int Cha = Check_Channel_i(); //唱 盲澄酒捞?
int Uni = Check_Unitel(); //唱 蜡聪炮
int Net = Check_Netsgo(); //唱 齿明绊?
int Kw = Check_KornetWorld(); //唱 内齿岿靛?
int Mez = Check_Mezzy();
int Wev = Check_Wever();
int Wis = Check_WiseTop();
int Med = Check_MediaWeb();
int Pcb = Check_PcBangDotCom();
int One = Check_Onegame();
int Exc = Check_ExciteGame();
int UnW = Check_UnitelWeb(); //唱 昆捞辑 甸绢坷绰 蜡聪炮?
int Cho = Check_Chollian(); //唱 玫府救?
int HJC = Check_HyunJuComputer(); //唱 泅林 哪腔磐?
Uni = UnW * Uni == 1 ? 0 : Uni;
//父距 2俺 捞惑狼 诀眉狼 扼牢阑 敬促绊 茄促搁 俊矾
if( Now + Thr + Cha + Uni + Net + Kw + Mez + Wev + Wis + Med + Pcb + One + Exc + UnW + Cho + HJC >1)
{
WhatLineIUse = -2;
char haha[6];
sprintf(haha,"%d%d%d%d%d%d",Now,Thr,Cha,Uni,Net,Kw);
// MessageBox(NULL,haha,"Can't Decide Line",NULL);
// exit(0);
}
else if( Now + Thr + Cha + Uni + Net + Kw + Mez + Wev + Wis + Med + Pcb + One + Exc + UnW + Cho + HJC ==1) //绢蠢 茄 诀眉狼 辆樊力甫 荤侩茄促绰 舵
{
//WhatLineIUse绰 阿诀眉喊肺 眉农且锭 阿 诀眉俊 蝶扼辑 官槽促.俊矾唱搁 困俊辑 -2肺 官槽促.
return 1; //魄窜 己傍
}
else //辆樊力啊 酒聪扼绰 舵.
{
WhatLineIUse = -1;
}
return 0;//魄窜 角菩\
}
int CClientBill::Check_UnitelWeb() //唱 昆捞辑 甸绢坷绰 蜡聪炮?
{
char uni[7]="P1:Web";
for(int i=0;i<CommandNum;i++)
{
if( strlen(Command[i]) < 6 )
continue;
for( int j=0;j<strlen(Command[i])-6+1;j++)
if(!memicmp(uni,Command[i]+j,6)) //unitel捞扼绰 窜绢啊 乐栏搁
{
WhatLineIUse=13; //蜡聪炮捞扼绊 钎矫
this->UnitelWeb_ID(); //蜡聪炮 昆俊辑 静绰 酒捞叼甫 历厘
this->UnitelWeb_IP();
return 1;
}
}
return 0;
}
char* CClientBill::UnitelWeb_ID()
{
memset(UserID,0,sizeof(UserID));
for(int i=0;i<CommandNum;i++)
{
char *p=Command[i];
for(int len=0;len<lstrlen(Command[i])-9;len++)
{
if(!memcmp(Command[i]+len,"&ID:",4))
{
int temp=0;
while(1)
{
temp++;
char haha=(char) *(Command[i]+len+temp);
if( haha=='&')
{
memset(UserID,0,sizeof(UserID));
memcpy(UserID,Command[i]+len+4,temp-4);
return UserID;
}
}
}
}
}
return 0;
}
int CClientBill::UnitelWeb_IP()
{
memset(Return,0,sizeof(Return));
for(int i=0;i<CommandNum;i++)
{
char *p=Command[i];
for(int len=0;len<lstrlen(Command[i])-9;len++)
{
if(!memcmp(Command[i]+len,"&IP:",4))
{
int temp=0;
while(1)
{
temp++;
char haha=(char) *(Command[i]+len+temp);
if( haha=='&')
{
memset(Return,0,sizeof(Return));
memcpy(Return,Command[i]+len+4,temp-4);
this->ReturnUniteWebIP(Return);
return 1;
}
}
}
}
}
return 0;
}
char* CClientBill::ReturnUniteWebIP(char *Name)
{
WORD version = MAKEWORD( 2, 2 );
WSADATA wsaData;
WSAStartup( version, &wsaData ); // NetWork包访等巴 檬扁拳窍绰镑..
LPHOSTENT lpHostEnt = gethostbyname((LPCTSTR)Name);
DWORD ErrorCode = WSAGetLastError();
memset(this->IP,0,40);
if (lpHostEnt)
{
IN_ADDR inAddr;
memcpy((void*)&inAddr.S_un.S_addr, lpHostEnt->h_addr,lpHostEnt->h_length);
wsprintf(this->IP,"%d.%d.%d.%d",
inAddr.S_un.S_un_b.s_b1,
inAddr.S_un.S_un_b.s_b2,
inAddr.S_un.S_un_b.s_b3,
inAddr.S_un.S_un_b.s_b4);
return this->IP;
}
return NULL;
}
/*
int CClientBill::Check_UnitelWeb() //唱 昆捞辑 甸绢坷绰 蜡聪炮?
{
return 0;
}
*/
int CClientBill::Check_Chollian() //唱 玫府救?
{
if(CommandNum!=4) return 0;
if(!stricmp(Command[0],"chollian"))
{
memset(this->UserID,0,sizeof(this->UserID));
int Len = strlen(Command[3]);
Len = Len > 40 ? 40 : Len;
memcpy(this->UserID,Command[3],Len);
this->WhatLineIUse = 14;
return 1;
}
return 0;
}
int CClientBill::Check_HyunJuComputer() //唱 泅林 哪腔磐?
{
if(CommandNum<3) return 0;
if(!stricmp(Command[0],"hyunju"))
{
memset(this->UserID,0,sizeof(this->UserID));
this->WhatLineIUse = 15;
return 1;
}
return 0;
}
int CClientBill::Check_Onegame()
{
if(CommandNum<3) return 0;
if(!stricmp(Command[0],"/moya"))
{
memset(this->UserID,0,sizeof(this->UserID));
this->WhatLineIUse = 11;
return 1;
}
return 0;
}
int CClientBill::Check_PcBangDotCom()
{
if(CommandNum<3) return 0;
if(!stricmp(Command[0],"pcbang"))
{
memset(this->UserID,0,sizeof(this->UserID));
this->WhatLineIUse = 10;
return 1;
}
return 0;
}
int CClientBill::Check_MediaWeb()
{
// _asm int 3;
char* cmdLine = GetCommandLine();
if(CommandNum<1) return 0;
if(!memcmp(cmdLine,"MDC",3)) //0锅掳 牢磊蔼捞 皋瘤捞绊 逞绢柯 牢磊甸狼 醚 荐啊 5捞搁
{
memset(Return,0,sizeof(Return));
if(CommandNum==1)
strcpy(Return,Command[0]);
else
strcpy(Return,Command[1]);
TCHAR para[50];
int ret = DecryptFunc( Return, para ); // dll function
if( ret == TRUE)
{
para[49]=0;
memset(UserID,0,40);
// char string[] = "A string\tof ,,tokens\nand some more tokens";
char seps[] = " /";
char *token;
int i=0;
token = strtok( para, seps );
while( token != NULL )
{
i++;
if(i==2)
strcpy(UserID,token);
token = strtok( NULL, seps );
if(i>4) break;
}
WhatLineIUse=9; //固叼绢昆捞扼绊 钎矫
return 1;
}
else
{
// MessageBox(NULL,"Fail ! MDC ","",NULL);
return 0;
}
}
return 0;
}
//WiseTop&IP:211.174.52.137&PO:9001&ID:doltwo&NA:绊酋霖&
//WiseTop&IP:11.11.11.11&PO:1110&ID:doltwo&NA:绊酋霖&
int CClientBill::Check_WiseTop() //唱 客捞令啪?
{
char wise[11]="WiseTop&IP",temp[7]=" ";
for(int i=0;i<CommandNum;i++)
{
if(strlen(Command[i])>10)
if(!memicmp(wise,Command[i],10)) //unitel捞扼绰 窜绢啊 乐栏搁
{
WhatLineIUse=8; //客捞令啪捞扼绊 钎矫
return 1;
}
}
return 0;
}
int CClientBill::WiseTop_IP()
{
memset(Return,0,sizeof(Return));
for(int i=0;i<CommandNum;i++)
{
char *p=Command[i];
for(int len=0;len<lstrlen(Command[i])-9;len++)
{
if(!memcmp(Command[i]+len,"&IP:",4))
{
int temp=0;
while(1)
{
temp++;
char haha=(char) *(Command[i]+len+temp);
if( haha=='&')
{
memset(Return,0,sizeof(Return));
memcpy(Return,Command[i]+len+4,temp-4);
return 1;
}
}
}
}
}
return 0;
}
int CClientBill::WiseTop_Port()
{
for(int i=0;i<CommandNum;i++)
{
char *p=Command[i];
for(int len=0;len<lstrlen(Command[i])-9;len++)
{
if(!memcmp(Command[i]+len,"&PO:",4))
{
int temp=0;
while(1)
{
temp++;
char haha=(char) *(Command[i]+len+temp);
if( haha=='&')
{
char haha[20];
memset(haha,0,20);
memset(haha,0,sizeof(haha));
memcpy(haha,Command[i]+len+4,temp-4);
return(atoi(haha));
}
}
}
}
}
return 0;
}
int CClientBill::WiseTop_ID()
{
memset(UserID,0,sizeof(UserID));
for(int i=0;i<CommandNum;i++)
{
char *p=Command[i];
for(int len=0;len<lstrlen(Command[i])-10;len++)
{
if(!memcmp(Command[i]+len,"&ID:",4))
{
int temp=0;
while(1)
{
temp++;
char haha=(char) *(Command[i]+len+temp);
if( haha=='&')
{
memset(UserID,0,sizeof(UserID));
memcpy(UserID,Command[i]+len+4,temp-4);
return 1;
}
}
}
}
}
return 0;
}
int CClientBill::Check_Wever() //唱 困滚齿?
{
if(CommandNum!=3) return 0;
if(!stricmp(Command[0],"WeverNet")) //0锅掳 牢磊蔼捞 皋瘤捞绊 逞绢柯 牢磊甸狼 醚 荐啊 5捞搁
{
memset(UserID,0,40);
// strcpy(UserID,Command[3]); //困滚齿狼 版快 酒捞叼甫 持阑 荐 绝促.
WhatLineIUse=7; //皋瘤扼绊 钎矫
return 1;
}
return 0;
}
int CClientBill::Check_Mezzy() //唱 皋瘤 矫胶袍
{
if(CommandNum!=4) return 0;
if(!stricmp(Command[0],"mezzy")) //0锅掳 牢磊蔼捞 皋瘤捞绊 逞绢柯 牢磊甸狼 醚 荐啊 5捞搁
{
memset(UserID,0,40);
strcpy(UserID,Command[3]);
WhatLineIUse=6; //皋瘤扼绊 钎矫
return 1;
}
return 0;
}
//001214 zhh
int CClientBill::Check_KornetWorld() //唱 内齿岿靛?
{
if(CommandNum!=5) return 0;
if(!stricmp(Command[0],"/KWG")) //0锅掳 牢磊蔼捞 内齿岿靛捞绊 逞绢柯 牢磊甸狼 醚 荐啊 5捞搁
{
memset(UserID,0,40);
strcpy(UserID,Command[3]);
WhatLineIUse=5; //内齿岿靛扼绊 钎矫
return 1;
}
return 0;
}
//001214 zhh
int CClientBill::KornetWorld_IP()
{
// char host[] = "gateway3.unitel.co.kr";
char host[] = "game.kornetworld.com";
LPHOSTENT lpHostEnt = gethostbyname((LPCTSTR)host);
memset(Return,0,sizeof(Return));
if (lpHostEnt)
{
IN_ADDR inAddr;
memcpy((void*)&inAddr.S_un.S_addr, lpHostEnt->h_addr,lpHostEnt->h_length);
wsprintf(Return,"%d.%d.%d.%d",
inAddr.S_un.S_un_b.s_b1,
inAddr.S_un.S_un_b.s_b2,
inAddr.S_un.S_un_b.s_b3,
inAddr.S_un.S_un_b.s_b4);
// strcpy(IP,Return);
return 1;
}
else
{
// WhatLineIUse = -5;
// PostQuitMessage(0);
return 0;
}
}
//001214 zhh
int CClientBill::KornetWorld_Port() //内齿岿靛 辑滚//
{
return 9000;
}
//001214 zhh
///kwg 10100003 103001 yskwon checksum
int CClientBill::Kornet_SendMessage()
{
char szSend[256];
memset(szSend,0,256);
strcpy(&(szSend[0]), "KwGwMGS" );//“KwGwMGS”); <= MAGIC STRING //霉锅掳 牢磊.
strcpy(&(szSend[8]), "CONNECT" );// <= OPERATION //亲惑 connect扼绊 利绰瘤夸?
strcpy(&(szSend[16]),Command[1]);// “10100003”); <= CPIP CODE //滴锅掳 牢磊
strcpy(&(szSend[32]),Command[2]);// “103004”); <= SVC CODE //3锅掳 牢磊
strcpy(&(szSend[48]),Command[3]);// “yskwon”); <= LOGINID //4锅掳 牢磊
strcpy(&(szSend[64]),Command[4]);// “dkskxhdkslxlkdkdsaaaasa”); <= CHECKSUM //5锅掳 牢磊.
// send(socketfd, packet, 256, 0);
int len = 256;
if(Send(szSend,len)==0)
{
WhatLineIUse = -5;
PostQuitMessage(0);
return 0;
}
else
{
return 1;
}
return 0;
}
int CClientBill::Check_NowNuri() //唱 唱穿穿府?
{
if(CommandNum!=3) return 0;
if(!stricmp(Command[0],"/now")) //0锅掳 牢磊蔼捞 唱快穿府捞绊 逞绢柯 牢磊甸狼 醚 荐啊 3捞搁
{
//咯扁俊绰 唱快穿府率 ip客 port牢瘤 眉农窍绰 风凭捞 甸绢哎 巴.
WhatLineIUse=0; //唱快穿府扼绊 钎矫
memset(UserID,0,40);
return 1;
}
return 0;
}
/*
OP_REQUESTPID, //0
OP_LOGONSUCCESSED, // Logon Successed //1
OP_LOGONFAIL, // Logon Fail //2
OP_PIDNOTFOUND, // PID Not Found //3
OP_LIDNOTFOUND, // LID Not Found //4
OP_DUPLICATIONERROR, // 吝汗 Error //5
OP_SERVERCONNECTFAIL,// GameServer Connection Error //6
OP_INCORRECTPWD, // Password 阂樊 //7
OP_INCORRECTVERSION, // 滚傈 阂樊 //8
OP_OVERUSER, // 荤侩磊 檬苞 //9
OP_NOMONEY, // 夸陛 固吵 荤侩磊 //10
OP_BADBOY, // 脚侩 阂樊磊 //11
OP_OVEREXPIRE, // 沥咀力矫 荤侩扁埃 檬苞 //12
OP_SOCKETTIMEOUT, //13
OP_SOCKETCLOSED //14
*/
int CClientBill::ExciteGame_SendMessage()
{
// _asm int 3;
unsigned int nRet;
HRESULT hr;
hr = pClient->LogIn( connections.socket, pClient->Parameter,&nRet, 10000 );
if( hr == S_FALSE ) //沥惑利栏肺 肺弊牢 角菩窍搁
{
// char dis[128]={0,};
// sprintf(dis,"hr == S_FALSE nRet = %d",nRet);
// MessageBox(NULL,dis,"Excite Game Error",NULL);
pClient.Release();
::CoUninitialize();
// return -12;
}
switch( nRet )
{
case OP_LOGONSUCCESSED:
// MessageBox(NULL,"ExciteGame Error", "Logon Successed" ,MB_OK);
return 12;
case OP_LOGONFAIL:
MessageBox(NULL,"ExciteGame Error", "Logon Fail" ,MB_OK);
return -1;
case OP_PIDNOTFOUND:
MessageBox(NULL,"ExciteGame Error", "PID Not Found" ,MB_OK);
return -2;
case OP_LIDNOTFOUND:
MessageBox(NULL,"ExciteGame Error", "LID Not Found" ,MB_OK);
return -3;
case OP_DUPLICATIONERROR:
MessageBox(NULL,"ExciteGame Error", "吝汗 Error" ,MB_OK);
return -4;
case OP_SERVERCONNECTFAIL:
MessageBox(NULL,"ExciteGame Error", "Server Not Found" ,MB_OK);
return -5;
case OP_INCORRECTPWD:
MessageBox(NULL,"ExciteGame Error", "Incorrect Password" ,MB_OK);
return -6;
case OP_INCORRECTVERSION:
MessageBox(NULL,"ExciteGame Error", "Incorrect Password" ,MB_OK);
return -7;
case OP_OVERUSER:
MessageBox(NULL,"ExciteGame Error", " " ,MB_OK);
return -8;
case OP_NOMONEY:
MessageBox(NULL,"ExciteGame Error", "夸陛 固吵磊." ,MB_OK);
return -9;
case OP_BADBOY:
MessageBox(NULL,"ExciteGame Error", " " ,MB_OK);
return -10;
case OP_OVEREXPIRE:
MessageBox(NULL,"ExciteGame Error", "沥咀 矫埃 檬苞." ,MB_OK);
return -11;
case OP_SOCKETTIMEOUT:
MessageBox(NULL,"ExciteGame Error", "家南 鸥烙 Out." ,MB_OK);
return -12;
case OP_SOCKETCLOSED:
MessageBox(NULL,"ExciteGame Error", "家南捞 摧躯嚼聪促. " ,MB_OK);
return -13;
default:
return -99;
}
}
int CClientBill::Check_ExciteGame()
{
// _asm int 3;
if( CommandNum<1) return 0;
if( memicmp(Command[0],"/EGPARAM:",9) ) //父距 ExciteGame俊辑 牢磊蔼栏肺 角青茄 巴捞 酒聪搁
return 0;
HRESULT hr;
if( FAILED( hr = ::CoInitialize(NULL) ) )
{
MessageBox(NULL,"ExciteGame狼 Dll甫 肺爹窍绰单 角菩窍看嚼聪促.","Excite Game Error",MB_OK );
PostQuitMessage(0);
return 0;
}
if( FAILED( hr = this->pClient.CreateInstance( __uuidof(LogIn) ) ) )
{
MessageBox(NULL,"ExciteGame狼 Dll甫 肺爹窍绰单 角菩窍看嚼聪促.","备己夸家啊 汲摹登瘤 臼疽嚼聪促.",MB_OK );
PostQuitMessage(0);
::CoUninitialize();
return 0;
}
char bstrCmdLine[1024];
strcpy(bstrCmdLine,GetCommandLine());
pClient->Parameters = (_bstr_t)Command[0];
pClient->Parameters = bstrCmdLine;
strcpy(this->IP , _bstr_t(pClient->IP).operator const char*( ));
strcpy(this->UserID , _bstr_t(pClient->PID).operator const char*( ));
this->port = pClient->Port;
WhatLineIUse = 12;
return 1;
}
int CClientBill::Check_Thrunet() //唱 滴风齿?
{
// _asm int 3;
// return 0;
memset(ThrunetIP,0,40);
// _asm int 3;
char dragon[] = ".dragon";
if(CommandNumSlash<1)
return 0;
if(strlen(CommandSlash[0])<8)
return 0;
if(memcmp( (CommandSlash[0]+strlen(CommandSlash[0])-7),dragon,7))
return 0;
memset(ThrunetIP,0,40);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -