sshlog

package
v3.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package sshlog 解析 sshd 登录日志

Index

Constants

View Source
const (
	StatusAccepted     = "accepted"
	StatusFailed       = "failed"
	StatusInvalidUser  = "invalid_user"
	StatusDisconnected = "disconnected"
)

登录记录状态

Variables

This section is empty.

Functions

func ParseChunk

func ParseChunk(data []byte) []types.SSHLoginLog

ParseChunk 从连续日志字节中解析 SSH 登录记录

func ParseMessage

func ParseMessage(msg string) *types.SSHLoginLog

ParseMessage 从日志消息中提取 SSH 登录信息,无法识别时返回 nil

func ParseTime

func ParseTime(line string) string

ParseTime 从 syslog 格式行中解析时间,失败返回 "-"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL