如何解密通过套接字从 log4j 发送的消息?
有人可以告诉我如何解密从 org.apache.log4j.net.SocketAppender 在套接字上收到的消息吗? 我尝试了 Chainsaw-sources,但我没有在那里找到任何东西:/
或者 log4j 中的消息在哪里加密?
谢谢
can someone tell me how to decrypt the messages I get at the socket from org.apache.log4j.net.SocketAppender?
I tried the Chainsaw-sources but I didn't find anything there :/
Or where does the message in log4j get encrypted?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
消息未加密。它们是使用 Java ObjectOutputStream 序列化的 LoggingEvent 对象:请参阅 org.apache.log4j.net.SocketAppender。阅读它们的一种方法是使用 Chainsaw,但您始终可以通过将远程套接字字符串包装在 Java ObjectInputStream 中来自行反序列化它们,并复制 Chainsaw 读取事件的操作。
The messages are not encrypted. They are LoggingEvent objects that have been serialized using a Java ObjectOutputStream : see org.apache.log4j.net.SocketAppender. One way to read them is to use Chainsaw, but you could always deserilize them yourself by wrapping the remote socket string in a Java ObjectInputStream, and replicating what Chainsaw does to read the events.
日志记录源使用 log4j 将日志事件发送到控制台、文件或套接字等接收器。 log4j 不会更改日志消息,它只是提供一个 API 来收集和分发消息,并提供一些格式化日志消息的方法。
因此,如果消息被加密,那么发送者就会提供加密的消息。
如果您编辑问题并提供加密日志消息的小样本,这可能会有所帮助。
A logging source uses log4j to send log events to sinks like the console, a file or a socket. log4j doesn't chang the log messages, it just provides an API to collect and distribute the messages and provides some means to format log messages.
So if the messages are encrypted, then it's the sender that provides encrypted messages.
It could help if you edit your question and provide a small sample of an encrypted log messages.
Chainsaw 使用 SocketReceiver 来处理 SocketAppender 发送的事件。
请参阅 http://logging.apache .org/log4j/companions/receivers/apidocs/org/apache/log4j/net/SocketReceiver.html
Chainsaw uses a SocketReceiver to process events sent by SocketAppender.
See http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/net/SocketReceiver.html