예제 #1
0
 private string RoninProcesing(string data)
 {
     if (this.SettingData.IsRoninLogined && (hostAddress.IndexOf("2ch.net") != -1 || hostAddress.IndexOf("bbspink.com") != -1))
     {
         Ronin r = new Ronin();
         data.TrimEnd('&');
         data += "&sid=" + r.SecretKey;
         return(data);
     }
     return(data);
 }
예제 #2
0
        /// <summary>
        /// 浪人システムにログインします
        /// </summary>
        /// <param name="user">ユーザー名</param>
        /// <param name="pass">パスワード</param>
        public static bool Login(string user, string pass)
        {
            RoninUserData rud = new RoninUserData();

            rud.Password = pass;
            rud.UserName = user;
            var r = new Ronin(false);

            r.GetSecretKey();
            var key = r.SecretKey;

            r             = null;
            rud.SecretKey = key;
            if (key.Contains("SESSION-ID=ERROR"))
            {
                return(false);
            }
            rud.LastGetSecretKeyTime = DateTime.Now.ToString();
            var s = File.Create(Ronin.RoninSettingPath);

            Chron.Serializer.Serialize <RoninUserData>(rud, s, Chron.SerializeType.BinarySerialize);
            s.Dispose();
            return(true);
        }