TcpCatcher:从钩子发送HTTP请求
是否可以使用 TcpCatcher 从自定义发送 HTTP 请求钩子(Java 类)?我知道 GUI 允许某人编辑和重新发送任何给定的请求,但我希望此过程在某些条件下自动进行(并记录结果等)。
所以,我知道这是可能的,但没有相关文档。我想问一下有没有人做过这个,或者知道怎么做?我正在查看 tcpcatcher.jar
文件,但许多类被命名为 a.class
、b.class
等。因此,如果知识存在于这个社区的某个地方,那就太好了。
Is it possible, with TcpCatcher to send an HTTP request from a custom hook (a Java class)? I know the GUI let someone edit and resend any given request, but I want this process to be automatic on certain conditions (and log the results, etc.)
So, I know it's possible, but no documentation for it. I'm asking if anyone had done this, or know how to do this? I'm looking at the tcpcatcher.jar
file, but many classes are named a.class
, b.class
, etc. So if the knowledge exists somewhere around this community, it would be great.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TcpCatcher 允许您提供自己的 java 类,并在 HTTP 数据包通过代理时调用它。
您可以在钩子内执行任何操作,包括发送其他 HTTP 请求(但顺便说一句,您为什么要这样做呢?)
这是同步钩子的示例(它允许您动态修改数据包)
http://www.tcpcatcher.org/hook_to_change_html.php
只需实现“modifyPacket”方法。
如果您不打算动态修改数据包,则可以选择异步挂钩。
这是一个例子:
http://www.tcpcatcher.org/logging.php
TcpCatcher allows you to provide your own java class and calls it when an HTTP packet goes though the proxy.
You can do anything within the hook including sending an other HTTP request (but why would you want do that by the way ?)
Here is an example of a synchronous hook (it allows you to modify the packet on the fly)
http://www.tcpcatcher.org/hook_to_change_html.php
just implement the "modifyPacket" method
If you do not intend to modify the packet on the fly, you can prefer an asynchronous hook.
Here is an example :
http://www.tcpcatcher.org/logging.php