bash_go_service/shared/pkg/constants/constants.go

17 lines
969 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package constants
const (
MaxRules = 512 + 64 + 32 // 最大规则数量(尽可能把空间占用完)
MaxArgs = 128 // 每条规则的最大参数数量
MaxRuleCmdLength = 256 // 规则命令的最大长度(可执行文件路径受到ext4限制为255)
MaxRuleTypeLength = 32 // 规则类型的最大长度warnerrorinfo
MaxRuleMsgLength = 4096 // 规则消息的最大长度(可以很复杂的内容,长一点)
MaxArgLength = 256 + 128 // 单个参数的最大长度最大可能就是255的文件路径加上前缀
ShmKey = 0x78945 // 共享内存的键值
ShmSize = 32 * 1024 * 1024 // 共享内存的大小(字节)
SoPath = "/etc/exec_hook" // 共享库路径
SoName = "intercept.so" // Hook 文件名称
UpdateInfoFileName = "update_info.bin" // 更新信息文件名称
)