湖北校园E信宽带时长一键查询工具


湖北校园普通E信每个月上网时间是有限制的,240小时。

查询使用时长需要到指定网页查询。

我写成了一个客户端的小工具,可以自动抓取认证码,填写手机号码,即可由短信获取上网时长。

 

 

 


 

 




贴上源码:

/// <summary>
        /// 查询宽带剩余时间
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click(object sender, EventArgs e)
        {

            //获取手机号码
            webBrowser1.Document.GetElementById("Tel").InnerText = this.tb_phone.Text.ToString().Trim();

            //自动填写验证码
            webBrowser1.Document.GetElementById("txtCheckNum").InnerText = webBrowser1.Document.GetElementById("labelCheckNum").InnerText;
            this.tb_yanzheng.Text = webBrowser1.Document.GetElementById("labelCheckNum").InnerText;

            //判断是否页面已经加载完成
            if (webBrowser1.ReadyState == WebBrowserReadyState.Complete)
            {
                //加载完毕后点击确定按钮
                webBrowser1.Document.GetElementById("btnSend").InvokeMember("click");
                //MessageBox.Show("测试 - success", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            this.timer1.Enabled = true;

        }


        private void timer1_Tick(object sender, EventArgs e)
        {
            if (this.timer1.Interval != 0)
            {
                this.timer1.Enabled = false;
                MessageBox.Show(webBrowser1.Document.GetElementById("ErrorLab").InnerText, "消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.label11.Visible = false;
                if (webBrowser1.Document.GetElementById("ErrorLab").InnerText == "您的操作太频繁,重复查询请稍等5分钟")
                {
                    this.l_showInfo.Visible = true;
                }
                this.timer1.Enabled = false;
            }
        }

        /// <summary>
        /// 关闭按钮
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void button1_Click_1(object sender, EventArgs e)
        {
             if (MessageBox.Show("魔殇小工具,若您发现BUG请发邮件给我,我将尽快修正,感谢!", "消息", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) == DialogResult.OK)
            {
                this.Dispose();
                Application.Exit();
            }
        }

软件已经全部写完,部分未知BUG希望各位使用之后将BUG信息发给我,我会尽快修补上。

点击下载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值