SAP Message Server (MS)

The following subsections show a graphical representation of the main protocol packets and how to generate them.

First we need to perform some setup to import the packet classes:


In [1]:
from pysap.SAPMS import *
from IPython.display import display

SAP Message Server packet


In [2]:
for iflag in ms_iflag_values:
    p = SAPMS(iflag=iflag)
    print("IFlag: {}".format(ms_iflag_values[iflag]))
    display(p.canvas_dump())


IFlag: MS_UNKNOWN
IFlag: MS_SEND_NAME
IFlag: MS_SEND_TYPE
IFlag: MS_LOGIN
IFlag: MS_LOGOUT
IFlag: MS_ADM_OPCODES
IFlag: MS_MOD_MSGTYPES
IFlag: MS_SEND_TYPE_ONCE
IFlag: MS_LOGIN_2
IFlag: MS_MOD_STATE
IFlag: MS_J2EE_LOGIN
IFlag: MS_J2EE_SEND_TO_CLUSTERID
IFlag: MS_J2EE_SEND_BROADCAST
IFlag: MS_SEND_TYPE_ACK
IFlag: MS_J2EE_LOGIN_2
IFlag: MS_SEND_SERVICE
IFlag: MS_J2EE_LOGIN_3
IFlag: MS_J2EE_LOGIN_4

SAP Message Server packet opcodes


In [3]:
for opcode in ms_opcode_values:
    print("Opcode: {}".format(ms_opcode_values[opcode]))
    if opcode in [0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x11, 0x1c, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2f, 0x43, 0x44, 0x45, 0x46, 0x47, 0x4a]:
        p = SAPMS(iflag=1, opcode=opcode)
        display(p.canvas_dump())


Opcode: MS_DP_ADM
Opcode: MS_SERVER_CHG
Opcode: MS_SERVER_ADD
Opcode: MS_SERVER_SUB
Opcode: MS_SERVER_MOD
Opcode: MS_SERVER_LST
Opcode: MS_CHANGE_IP
Opcode: MS_SET_SECURITY_KEY
Opcode: MS_GET_SECURITY_KEY
Opcode: MS_GET_SECURITY_KEY2
Opcode: MS_GET_HWID
Opcode: MS_INCRE_TRACE
Opcode: MS_DECRE_TRACE
Opcode: MS_RESET_TRACE
Opcode: MS_ACT_STATISTIC
Opcode: MS_DEACT_STATISTIC
Opcode: MS_RESET_STATISTIC
Opcode: MS_GET_STATISTIC
Opcode: MS_DUMP_NIBUFFER
Opcode: MS_RESET_NIBUFFER
Opcode: MS_OPEN_REQ_LST
Opcode: MS_SERVER_INFO
Opcode: MS_SERVER_LIST
Opcode: MS_SERVER_ENTRY
Opcode: MS_DOMAIN_INFO
Opcode: MS_DOMAIN_LIST
Opcode: MS_DOMAIN_ENTRY
Opcode: MS_MAP_URL_TO_ADDR
Opcode: MS_GET_CODEPAGE
Opcode: MS_SOFT_SHUTDOWN
Opcode: MS_DUMP_INFO
Opcode: MS_FILE_RELOAD
Opcode: MS_RESET_DOMAIN_CONN
Opcode: MS_NOOP
Opcode: MS_SET_TXT
Opcode: MS_GET_TXT
Opcode: MS_COUNTER_CREATE
Opcode: MS_COUNTER_DELETE
Opcode: MS_COUNTER_INCREMENT
Opcode: MS_COUNTER_DECREMENT
Opcode: MS_COUNTER_REGISTER
Opcode: MS_COUNTER_GET
Opcode: MS_COUNTER_LST
Opcode: MS_SET_LOGON
Opcode: MS_GET_LOGON
Opcode: MS_DEL_LOGON
Opcode: MS_SERVER_DISC
Opcode: MS_SERVER_SHUTDOWN
Opcode: MS_SERVER_SOFT_SHUTDOWN
Opcode: MS_J2EE_CLUSTERNODE_CHG
Opcode: MS_J2EE_CLUSTERNODE_ADD
Opcode: MS_J2EE_CLUSTERNODE_SUB
Opcode: MS_J2EE_CLUSTERNODE_MOD
Opcode: MS_J2EE_CLUSTERNODE_LST
Opcode: MS_J2EE_SERVICE_REG
Opcode: MS_J2EE_SERVICE_UNREG
Opcode: MS_J2EE_SERVICE_LST
Opcode: MS_J2EE_SERVICE_ADD
Opcode: MS_J2EE_SERVICE_SUB
Opcode: MS_J2EE_SERVICE_MOD
Opcode: MS_J2EE_MOD_STATE
Opcode: MS_J2EE_SERVICE_GET
Opcode: MS_J2EE_SERVICE_REG2
Opcode: MS_NITRACE_SETGET
Opcode: MS_SERVER_LONG_LIST
Opcode: MS_J2EE_DEBUG_ENABLE
Opcode: MS_J2EE_DEBUG_DISABLE
Opcode: MS_SET_PROPERTY
Opcode: MS_GET_PROPERTY
Opcode: MS_DEL_PROPERTY
Opcode: MS_IP_PORT_TO_NAME
Opcode: MS_CHECK_ACL
Opcode: MS_LICENSE_SRV
Opcode: MS_SERVER_TEST_SOFT_SHUTDOWN
Opcode: MS_J2EE_RECONNECT_P1
Opcode: MS_J2EE_RECONNECT_P2

SAP Message Server Client packets


In [4]:
for client_cls in [SAPMSClient1, SAPMSClient2, SAPMSClient3, SAPMSClient4]:
    p = client_cls()
    display(p.canvas_dump())


SAP Message Server stats packets


In [5]:
for stats_cls in [SAPMSStat3]:
    p = stats_cls()
    display(p.canvas_dump())


SAP Message Server Logon packet


In [6]:
p = SAPMSLogon()
p.canvas_dump()


Out[6]:

SAP Message Server Counter packet


In [7]:
p = SAPMSCounter()
p.canvas_dump()


Out[7]:

SAP Message Server Adm Record opcodes


In [8]:
for adm_opcode in [0x01, 0x15, 0x2e]:
    p = SAPMSAdmRecord(opcode=adm_opcode)
    print("Adm opcode: {}".format(ms_adm_opcode_values[adm_opcode]))
    display(p.canvas_dump())


Adm opcode: AD_PROFILE
Adm opcode: AD_RZL_STRG
Adm opcode: AD_SHARED_PARAMETER

SAP Message Server Dispatcher Info packets


In [9]:
for dp_info_cls in [SAPDPInfo1, SAPDPInfo2, SAPDPInfo3]:
    p = dp_info_cls()
    display(p.canvas_dump())