如何查看浏览器发送的内容

时间:2022-10-07 10:07:07

I need to see exactly what the browser sends to a form, for debugging purposes. I have the "tamper data" addon for Mozilla, but it doesn't show me what I am looking for. What I need is a text file with all that the browser sends, it should look like this:

为了调试,我需要准确地看到浏览器发送给表单的内容。我有Mozilla的“篡改数据”插件,但是它并没有告诉我我在寻找什么。我需要的是一个包含浏览器发送的所有文本文件,它应该是这样的:

Content-Type: multipart/form-data; boundary=AaB03x

   --AaB03x
   Content-Disposition: form-data; name="submit-name"

   Larry
   --AaB03x
   Content-Disposition: form-data; name="files"
   Content-Type: multipart/mixed; boundary=BbC04y

   --BbC04y
   Content-Disposition: file; filename="file1.txt"
   Content-Type: text/plain

8 个解决方案

#1


7  

For more detailed information you could use WireShark. This program allows you monitor just about all traffic. It has a rather steep learning curve, when you get it, it is an awesome help.

要获得更详细的信息,您可以使用WireShark。这个程序允许你监控所有的流量。它有一个相当陡峭的学习曲线,当你得到它,它是一个很棒的帮助。

Mostly I use Firebug. Setting the Console to 'persist' allows you to check GET/POST when submitting your form.

主要是我使用Firebug。将控制台设置为“persist”允许您在提交表单时检查GET/POST。

#2


6  

The Firebug addon for Firefox can capture the data that you want. You will need to manually compile the data captured into the format that you want though.

Firefox的Firebug插件可以捕获您想要的数据。您将需要手动将捕获的数据编译成您想要的格式。

#3


5  

The best tool that I've used for the job is Fiddler. It lets you see the content of all the HTTP requests to and from your machine. One gotcha on Firefox though - make sure you restart once Fiddler is installed, and then go to the "Fiddler: Disabled" button in your status bar and select an option so that your Firefox traffic is watched as well.

我用过的最好的工具是小提琴。它允许您查看所有与您的机器之间的HTTP请求的内容。不过在Firefox上有一个问题——确保在安装了Fiddler之后重新启动,然后到状态栏中的“Fiddler: Disabled”按钮,并选择一个选项,以便查看Firefox的流量。

#4


4  

You can use Live HTTP Headers (for Firefox).

您可以使用Live HTTP Headers(对于Firefox)。

Once you switch it ON, you can view all the HTTP headers that the browser sends (including form data etc.). VERY USEFUL for development purposes.

一旦打开它,就可以查看浏览器发送的所有HTTP报头(包括表单数据等)。对开发非常有用。

#5


1  

There are a few methods, but it depends on your software. If your using Apache, you can look at the following:

有一些方法,但是它取决于您的软件。如果您使用Apache,可以查看以下内容:

apache_request_headers() 

getallheaders() 

apache_response_headers()

for figuring out what you are going to send back.

为了弄清楚你要寄回什么。

I believe that all of those links above require that apache be configured as a module, and not as a cgi. You can check your current settings if you are unsure by using your phpinfo() and seeking Server API. If it says CGI, your out of luck on these functions.

我相信上面所有的链接都要求将apache配置为模块,而不是cgi。如果不确定,可以使用phpinfo()和查找服务器API检查当前设置。如果是CGI,那你就不走运了。

There are however additional variables that you can use if your looking at the CGI installation. These exist both with the module and the CGI/CLI API's btw, and are all children of the $_ENV/$HTTP_ENV_VARS (envirornmental) superglobal:

但是,如果查看CGI安装,您可以使用其他变量。这些都存在于模块和CGI/CLI API的btw中,并且都是$_ENV/$ http_env_v_vars (environmental ornmental) superglobal的子元素:

HTTP_ACCEPT

HTTP_ACCEPT

HTTP_ACCEPT_ENCODING

HTTP_ACCEPT_ENCODING

HTTP_ACCEPT_LANGUAGE

HTTP_ACCEPT_LANGUAGE

HTTP_CONNECTION

HTTP_CONNECTION

HTTP_USER_AGENT

HTTP_USER_AGENT

HTTP_REDIRECT_STATUS

HTTP_REDIRECT_STATUS

HTTP_REMOTE_ADDR

HTTP_REMOTE_ADDR

HTTP_REMOTE_PORT

HTTP_REMOTE_PORT

SERVER_PROTOCOL

SERVER_PROTOCOL

and REQUEST_METHOD

和REQUEST_METHOD

You may have more depending on your configurations, but chances are these are containing all the information you are looking for. If your php version is >= 5.0.0, you can also use get_headers() which I believe is API independant.

您可能会有更多的依赖于您的配置,但是可能是这些包含了您正在寻找的所有信息。如果您的php版本是>= 5.0.0,您也可以使用get_headers(),我认为它是API独立的。

Hope that helps!

希望会有帮助!

For more information please check,

更多信息请查阅,

http://www.codingforums.com/archive/index.php/t-69186.html

http://www.codingforums.com/archive/index.php/t - 69186. - html

#6


1  

If you're on Windows, Fiddler is a very good debugging proxy but you could also try out Charles Proxy which also has a lot of great features and is cross-platform.

如果你在Windows上,Fiddler是一个很好的调试代理,但你也可以试试Charles proxy,它也有很多很棒的功能,而且是跨平台的。

#7


1  

I'm quite fond of Burpsuite, it allows you to inspect and manipulate HTTP requests.

我很喜欢Burpsuite,它允许您检查和操作HTTP请求。

My favourite feature is the ability to intercept a request, modify parameters and then send it on. Very useful for security testing and debugging.

我最喜欢的特性是能够拦截请求,修改参数,然后发送它。对安全性测试和调试非常有用。

#8


1  

If you are using Forefox use Firebug, you can really good see what is happining. In Google Chrome and Safari you have BuildIn Developertools, so you can also see the same informations.

如果你正在使用前狐狸使用Firebug,你可以很好地看到发生了什么。在谷歌版本的Chrome和Safari中,你有内置的开发者工具,所以你也可以看到同样的信息。

I found Fiddler a little bit difficult...

我觉得小提琴手有点难……

#1


7  

For more detailed information you could use WireShark. This program allows you monitor just about all traffic. It has a rather steep learning curve, when you get it, it is an awesome help.

要获得更详细的信息,您可以使用WireShark。这个程序允许你监控所有的流量。它有一个相当陡峭的学习曲线,当你得到它,它是一个很棒的帮助。

Mostly I use Firebug. Setting the Console to 'persist' allows you to check GET/POST when submitting your form.

主要是我使用Firebug。将控制台设置为“persist”允许您在提交表单时检查GET/POST。

#2


6  

The Firebug addon for Firefox can capture the data that you want. You will need to manually compile the data captured into the format that you want though.

Firefox的Firebug插件可以捕获您想要的数据。您将需要手动将捕获的数据编译成您想要的格式。

#3


5  

The best tool that I've used for the job is Fiddler. It lets you see the content of all the HTTP requests to and from your machine. One gotcha on Firefox though - make sure you restart once Fiddler is installed, and then go to the "Fiddler: Disabled" button in your status bar and select an option so that your Firefox traffic is watched as well.

我用过的最好的工具是小提琴。它允许您查看所有与您的机器之间的HTTP请求的内容。不过在Firefox上有一个问题——确保在安装了Fiddler之后重新启动,然后到状态栏中的“Fiddler: Disabled”按钮,并选择一个选项,以便查看Firefox的流量。

#4


4  

You can use Live HTTP Headers (for Firefox).

您可以使用Live HTTP Headers(对于Firefox)。

Once you switch it ON, you can view all the HTTP headers that the browser sends (including form data etc.). VERY USEFUL for development purposes.

一旦打开它,就可以查看浏览器发送的所有HTTP报头(包括表单数据等)。对开发非常有用。

#5


1  

There are a few methods, but it depends on your software. If your using Apache, you can look at the following:

有一些方法,但是它取决于您的软件。如果您使用Apache,可以查看以下内容:

apache_request_headers() 

getallheaders() 

apache_response_headers()

for figuring out what you are going to send back.

为了弄清楚你要寄回什么。

I believe that all of those links above require that apache be configured as a module, and not as a cgi. You can check your current settings if you are unsure by using your phpinfo() and seeking Server API. If it says CGI, your out of luck on these functions.

我相信上面所有的链接都要求将apache配置为模块,而不是cgi。如果不确定,可以使用phpinfo()和查找服务器API检查当前设置。如果是CGI,那你就不走运了。

There are however additional variables that you can use if your looking at the CGI installation. These exist both with the module and the CGI/CLI API's btw, and are all children of the $_ENV/$HTTP_ENV_VARS (envirornmental) superglobal:

但是,如果查看CGI安装,您可以使用其他变量。这些都存在于模块和CGI/CLI API的btw中,并且都是$_ENV/$ http_env_v_vars (environmental ornmental) superglobal的子元素:

HTTP_ACCEPT

HTTP_ACCEPT

HTTP_ACCEPT_ENCODING

HTTP_ACCEPT_ENCODING

HTTP_ACCEPT_LANGUAGE

HTTP_ACCEPT_LANGUAGE

HTTP_CONNECTION

HTTP_CONNECTION

HTTP_USER_AGENT

HTTP_USER_AGENT

HTTP_REDIRECT_STATUS

HTTP_REDIRECT_STATUS

HTTP_REMOTE_ADDR

HTTP_REMOTE_ADDR

HTTP_REMOTE_PORT

HTTP_REMOTE_PORT

SERVER_PROTOCOL

SERVER_PROTOCOL

and REQUEST_METHOD

和REQUEST_METHOD

You may have more depending on your configurations, but chances are these are containing all the information you are looking for. If your php version is >= 5.0.0, you can also use get_headers() which I believe is API independant.

您可能会有更多的依赖于您的配置,但是可能是这些包含了您正在寻找的所有信息。如果您的php版本是>= 5.0.0,您也可以使用get_headers(),我认为它是API独立的。

Hope that helps!

希望会有帮助!

For more information please check,

更多信息请查阅,

http://www.codingforums.com/archive/index.php/t-69186.html

http://www.codingforums.com/archive/index.php/t - 69186. - html

#6


1  

If you're on Windows, Fiddler is a very good debugging proxy but you could also try out Charles Proxy which also has a lot of great features and is cross-platform.

如果你在Windows上,Fiddler是一个很好的调试代理,但你也可以试试Charles proxy,它也有很多很棒的功能,而且是跨平台的。

#7


1  

I'm quite fond of Burpsuite, it allows you to inspect and manipulate HTTP requests.

我很喜欢Burpsuite,它允许您检查和操作HTTP请求。

My favourite feature is the ability to intercept a request, modify parameters and then send it on. Very useful for security testing and debugging.

我最喜欢的特性是能够拦截请求,修改参数,然后发送它。对安全性测试和调试非常有用。

#8


1  

If you are using Forefox use Firebug, you can really good see what is happining. In Google Chrome and Safari you have BuildIn Developertools, so you can also see the same informations.

如果你正在使用前狐狸使用Firebug,你可以很好地看到发生了什么。在谷歌版本的Chrome和Safari中,你有内置的开发者工具,所以你也可以看到同样的信息。

I found Fiddler a little bit difficult...

我觉得小提琴手有点难……