【发布时间】:2016-06-24 16:23:53
【问题描述】:
我正在开发一个用 c# 编写的渗透测试应用程序,并且我正在使用 Titanium 代理。我已经能够让 html、css、js 和其他内容类型正常工作。我无法显示图像。这有什么秘密吗?
github 上关于钛的示例代码有一个 if,它只允许 text/html 通过。这是来自网站的代码,我只是添加了一些其他的 ifs 到。
if (e.WebSession.Request.Method == "GET" || e.WebSession.Request.Method == "POST")
{
if (e.WebSession.Response.ResponseStatusCode == "200")
{
if (e.WebSession.Response.ContentType!=null && e.WebSession.Response.ContentType.Trim().ToLower().Contains("text/html"))
{
byte[] bodyBytes = await e.GetResponseBody();
await e.SetResponseBody(bodyBytes);
string body = await e.GetResponseBodyAsString();
await e.SetResponseBodyString(body);
}
}
}
我尝试仅添加一个 else,其代码与上述正文完全相同,以捕获其他所有内容,但图像似乎从未加载到站点中,尽管所有 CSS、JS 和 HTML 似乎都可以正常工作。
这是 Titanium 网络代理 github 页面的链接。 https://github.com/justcoding121/Titanium-Web-Proxy
【问题讨论】: