可以';t从C#中的HTTPPost方法获取响应

本文关键字:HTTPPost 中的 方法 获取 响应 可以 | 更新日期: 2023-09-27 18:25:51

目标链接是http://www.fyneworks.com/encryption/rc4-encryption/index.asp

使用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>

可以';t从C#中的HTTPPost方法获取响应

传递参数的方式是错误的。看看这个问题和答案,看看你应该如何正确地做。