資源簡介
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.xm
?????文件??????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個文件信息
- 上一篇:AE二次開發——最短路徑分析
- 下一篇:Advertising.csv
評論
共有 條評論