2013-08-01 35 views
0

目标链接 http://www.fyneworks.com/encryption/rc4-encryption/index.asp无法从HTTP POST方法响应在C#

使用LiveHttpHeaders后,我发现参数

auth=gfmpgjixhpFhGnKFrHUmn2eHmHhigxkr&decrypt=8a+2d+2f+36 
&key=102&decrypted=Paste+your+data+here 

,但我无法得到它的回应。

我使用下面的C#代码。

txtboxText.Text = txtboxText.Text.Replace(" ", "+"); 
WebClient client = new WebClient(); 
string auth = client.DownloadString("http://www.fyneworks.com/encryption/rc4-encryption/index.asp"); 
     string Search4This1="<input name=\"auth\" type=\"hidden\" value=\""; 
     string Search4This2="\""; 
     int start = auth.IndexOf(Search4This1) + Search4This1.Length; 
     int end = auth.IndexOf(Search4This2, start); 
     auth = auth.Substring(start, end - start); 
     MessageBox.Show(auth); 
     string downloadstring = client.DownloadString("http://www.fyneworks.com/encryption/rc4-encryption/index.asp?auth="+auth+"decrypted="+txtboxKey.Text.ToString()+"&key="+txtboxKey.Text.ToString()); 
     System.IO.File.WriteAllText(@"C:\htmlcode.txt", downloadstring); 

结果:

<h2>RC4 Decryption Tool</h2> 
<form class="tool" action="/encryption/rc4-encryption/index.asp" method="post"> 
<input name="auth" type="hidden" value="cmkGdih1ht0dGHmkIGzmlDilJJDMmTho"/> 
<table width="100%" cellspacing="0"> 
<tr> 
<td valign="middle" align="center" width="50%"> 
<h3>Encrypted data</h3> 
<textarea name="decrypt">CC 0F 1F 0B 6A 00 5A A7 97 14 9C D7 00 76 84 27 C4 0C 73 68</textarea> 
<span class="B Warning">Encoded into a <u>hexadicimal string</u></span> 
</td> 
<td valign="middle" align="center" width="100"> 
<u>Key</u>:<br/> 
<input name="key" type="text" value='102' style="width:90px;"/><br/> 
<input type="image" src="http://www.fyneworks.com/encryption/inc/decrypt.png" alt="ENCRYPT &raquo;"/> 
</td> 
<td valign="middle" align="center" width="50%"> 
<h3>Original data</h3> 
<textarea class="result" name="decrypted"></textarea> 
+2

您可以打印该程序的输出吗?现在添加 – mariosangiorgio

+0

输出 – amir

回答