admin管理员组文章数量:1567759
2024年5月10日发(作者:)
QQ源代码
// : implementation of the MyQQ class. //////////////////////////////
//////////////////////////////////////// #include #include
#include "winsock2.h"
#include "MyQQ.h" #include "md5.h"
#ifdef _DEBUG #undef THIS_FILE
static char THIS_FILE[]=__FILE__; #define new DEBUG_NEW #endif
////////////////////////////////////////////////////////////////////// // Constructio
n/Destruction
////////////////////////////////////////////////////////////////////// MyQQ::MyQQ
() {
s = NULL;
LoginToken = NULL; LoginTokenLength = 0; Status = 0; //
线 IsLogin = false; LastID = 0;
下
MessageText = NULL; FriendListHead = NULL; FriendListTail = NULL;
1文档来源为:从网络收集整理.word版本可编辑.
send_seq = random() & 0x0000ffff; LastOnline = time(NULL); UDPServer
Num = 0; //服务器地址
LoginServer = (char *)malloc(16*sizeof(char)); //QQ号 UserID = 0; //密
码
Password = NULL;
//得到初始化密钥,按2004版
InitKey = (unsigned char*)malloc(QQ_KEY_LENGTH);
int i;
for(i = 0; i < 16; i++) InitKey = rand();
SessionKey = (unsigned char*)malloc(QQ_KEY_LENGTH); }
MyQQ::~MyQQ() {
if(LoginServer != NULL) free(LoginServer); if(MyIP != NULL) free(
MyIP);
if(MessageText != NULL) free(MessageText); if(Password != NULL)
free(Password); if(InitKey != NULL) free(InitKey); if(PwdKey != NULL)
free(PwdKey);
2文档来源为:从网络收集整理.word版本可编辑.
版权声明:本文标题:QQ应用程序源代码 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1715327558a446563.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论