开发者

How can I decrypt the Messages sent from log4j over a socket?

can someone tell me how to decrypt the messages I get at the socket from org.apache.log4j.net.SocketAppender? 开发者_StackOverflow中文版I tried the Chainsaw-sources but I didn't find anything there :/

Or where does the message in log4j get encrypted?

Thanks


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.


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 uses a SocketReceiver to process events sent by SocketAppender.

See http://logging.apache.org/log4j/companions/receivers/apidocs/org/apache/log4j/net/SocketReceiver.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜