Documentation
¶
Overview ¶
Package smpp implements fingerprinting for the SMPP (Short Message Peer-to-Peer) protocol.
SMPP is a telecommunications protocol used for exchanging SMS messages between SMS gateways and message centers. Detection uses a two-phase approach with fallback:
Phase 1a: Detection via enquire_link (preferred)
- Send enquire_link PDU (command_id 0x00000015)
- Validate enquire_link_resp (command_id 0x80000015)
- If successful, proceed to enrichment
Phase 1b: Fallback detection via bind_transceiver
- Some servers only respond to enquire_link when already bound (non-standard)
- If enquire_link fails, send bind_transceiver with dummy credentials
- ANY valid SMPP response confirms protocol (including auth errors, generic_nack)
- Cache response to avoid resending during enrichment
Phase 2: Enrichment via bind_transceiver
- Use cached response from Phase 1b if available
- Otherwise, attempt bind_transceiver with dummy credentials
- Extract system_id from bind_transceiver_resp (even on auth error)
- Parse sc_interface_version TLV (tag 0x0210) for protocol version
- Identify vendor from system_id patterns
PDU Structure (16-byte header):
Offset Size Field Description 0 4 command_length Total PDU length (big-endian) 4 4 command_id Operation identifier (big-endian) 8 4 command_status Result code (big-endian) 12 4 sequence_number Request/response correlation (big-endian)
Key Command IDs:
- enquire_link: 0x00000015
- enquire_link_resp: 0x80000015
- bind_transceiver: 0x00000009
- bind_transceiver_resp: 0x80000009
- generic_nack: 0x80000000
Error codes confirming SMPP (even on auth failure):
- ESME_RINVPASWD (0x0E): Invalid password
- ESME_RINVSYSID (0x0F): Invalid system_id
- ESME_RALYBND (0x05): Already bound
Index ¶
Constants ¶
View Source
const ( SMPP = "smpp" MIN_RESPONSE_SIZE = 16 PDU_HEADER_SIZE = 16 CMD_ENQUIRE_LINK = 0x00000015 CMD_ENQUIRE_LINK_RESP = 0x80000015 CMD_BIND_TRANSCEIVER = 0x00000009 CMD_BIND_TRANSCEIVER_RESP = 0x80000009 CMD_GENERIC_NACK = 0x80000000 STATUS_OK = 0x00000000 TLV_SC_INTERFACE_VERSION = 0x0210 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SMPPPlugin ¶
type SMPPPlugin struct{}
func (*SMPPPlugin) Name ¶
func (p *SMPPPlugin) Name() string
func (*SMPPPlugin) PortPriority ¶
func (p *SMPPPlugin) PortPriority(port uint16) bool
func (*SMPPPlugin) Priority ¶
func (p *SMPPPlugin) Priority() int
func (*SMPPPlugin) Type ¶
func (p *SMPPPlugin) Type() plugins.Protocol
type VendorInfo ¶
VendorInfo holds detected vendor and product information
Click to show internal directories.
Click to hide internal directories.