Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/lib/rex/proto/ipmi/channel_auth_reply.rb
Views: 11704
# -*- coding: binary -*-12require 'bindata'34module Rex5module Proto6module IPMI78class Channel_Auth_Reply < BinData::Record9endian :little10uint8 :rmcp_version ,label: "RMCP Version"11uint8 :rmcp_padding ,label: "RMCP Padding"12uint8 :rmcp_sequence ,label: "RMCP Sequence"13bit1 :rmcp_mtype ,label: "RMCP Message Type"14bit7 :rmcp_class ,label: "RMCP Message Class"1516uint8 :session_auth_type ,label: "Session Auth Type"17uint32 :session_sequence ,label: "Session Sequence Number"18uint32 :session_id ,label: "Session ID"19uint8 :message_length ,label: "Message Length"2021uint8 :ipmi_tgt_address ,label: "IPMI Target Address"22uint8 :ipmi_tgt_lun ,label: "IPMI Target LUN"23uint8 :ipmi_header_checksum ,label: "IPMI Header Checksum"24uint8 :ipmi_src_address ,label: "IPMI Source Address"25uint8 :ipmi_src_luna ,label: "IPMI Source LUN"26uint8 :ipmi_command ,label: "IPMI Command"27uint8 :ipmi_completion_code ,label: "IPMI Completion Code"2829uint8 :ipmi_channel ,label: "IPMI Channel"3031bit1 :ipmi_compat_20 ,label: "IPMI Version Compatibility: IPMI 2.0+"32bit1 :ipmi_compat_reserved1 ,label: "IPMI Version Compatibility: Reserved 1"33bit1 :ipmi_compat_oem_auth ,label: "IPMI Version Compatibility: OEM Authentication"34bit1 :ipmi_compat_password ,label: "IPMI Version Compatibility: Straight Password"35bit1 :ipmi_compat_reserved2 ,label: "IPMI Version Compatibility: Reserved 2"36bit1 :ipmi_compat_md5 ,label: "IPMI Version Compatibility: MD5"37bit1 :ipmi_compat_md2 ,label: "IPMI Version Compatibility: MD2"38bit1 :ipmi_compat_none ,label: "IPMI Version Compatibility: None"3940bit2 :ipmi_user_reserved1 ,label: "IPMI User Compatibility: Reserved 1"41bit1 :ipmi_user_kg ,label: "IPMI User Compatibility: KG Set to Default"42bit1 :ipmi_user_disable_message_auth ,label: "IPMI User Compatibility: Disable Per-Message Authentication"43bit1 :ipmi_user_disable_user_auth ,label: "IPMI User Compatibility: Disable User-Level Authentication"44bit1 :ipmi_user_non_null ,label: "IPMI User Compatibility: Non-Null Usernames Enabled"45bit1 :ipmi_user_null ,label: "IPMI User Compatibility: Null Usernames Enabled"46bit1 :ipmi_user_anonymous ,label: "IPMI User Compatibility: Anonymous Login Enabled"4748bit6 :ipmi_conn_reserved1 ,label: "IPMI Connection Compatibility: Reserved 1"49bit1 :ipmi_conn_20 ,label: "IPMI Connection Compatibility: 2.0"50bit1 :ipmi_conn_15 ,label: "IPMI Connection Compatibility: 1.5"51bit24 :ipmi_oem_id ,label: "IPMI OEM ID"5253rest :ipm_oem_data ,label: "IPMI OEM Data + Checksum Byte"5455def to_banner56info = self57banner = "#{(info.ipmi_compat_20 == 1) ? "IPMI-2.0" : "IPMI-1.5"} "5859pass_info = []60pass_info << "oem_auth" if info.ipmi_compat_oem_auth == 161pass_info << "password" if info.ipmi_compat_password == 162pass_info << "md5" if info.ipmi_compat_md5 == 163pass_info << "md2" if info.ipmi_compat_md2 == 164pass_info << "null" if info.ipmi_compat_none == 16566user_info = []67user_info << "kg_default" if (info.ipmi_compat_20 == 1 and info.ipmi_user_kg == 1)68user_info << "auth_msg" unless info.ipmi_user_disable_message_auth == 169user_info << "auth_user" unless info.ipmi_user_disable_user_auth == 170user_info << "non_null_user" if info.ipmi_user_non_null == 171user_info << "null_user" if info.ipmi_user_null == 172user_info << "anonymous_user" if info.ipmi_user_anonymous == 17374conn_info = []75conn_info << "1.5" if info.ipmi_conn_15 == 176conn_info << "2.0" if info.ipmi_conn_20 == 17778if info.ipmi_oem_id != 079banner << "OEMID:#{info.ipmi_oem_id} "80end8182banner << "UserAuth(#{user_info.join(", ")}) PassAuth(#{pass_info.join(", ")}) Level(#{conn_info.join(", ")}) "83banner84end85end8687end88end89end909192