SAP Message Server

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_SEND_NAME
../_images/protocols_SAPMS_4_1.png
IFlag: MS_SEND_TYPE
../_images/protocols_SAPMS_4_3.png
IFlag: MS_LOGIN
../_images/protocols_SAPMS_4_5.png
IFlag: MS_LOGOUT
../_images/protocols_SAPMS_4_7.png
IFlag: MS_ADM_OPCODES
../_images/protocols_SAPMS_4_9.png
IFlag: MS_MOD_MSGTYPES
../_images/protocols_SAPMS_4_11.png
IFlag: MS_SEND_TYPE_ONCE
../_images/protocols_SAPMS_4_13.png
IFlag: MS_LOGIN_2
../_images/protocols_SAPMS_4_15.png
IFlag: MS_MOD_STATE
../_images/protocols_SAPMS_4_17.png
IFlag: MS_J2EE_LOGIN
../_images/protocols_SAPMS_4_19.png
IFlag: MS_J2EE_SEND_TO_CLUSTERID
../_images/protocols_SAPMS_4_21.png
IFlag: MS_J2EE_SEND_BROADCAST
../_images/protocols_SAPMS_4_23.png
IFlag: MS_SEND_TYPE_ACK
../_images/protocols_SAPMS_4_25.png
IFlag: MS_J2EE_LOGIN_2
../_images/protocols_SAPMS_4_27.png
IFlag: MS_SEND_SERVICE
../_images/protocols_SAPMS_4_29.png
IFlag: MS_J2EE_LOGIN_3
../_images/protocols_SAPMS_4_31.png
IFlag: MS_J2EE_LOGIN_4
../_images/protocols_SAPMS_4_33.png

SAP Message Server packet opcodes

In [3]:
for opcode in ms_opcode_values:
    print("Opcode: {}".format(ms_opcode_values[opcode]))
    if opcode in [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_SERVER_CHG
../_images/protocols_SAPMS_6_1.png
Opcode: MS_SERVER_ADD
../_images/protocols_SAPMS_6_3.png
Opcode: MS_SERVER_SUB
../_images/protocols_SAPMS_6_5.png
Opcode: MS_SERVER_MOD
../_images/protocols_SAPMS_6_7.png
Opcode: MS_SERVER_LST
../_images/protocols_SAPMS_6_9.png
Opcode: MS_CHANGE_IP
../_images/protocols_SAPMS_6_11.png
Opcode: MS_SET_SECURITY_KEY
../_images/protocols_SAPMS_6_13.png
Opcode: MS_GET_SECURITY_KEY
../_images/protocols_SAPMS_6_15.png
Opcode: MS_GET_SECURITY_KEY2
../_images/protocols_SAPMS_6_17.png
Opcode: MS_GET_HWID
../_images/protocols_SAPMS_6_19.png
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
../_images/protocols_SAPMS_6_21.png
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
../_images/protocols_SAPMS_6_23.png
Opcode: MS_SOFT_SHUTDOWN
Opcode: MS_DUMP_INFO
Opcode: MS_FILE_RELOAD
Opcode: MS_RESET_DOMAIN_CONN
Opcode: MS_NOOP
Opcode: MS_SET_TXT
../_images/protocols_SAPMS_6_25.png
Opcode: MS_GET_TXT
../_images/protocols_SAPMS_6_27.png
Opcode: MS_COUNTER_CREATE
../_images/protocols_SAPMS_6_29.png
Opcode: MS_COUNTER_DELETE
../_images/protocols_SAPMS_6_31.png
Opcode: MS_COUNTER_INCREMENT
../_images/protocols_SAPMS_6_33.png
Opcode: MS_COUNTER_DECREMENT
../_images/protocols_SAPMS_6_35.png
Opcode: MS_COUNTER_REGISTER
../_images/protocols_SAPMS_6_37.png
Opcode: MS_COUNTER_GET
../_images/protocols_SAPMS_6_39.png
Opcode: MS_COUNTER_LST
../_images/protocols_SAPMS_6_41.png
Opcode: MS_SET_LOGON
../_images/protocols_SAPMS_6_43.png
Opcode: MS_GET_LOGON
../_images/protocols_SAPMS_6_45.png
Opcode: MS_DEL_LOGON
../_images/protocols_SAPMS_6_47.png
Opcode: MS_SERVER_DISC
Opcode: MS_SERVER_SHUTDOWN
../_images/protocols_SAPMS_6_49.png
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
../_images/protocols_SAPMS_6_51.png
Opcode: MS_GET_PROPERTY
../_images/protocols_SAPMS_6_53.png
Opcode: MS_DEL_PROPERTY
../_images/protocols_SAPMS_6_55.png
Opcode: MS_IP_PORT_TO_NAME
../_images/protocols_SAPMS_6_57.png
Opcode: MS_CHECK_ACL
../_images/protocols_SAPMS_6_59.png
Opcode: MS_LICENSE_SRV
Opcode: MS_SERVER_TEST_SOFT_SHUTDOWN
../_images/protocols_SAPMS_6_61.png
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())
../_images/protocols_SAPMS_8_0.png
../_images/protocols_SAPMS_8_1.png
../_images/protocols_SAPMS_8_2.png
../_images/protocols_SAPMS_8_3.png

SAP Message Server stats packets

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

SAP Message Server Logon packet

In [6]:
p = SAPMSLogon()
p.canvas_dump()
Out[6]:
../_images/protocols_SAPMS_12_0.png

SAP Message Server Counter packet

In [7]:
p = SAPMSCounter()
p.canvas_dump()
Out[7]:
../_images/protocols_SAPMS_14_0.png

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
../_images/protocols_SAPMS_16_1.png
Adm opcode: AD_RZL_STRG
../_images/protocols_SAPMS_16_3.png
Adm opcode: AD_SHARED_PARAMETER
../_images/protocols_SAPMS_16_5.png