资源简介

C#北大刷课工具,利用webbrowser浏览北大网站,通过分析http协议实现自动登录刷课。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Diagnostics;
using System.Media;
using System.Web;
using System.IO;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;
using mshtml;

namespace 刷课
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        Encoding utf8 = Encoding.UTF8;
        Encoding gb2312 = Encoding.GetEncoding(“gb2312“);
        Encoding unicode = Encoding.Unicode;
        Encoding ascii = Encoding.ASCII;
        Encoding utf32 = Encoding.UTF32;

        private void Form1_Load(object sender EventArgs e)
        {
            MessageBox.Show(“请先登陆你得帐号,否则无法进行刷课!“);
        }

        private void webBrowser1_DocumentCompleted(object sender WebBrowserDocumentCompletedEventArgs e)
        {

        }
        string U1 = “http://dean.pku.edu.cn/student/“;//tongxuan1.php?&page=9“;
        string u2;
        private void button1_Click(object sender EventArgs e)
        {
            webBrowser2.IsWebBrowserContextMenuEnabled = true;
            webBrowser2.Refresh();
            if (textBox3.Text.Length != 8)
                MessageBox.Show(“课程代号长度不对“);
            else if (textBox2.Text.Length == 0)
                MessageBox.Show(“页码不能为空“);
            else
            {
                if (button1.Text == “刷课“)
                {
                    if (textBox2.Text == “10“)
                        textBox2.Text = “a“;
                    if (textBox2.Text == “11“)
                        textBox2.Text = “b“;
                    if (radioButton1.Checked == true)
                        u2 = U1 + “tongxuan1.php?&page=“ + textBox2.Text;
                    else if (radioButton2.Checked == true)
                        u2 = U1 + “gongxuan1.php?&page=“ + textBox2.Text;
                    else if (radioButton3.Checked == true)
                        u2 = U1 + “gongying1.php?&page=“ + textBox2.Text;
                    else if (radioButton4.Checked == true)
                        u2 = U1 + “zhengzhi1.php?&page=“ + textBox2.Text;
                    else if (radioButton5.Checked == true)
                        u2 = U1 + “jisuanji1.php?&page=“ + textBox2.Text;
                    else if (radioButton6.Checked == true)
                        u2 = U1 + “tiyu1.php?&page=“ + textBox2.Text;
                    
                    timer1.Enabled = true;
                    button1.Text = “停止“;
                    textBox3.ReadOnly = true;
                    textBox2.ReadOnly = true;
                    webBrowser1.Refresh();

                }
                else
                {
                    timer1.Enabled = false;
                    button1.Text = “刷课“;
                    timer2.Enabled = false;
        

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

    ..A..H.     34304  2017-12-05 15:18  C#北大刷课\.vs\刷课\v14\.suo

     文件       4419  2017-10-30 20:17  C#北大刷课\UpgradeLog.xml

     文件      27136  2017-12-05 15:10  C#北大刷课\刷课\bin\Debug\刷课.exe

     文件      44544  2017-12-05 15:10  C#北大刷课\刷课\bin\Debug\刷课.pdb

     文件      21680  2017-12-05 15:17  C#北大刷课\刷课\bin\Debug\刷课.vshost.exe

     文件        490  2016-07-16 19:44  C#北大刷课\刷课\bin\Debug\刷课.vshost.exe.manifest

     文件      26112  2017-10-30 22:55  C#北大刷课\刷课\bin\Release\刷课.exe

     文件      38400  2017-10-30 22:55  C#北大刷课\刷课\bin\Release\刷课.pdb

     文件      11608  2017-10-30 22:55  C#北大刷课\刷课\bin\Release\刷课.vshost.exe

     文件        490  2017-10-30 22:53  C#北大刷课\刷课\bin\Release\刷课.vshost.exe.manifest

     文件      26763  2017-10-30 21:10  C#北大刷课\刷课\Form1.cs

     文件      16885  2017-10-30 21:10  C#北大刷课\刷课\Form1.Designer.cs

     文件       6203  2017-10-30 21:10  C#北大刷课\刷课\Form1.resx

     文件       6302  2017-12-05 15:04  C#北大刷课\刷课\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

     文件        930  2017-12-05 15:17  C#北大刷课\刷课\obj\Debug\刷课.csproj.FileListAbsolute.txt

     文件        847  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.csproj.GenerateResource.Cache

     文件       4526  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.csprojResolveAssemblyReference.cache

     文件      27136  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.exe

     文件        180  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.Form1.resources

     文件      44544  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.pdb

     文件        180  2017-12-05 15:10  C#北大刷课\刷课\obj\Debug\刷课.Properties.Resources.resources

     文件       5474  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\DesignTimeResolveAssemblyReferencesInput.cache

     文件        232  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\GenerateResource-ResGen.read.1.tlog

     文件        534  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\GenerateResource-ResGen.write.1.tlog

     文件       2921  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\ResolveAssemblyReference.cache

     文件       4608  2017-10-30 23:07  C#北大刷课\刷课\obj\Release\TempPE\Properties.Resources.Designer.cs.dll

     文件        857  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\刷课.csproj.FileListAbsolute.txt

     文件      26112  2017-10-30 22:53  C#北大刷课\刷课\obj\Release\刷课.exe

     文件        180  2017-10-30 22:52  C#北大刷课\刷课\obj\Release\刷课.Form1.resources

     文件      38400  2017-10-30 22:52  C#北大刷课\刷课\obj\Release\刷课.pdb

............此处省略30个文件信息

评论

共有 条评论