Logging

UGFzc3dvcmQ6 是什么?

| Security | #Postfix | #SASL | #Base64 | #Logging | #Debug | #Email

今天无意中看了一眼服务器日志,结果发现了一些奇怪的消息:

1
2
3
4
5
6
7
8
9
warning: unknown[122.168.199.151]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[176.8.89.240]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[185.232.21.42]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[206.217.216.13]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[220.196.249.145]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[5.253.204.74]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[70.45.212.49]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[93.177.73.82]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
warning: unknown[93.177.75.66]: SASL LOGIN authentication failed: UGFzc3dvcmQ6

这里的 UGFzc3dvcmQ6 是什么呢?从直觉上看似乎是个 base64 编码的字符串。解码试试看,果然:

阅读全文…( 本文约 221 字,阅读大致需要 1 分钟 )

记一笔,关于 syslogd

| Development | #syslogd | #logging | #UTF-8 | #sysadmin

syslogd 的 -8 参数可以让汉字通过。以下摘自 manual page:

1
2
3
4
5
6
     -8      Tells syslogd not to interfere with 8-bit data.  Normally syslogd
             will replace C1 control characters (ISO 8859 and Unicode
             characters) with their "M-x" equivalent.  Note, this option does
             not change the way syslogd alters control characters (see
             iscntrl(3)).  They will always be replaced with their "^x" equiv‐
             alent.

不过这事有点坑人,为啥默认不 -8 呢?出于安全方面的原因吗?差点就开始改代码了……

参与评论