Java RMI: requires sniffer

How do I sniff and analyze Java RMI traffic? There are only very local solutions in Wireshark I need to know exactly which methods to call and args passed through sniffing TCP connections

Solution

Do you need to "sniff" it, or can you deploy a custom socket factory on the client or server?

In the past, I created a custom RMI server socket factory, which created a "tee" on the stream read by the RMI service Since RMI runtime usually reads one of the streams, my code also obtains a copy of jrmp for parsing For my part, I'm logging remote calls in serialization, including their parameters, so that I can "replay" them later for load testing Enabling RMI logging is not enough

One problem is that jrmp documentation is poor and, in some cases, inaccurate Another reason is that many of the necessary code is not part of the core Java API It's complicated I think I had a good understanding of RMI before I started, but after completing this small project, I was surprised that I had to learn more

Similar methods can be applied to the application data captured by Wireshark, but I have never written an analyzer for Wireshark, and I'm not sure how complex it is

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>