snmp

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: Apache-2.0 Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package snmp implements active SNMP pentest operations (write-access probing).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PerformAuth added in v0.1.3

func PerformAuth(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*pentestfern.AuthResult, error)

PerformAuth tests SNMP community strings (v1/v2c) or SNMPv3 usernames and returns an AuthResult. For v1/v2c: iterates config.Communities (default: ["public","private"]), tests each by issuing a GET on sysDescr. Success = non-error response with a readable PDU value. For v3: iterates config.Usernames (default: ["public"]) with NoAuthNoPriv. Honors StopOnFirstSuccess and SuccessfulOnly.

func PerformRead added in v0.1.3

func PerformRead(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.ReadResult, error)

PerformRead issues SNMP GETs (or GETBULK walks) for the configured OIDs using each available community (v1/v2c) or username (v3). It returns a ReadResult for the target.

func RunPentest

RunPentest performs SNMP pentest operations across all configured targets and actions.

func RunWriteTest

func RunWriteTest(ctx context.Context, target string, config *snmpfern.PentestSnmpConfig) (*snmpfern.WriteTestResult, []string)

RunWriteTest probes for writable SNMP access by issuing an SNMP SET against a benign OID (sysContact by default), restoring the original value on success. For v1/v2c it tests each community string; for v3 it tests NoAuthNoPriv access for each configured username.

Types

This section is empty.

Jump to

Keyboard shortcuts

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