Source code:
using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using System.IO; using System.Net; using System.Text; namespace GetEmail {// A summary description of /
Public Form1 () {// // Windows Form Designer Support for // InitializeComponent ();
// // Todo: Add any constructor code after INITIALIZEComponent call //}
///
/// summary> private void InitializeComponent () {System.Resources.ResourceManager resources = new System.Resources.ResourceManager (typeof (Form1)); this.listUrl = new System.Windows.Forms.ListBox (); this. groupBox1 = new System.Windows.Forms.GroupBox (); this.button7 = new System.Windows.Forms.Button (); this.button6 = new System.Windows.Forms.Button (); this.buttonUrl = new System. Windows.Forms.Button (); this.endid = new system.windows.forms.textbox (); this.label4 = new system.windows.forms.label (); this.startid = new system.windows.Forms.TextBox (); This.label3 = new system.windows.forms.label (); this.ndurl = new system.windows.Forms.TextBox (); this.label2 = new system.windows.forms.label (); this. STARTURL = new system.windows.forms.textbox (); this.label1 = new system.windows.forms.label (); this.label5 = new system.windows.forms.label (); this.labelcue = new system. Windows.Forms.Label (); this.Getemail = new system.windows.forms.groupbox (); this.butto N8 = new system.windows.Forms.Button (); this.button5 = new system.windows.Forms.Button (); this.button4 = new system.windows.Forms.Button (); this.button3 = new system. Windows.Forms.Button (); this.button2 = new system.windows.Forms.Button (); this.button1 = new system.windows.Forms.Button (); this.listemail = new system.windows.forms.listbox (); This.groupbox1.suspendlayout (); this.Getemail.suspendlayout (); this.suspendlayout (); /// listurl // this.listurl.ItemHeight = 12; this.listurn.location = new system.drawing .Point (8, 52); this.listurn.name = "listurl";
this.listUrl.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; this.listUrl.Size = new System.Drawing.Size (760, 196); this.listUrl.TabIndex = 0; // // groupBox1 // this .groupBox1.BackColor = System.Drawing.Color.Transparent; this.groupBox1.Controls.Add (this.button7); this.groupBox1.Controls.Add (this.button6); this.groupBox1.Controls.Add (this.buttonUrl "This.groupbox1.controls.add (this.endid); this.groupBox1.controls.add (this.label4); this.GroupBox1.controls.add (this.startID); this.groupBox1.controls.add (this .label3); this.groupBox1.controls.add (this.ndurl); this.groupBox1.controls.add (this.label2); this.groupBox1.controls.add (this.starturl); this.groupBox1.controls.add (this.Label1); this.groupBox1.controls.add (this.listurl); this.groupbox1.location = new system.drawing.point (8, 8); this.groupbox1.name = "groupbox1"; this.groupBox1 .Size = new system.drawing.size (776, 280); this.groupbox1.tabindex = 1; this.groupbox1.tabst Op = false; this.groupbox1.text = "Generate the arrest URL"; // // button7 // this.button7.location = new system.drawing.point (604, 252); this.button7.name = "Button7 "; This.button7.size = new system.drawing.size (80, 23); this.button7.tabindex = 10; this.button7.text =" Delete Selection "; this.button7.click = new system . EventHandler (this.button7_click); // // Button6 // this.button6.location = new system.drawing.point (692, 252); this.button6.name = "button6"; this.button6.tabindex = 9 "This.button6.text =" All Clear "; this.button6.click = new system.eventhandler (this.button6_click);
//// // buttonurl // this.buttonurl.location = new system.drawing.point (676, 24); this.buttonurl.name = "buttonurl"; this.buttonurl.size = new system.drawing.size (88, 23); this.buttonurl.tabindex = 8; this.buttonurl.text = "Generate URL"; this.ButtonURL.Click = New System.EventHandler (this.ButtonURL_Click); // // endid // this.endid. Location = new system.drawing.point (384, 24); this.endid.name = "endid"; this.endid.size = new system.drawing.size (36, 21); this.endid.tabindex = 5; this.Endid.Text = ""; /// Label4 // this.label4.location = new system.drawing.point (336, 28); this.label4.name = "label4"; this.label4.size = New system.drawing.size (56, 23); this.label4.tabindex = 7; this.label4.text = "End ID:"; // // startid // this.startID.Location = new system.drawing. Point (292, 24); this.startid.name = "startid"; this.startid.size = new system.drawing.size (36, 21); this.StartId.TabINDEX = 4; this.startid.text = " "; /// Label3 // this.label3.location = new system.drawing.point (236, 28); this.label3.name = "label3"; this.label3.size = new system.drawing.size (56, 23); this .label3.tabindex = 6; this.label3.text = "Start ID:"; // // endurl // this.ndurl.location = new system.drawing.point (488, 24); this.endurl.name = "endurl"; this.ndurl.size = new system.drawing.size (172, 21); this.ndurl.Tabindex = 1; this.endurl.Text = ""; /// Label2 // this.label2. Location =
New system.drawing.point (424, 28); this.label2.name = "label2"; this.label2.size = new system.drawing.size (72, 23); this.label2.tabindex = 3; this. Label2.text = "End Section:"; /// Starturl // this.startURL.Location = New System.drawing.Point (72, 24); this.StartURL.Name = "StartURL"; this.starturl.size = New system.drawing.size (160, 21); this.starturl.tabindex = 0; this.starturl.text = ""; /// Label1 // this.label1.location = new system.drawing.point ( 8, 28); this.label1.name = "label1"; this.label1.size = new system.drawing.size (72, 23); this.label1.tabindex = 2; this.label1.text = start section : "; /// Label5 // this.label5.location = new system.drawing.point (8, 552); this.label5.name =" label5 "; this.label5.size = new system.drawing.size (44, 16); this.label5.tabindex = 2; this.label5.text = "Tip:"; /// Labelcue // this.labelcue.location = new system.drawing.point (56, 552); THIS.Labelcue.name = "labelcue"; this.Labelcu E.Size = new system.drawing.size (728, 16); this.labelcue.tabindex = 3; /// getemail // this.Getemail.Controls.add (this.button8); this.Getemail.Controls. Add (this.button5); this.Getemail.Controls.add (this.button4); this.Getemail.controls.add (this.button3); this.Getemail.controls.add (this.button2); this.Getemail. Controls.add (this.button1); this.Getemail.Controls.add (this.listemail); this.Getemail.Location = new system.drawing.point (8, 296); this.Getemail.name = "getemail"; this.getemail.size =
New system.drawing.size (776, 244); this.Getemail.Tabindex = 4; this.getemail.Tabstop = false; this.getemail.text = "get email address"; // // button8 // this.button8 .Location = new system.drawing.point (420, 20); this.button8.name = "button8"; this.button8.size = new system.drawing.size (84, 23); this.button8.tabindex = 6. "This.button8.text =" Sort by letter "; this.button8.click = new system.eventhandler (this.button8_click); // // button5 // this.button5.location = new system.drawing.point ( 260, 20); this.Button5.name = "button5"; this.button5.size = new system.drawing.size (64, 23); this.button5.tabindex = 5; this.button5.text = "resin "; // // button4 // this.button4.location = new system.drawing.point (212, 20); this.button4.name =" button4 "; this.button4.size = new system.drawing.size 40, 23); this.Button4.Tabindex = 4; this.button4.text = "Pause"; // // // Button3 // this.button3.Location = new system.drawing.point (644, 20); this. Button 3.Name = "Button3"; this.button3.size = new system.drawing.size (124, 23); this.button3.tabindex = 3; this.button3.text = "Clear all EMAIL addresses"; // / / button2 // this.button2.location = new system.drawing.point (512, 20); this.button2.name = "button2"; this.button2.size = new system.drawing.size (124, 23); This.button2.tabindex = 2; this.button2.text = "Delete the selected email address"; this.button2.click = new system.eventhandler (this.button2_click); // // button1 // this.button1. Location =
New system.drawing.point (96, 20); this.button1.name = "button1"; this.button1.size = new system.drawing.size (108, 23); this.button1.tabindex = 1; this. Button1.text = "Start grapple email address"; this.button1.click = new system.eventhandler (this.button1_click); /// listemail // this.listemail.itemheight = 12; this.listemail.location = New System.drawing.point (8, 52); this.listemail.name = "listemail"; this.listemail.size = new system.drawing.size (760, 184); this.listemail.tabindex = 0; this.listemail .SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended; // // Form1 // this.AutoScaleBaseSize = new System.Drawing.Size (6, 14); this.ClientSize = new System.Drawing.Size (792, 573 This.controls.add (this.Getemail); this.controls.add (this.labelcue); this.controls.add (this.label5); this.Controls.add (this.groupbox1); this.cursor = System.windows.Forms.cursors.default; this.icon = ((System.drawing.icon) ("$ this.icon")); t His.name = "form1"; this.text = "email address capture"; this.groupBox1.ResumeLayout (false); this.Getemail.ResumeLayout (false); this.ResumeLayout (false);} #ENDREGION
///
Private void buttonURL_Click (Object sender, system.eventargs e) {if (starturl.text == ") {messagebox.show (this," The start section cannot be empty! "," The beginning is not empty! ", MessageBoxButtons. OK, MessageBoxicon.information;} else if (! (! (Endid.text == ")) {MessageBox.show (this," end ID can not be empty! "," End ID can't be empty! ", MessageBoxButtons.ok, MessageBoxicon.information;} else if (startid.text ==") {listurl.tems.add (starturn.text.tostring ());} else {ix (Convert) .Toint32 (STARTID.TEXT.TOSTRING ())> Convert.TOINT32 (endid.Text.tostring ())) {for (int i = convert.tostring ()); i> = convert.toint32 (Endid.Text.toString ()); i - {listurl.Items.add (starturn.text.tostring () i.tostring () endURL.TEXT.TOSTRING ());}} else {for INT i = convert.TOINT32 (startid.text.tostring ()); i <= convert.TOINT32 (endid.text.tostring ()); i ) {listurl.Items.add (starturn.text.toString () i .Tostring () endurl.Text.toString ());}}}}
private void DownHtmlAndEmail (string Url) {HttpWebRequest loHttp = (HttpWebRequest) WebRequest.Create (Url); HttpWebResponse loWebResponse = (HttpWebResponse) loHttp.GetResponse (); Encoding enc = Encoding.Default; StreamReader loResponseStream = new StreamReader (loWebResponse.GetResponseStream ( ), eNC); string download = loresponsestream.readToend (); if (Download.indexof ("@") == -1) {} else {char [] emailborder = new char [] {',' / "' , '/' ','> ',': ',' | ',', ',' "','", ',' <'}; Int emailcount = Download.Indexof ("@") For (int i = 0; i <1; i ) {int emailplace = Download.indexof ("@"); emailcount = Download.indexof ("@"); int startemail = emailcount; int endemail = emailcount; for INT II = STARTEMAIL; II> 100; II - {BOOL BBREAK1 = false; for (int J = 0; j int emailCountTo = download.IndexOf ( "@", emailCount) 1; labelCue.Text = listEmail.Items.Count.ToString (); if (emailCount> emailCountTo) {emailCount = download.IndexOf ( "@", emailCount); I -;}}}} private void button1_click (object sender, system.eventargs e) {if (listurl.items.count <1) {labelcue.text = "Please be arrested for the URL!";} else {for (INT i = 0; i Private void button6_click (object sender, system.eventargs e) {/ * int count = listurl.items.count; if (count> 0) {for (int i = 0; i Private void button7_click (object sender, system.eventargs e) {int count = listurl.selecteditems.count; if (listurl.selectedItems.count> 0) {for (int i = 0; i private void button2_Click (object sender, System.EventArgs e) {int count = listEmail.SelectedItems.Count; if (listEmail.SelectedItems.Count> 0) {for (int i = 0; i IF (Listemail.Items.count> 0) {for (INT i = 0; i }