55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# File 'lib/rex/proto/ipmi/channel_auth_reply.rb', line 55
def to_banner
info = self
banner = "#{(info.ipmi_compat_20 == 1) ? "IPMI-2.0" : "IPMI-1.5"} "
pass_info = []
pass_info << "oem_auth" if info.ipmi_compat_oem_auth == 1
pass_info << "password" if info.ipmi_compat_password == 1
pass_info << "md5" if info.ipmi_compat_md5 == 1
pass_info << "md2" if info.ipmi_compat_md2 == 1
pass_info << "null" if info.ipmi_compat_none == 1
user_info = []
user_info << "kg_default" if (info.ipmi_compat_20 == 1 and info.ipmi_user_kg == 1)
user_info << "auth_msg" unless info.ipmi_user_disable_message_auth == 1
user_info << "auth_user" unless info.ipmi_user_disable_user_auth == 1
user_info << "non_null_user" if info.ipmi_user_non_null == 1
user_info << "null_user" if info.ipmi_user_null == 1
user_info << "anonymous_user" if info.ipmi_user_anonymous == 1
conn_info = []
conn_info << "1.5" if info.ipmi_conn_15 == 1
conn_info << "2.0" if info.ipmi_conn_20 == 1
if info.ipmi_oem_id != 0
banner << "OEMID:#{info.ipmi_oem_id} "
end
banner << "UserAuth(#{user_info.join(", ")}) PassAuth(#{pass_info.join(", ")}) Level(#{conn_info.join(", ")}) "
banner
end
|