Documentation
¶
Overview ¶
Package fuzzer is the entry point for go-fuzz.
Index ¶
- Constants
- Variables
- func RunFuzzer(protocol, target, chainDir string, engine int, threads int) error
- func SetFuzzyVMDir()
- type EthMaker
- func (m *EthMaker) PacketStart(traceOutput io.Writer, seed eth.Packet, stats *UDPPacketStats) error
- func (m *EthMaker) SetResult(root, logs common.Hash)
- func (m *EthMaker) Start(traceOutput io.Writer) error
- func (m *EthMaker) ToGeneralStateTest(name string) *GeneralStateTest
- func (m *EthMaker) ToSubTest() *stJSON
- type GeneralStateTest
- type Maker
- type Nonce
- type SnapMaker
- type StateSeries
- type UDPPacketStats
- type V4Maker
- func (m *V4Maker) Close()
- func (m *V4Maker) PacketStart(traceOutput io.Writer, seed discv4.Packet, stats *UDPPacketStats) error
- func (m *V4Maker) SetResult(root, logs common.Hash)
- func (m *V4Maker) Start(traceOutput io.Writer) error
- func (m *V4Maker) ToGeneralStateTest(name string) *GeneralStateTest
- func (m *V4Maker) ToSubTest() *stJSON
- type V5Maker
- func (m *V5Maker) Close()
- func (m *V5Maker) PacketStart(traceOutput io.Writer, seed discv5.Packet, stats *UDPPacketStats) error
- func (m *V5Maker) SetResult(root, logs common.Hash)
- func (m *V5Maker) Start(traceOutput io.Writer) error
- func (m *V5Maker) ToGeneralStateTest(name string) *GeneralStateTest
- func (m *V5Maker) ToSubTest() *stJSON
Constants ¶
View Source
const ( SequenceLength = 10 MutateCount = 100 OutputDir = "./output" SaveFlag = true PacketSleepTime = 100 * time.Millisecond // Single packet send and waiting time ShouldTrace = false )
View Source
const (
NoPendingRequired byte = 0
)
Variables ¶
View Source
var (
EnvKey = "FUZZYDIR"
)
View Source
var (
HandshakeTimeout = 1 * time.Second // Timeout for handshake
)
Functions ¶
func SetFuzzyVMDir ¶
func SetFuzzyVMDir()
SetFuzzyVMDir sets the output directory for FuzzyVM If the environment variable FUZZYDIR is set, the output directory will be set to that, otherwise it will be set to a temp dir (for unit tests)
Types ¶
type EthMaker ¶
type EthMaker struct { SuiteList []*eth.Suite PakcetSeed []eth.Packet // Use store packet seed to mutator Series []StateSeries // contains filtered or unexported fields }
func NewEthMaker ¶
func (*EthMaker) PacketStart ¶
func (*EthMaker) ToGeneralStateTest ¶
func (m *EthMaker) ToGeneralStateTest(name string) *GeneralStateTest
type GeneralStateTest ¶
type GeneralStateTest map[string]*stJSON
type SnapMaker ¶
type SnapMaker struct { SuiteList []*eth.Suite PakcetSeed []snap.Packet // Use store packet seed to mutator Series []StateSeries // contains filtered or unexported fields }
func NewSnapMaker ¶
func (*SnapMaker) PacketStart ¶
func (*SnapMaker) ToGeneralStateTest ¶
func (m *SnapMaker) ToGeneralStateTest(name string) *GeneralStateTest
type StateSeries ¶
type UDPPacketStats ¶
type UDPPacketStats struct { ExecuteCount int // Execute count CheckTrueFail int // First type of exception: Check is true but Success is false CheckFalsePass int // Second type of exception: Check is false but Success is true CheckFalsePassOK int CheckFalsePassBad int CheckTruePass int // Third type of exception: Check is true but Success is true }
type V4Maker ¶
type V4Maker struct { Client *discv4.UDPv4 TargetList []*enode.Node PakcetSeed []discv4.Packet // Use store packet seed to mutator Series []StateSeries // contains filtered or unexported fields }
func NewV4Maker ¶
func (*V4Maker) PacketStart ¶
func (m *V4Maker) PacketStart(traceOutput io.Writer, seed discv4.Packet, stats *UDPPacketStats) error
PacketStart executes fuzzing by sending single packets in multiple goroutines and collecting feedback
func (*V4Maker) ToGeneralStateTest ¶
func (m *V4Maker) ToGeneralStateTest(name string) *GeneralStateTest
type V5Maker ¶
type V5Maker struct { Client *discv5.UDPv5 TargetList []*enode.Node PakcetSeed []discv5.Packet // Use store packet seed to mutator Series []StateSeries // contains filtered or unexported fields }
func NewV5Maker ¶
func (*V5Maker) PacketStart ¶
func (*V5Maker) ToGeneralStateTest ¶
func (m *V5Maker) ToGeneralStateTest(name string) *GeneralStateTest
Click to show internal directories.
Click to hide internal directories.