//----------------------------------------------------------------------- public static QUser LoadUser(JObject jReply) { QUser res = new QUser(); res.id = (string)jReply["user"]["id"]; res.pcid = (string)jReply["user"]["pcid"]; res.usbId = (string)jReply["user"]["usbId"]; res.lvl = (string)jReply["user"]["lvl"]; res.subscriptionDate = (DateTime)jReply["user"]["subscriptionDate"]; res.subscriptionExpDate = (DateTime)jReply["user"]["subscriptionExpDate"]; res.active = (bool)jReply["user"]["active"]; res.trialUse = (bool)jReply["user"]["trialUse"]; res.trial = (bool)jReply["user"]["trial"]; res.unlimitedSub = (bool)jReply["user"]["unlimitedSub"]; res.hash = (string)jReply["hash"]; string checkHash = QExec.MD5Hash(res.pcid + '|' + res.subscriptionExpDate.ToString("dd.MM.yyyy") + '|' + res.unlimitedSub.ToString().ToLower() + '|' + res.trial.ToString().ToLower() + '|' + res.lvl + '|' + res.active.ToString().ToLower() + '|' + QExec.salt); res.isHashOk = (res.hash == checkHash); return(res); }
//----------------------------------------------------------------------- static public void Main(string[] args) { if (args.Length > 0) { QExec.Execute(args); } else { helpOut(); } }