//QQ农场外挂
源代码 unit WebQQFunction; interface uses Windows, SysUtils, Classes, StdCtrls, IdBaseComponent, IdComponent, StrUtils, ExtCtrls, IdTCPConnection, IdTCPClient, IdHTTP, jpeg, IdAuthentication, IdHash, IdHashMessageDigest, PublicFunctions, IniFiles, Forms, ComCtrls, SHDocVw, Dialogs, Variants, DateUtils; const //QQ校友农场 Const_QQxyHost = 'happyfarm.xiaoyou.qq'; //QQ空间农场 Const_QQqzone = 'happyfarm.qzone.qq'; //登录用的字符串 Const_PostLoginInfo = 'u=%s&;p=%s&;verifycode=%s'; Const_PostLoginStr = '&;aid=15000102&;u1=http%3A%2F%2Fxiaoyou.qq% 2Findex.php%3Fmod%3D'+ 'login&;fp=&;h=1&;ptredirect=1&;ptlang=0&;from_ui=1&;dumy=1'; //操作农场时,IdHTTP Referer 的值 通过GetFlaseVersion得到 IdHTTP Referer的 全部字串 Const_Flase_Version = 'appimg.qq/happyfarm/module/&;#39;; //FarmKey的形式 Const_farmKey = 'farmTime=%d&;farmKey=%s'; //读取好友列表 Const_FriendsRefresh = 'refresh=true&;farmTime=%d&;farmKey=%s';
//自己ID,名字,时间,对方名称,farmKey Const_Action = 'farmKey=%s&;fName=%s&;ownerId=%d&;farmTime=%d&;tName=% s&;place=%d'; //Cookie的组成 Const_Cookie = 'Cookie: appTips=1; pt2gguin=%s; uin=%s; skey=%s; ptcz=%s; pvid=%s; name=%s; schooltype=0; province=11; pst=%d; flv=10.0;'; //升一级加多少经验 CONST_OneLevelNum = 200; //取FarmKey时,时间延后多少秒 Const_DelayFarmTime = 10; type //背包类型 0仓库 1商店 2包裹 TBagsType = (farm_Warehouse, farm_Goods, farm_Bag); //动作类型 0偷取 1杀虫 2浇水 3除草 4收获 // 5松土 6种植 7全部卖出 8购买种子 // 9查看消息 10所有动作(在PostAction中没有实现义意,不作操作)
TActionType =(Action_scrounge, Action_spraying, Action_water, Action_clearWeed, Action_harvest, Action_scarify, Action_planting, Action_Sale, Action_SaleAll, Action_Buy, Action_getAllInfo, Action_ALL_OPP);
var QQ_Cookie, VerifySession, farmKey, ConnHost, Cookie_pt2gguin, Cookie_uin, Cookie_skey, Cookie_ptcz, Cookie_pvid, Cookie_name, FlaseVersion: string; farmTime, Cookie_pst: int64; //服务器时间 本地时间 本地时间与服务器的时间差 QQ_ServerTime, Loc_ServerTime, DelayedDpikeInt : integer;
//将本地时间转成QQ服务器时间 function DateTimeToServerTime(aDateTime: TDateTime): integer; function Preprocess(aPassWord, aVerifyCode:string):string; //取得Flash版本 通过GetFlaseVersion得到 IdHTTP Referer的全部字串 procedure GetFlaseVersion(var aStr: string); //取得验证码 function GetVerifyPic(aIdHTTP:TIdHTTP; var aImage: TImage): boolean; //将汉字转换为unicode码 function AnsiToUnicode(aSubWideChar: PWideChar):string; //将unicode码转换为汉字 function UnicodeToAnsi(aSubUnicode: string):string; //提取字符串 function SubString(aInputStr, aStr_L, aStr_R:string):string; function HashStr2BinStr(Hash: string):string; function Fmd5(str: string):string; //以Web形式登录QQ function LoginQQ(aIdHTTP: TIdHTTP; aUserNameStr, aPass
wordStr, aVerifyStr: string; var aWebStr: st
ring): Boolean; //登录QQ校友社区 function LoginQQxiaoyou(aIdHTTP: TIdHTTP): Boolean; //取自己农场数据 function GetMyFarmLandDB(aIdHTTP: TIdHTTP; var aWebStr: string): Boolean; //取好友
列表数据
function GetFriendsListDB(aIdHTTP: TIdHTTP; var aWebStr: str