Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AdaLogics/go-fuzz-headers
/ functions
Functions
60 in github.com/AdaLogics/go-fuzz-headers
⨍
Functions
60
◇
Types & classes
5
↓ 20 callers
Method
GetInt
()
consumer.go:367
↓ 13 callers
Method
GetString
()
consumer.go:484
↓ 9 callers
Method
GetBool
()
consumer.go:513
↓ 8 callers
Function
NewConsumer
(fuzzData []byte)
consumer.go:60
↓ 6 callers
Method
GetUint32
()
consumer.go:415
↓ 6 callers
Method
Uint64
()
bytesource/bytesource.go:41
↓ 5 callers
Method
GetBytes
()
consumer.go:455
↓ 5 callers
Method
GetNBytes
(numberOfBytes int)
consumer.go:385
↓ 2 callers
Method
GenerateStruct
(targetStruct interface{})
consumer.go:116
↓ 2 callers
Method
GenerateStruct
(targetStruct interface{})
funcs.go:56
↓ 2 callers
Method
GetByte
()
consumer.go:376
↓ 2 callers
Method
GetSQLString
GetSQLString is the API that users interact with. Usage: f := NewConsumer(data) sqlString, err := f.GetSQLString()
sql.go:538
↓ 2 callers
Function
IsDivisibleBy
(n int, divisibleby int)
consumer.go:56
↓ 2 callers
Method
consumeUint64
consumeUint64 reads 8 bytes from the input and convert them to a uint64. It assumes that the the bytes reader is not empty.
bytesource/bytesource.go:67
↓ 2 callers
Function
containsString
Simple utility function to check if a string slice contains a string.
sql.go:38
↓ 2 callers
Method
createTarFileBody
()
consumer.go:616
↓ 2 callers
Method
fuzzStruct
(e reflect.Value, customFunctions bool)
consumer.go:158
↓ 2 callers
Method
getTarFilename
getTarFileName is similar to GetString(), but creates string based on the length of f.data to reduce the likelihood of overflowing f.data.
consumer.go:652
↓ 2 callers
Function
setTarHeaderFormat
(hdr *tar.Header, f *ConsumeFuzzer)
consumer.go:551
↓ 2 callers
Function
setTarHeaderTypeflag
(hdr *tar.Header, f *ConsumeFuzzer)
consumer.go:570
↓ 1 callers
Method
GenerateWithCustom
(targetStruct interface{})
funcs.go:51
↓ 1 callers
Method
GetFloat32
()
consumer.go:924
↓ 1 callers
Method
GetFloat64
()
consumer.go:941
↓ 1 callers
Method
GetUint
()
consumer.go:438
↓ 1 callers
Method
GetUint16
()
consumer.go:400
↓ 1 callers
Method
GetUint64
()
consumer.go:423
↓ 1 callers
Method
Int63
()
bytesource/bytesource.go:56
↓ 1 callers
Function
chooseToken
(tokens []string, f *ConsumeFuzzer)
sql.go:345
↓ 1 callers
Function
createAlterTableStmt
Creates an 'alter table' statement. 'alter table' is an exception in that it has its own function. The majority of statements are created by 'createSt
sql.go:310
↓ 1 callers
Function
createQuery
Creates a semi-structured query. It creates a string that is a combination of the keywords and random strings.
sql.go:496
↓ 1 callers
Function
createStmt
(f *ConsumeFuzzer)
sql.go:401
↓ 1 callers
Function
createStmtArgs
Creates the arguments of a statements. In a select statement that would be everything after "select".
sql.go:439
↓ 1 callers
Function
getKeyword
returns a keyword by index
sql.go:23
↓ 1 callers
Method
setCustom
(v reflect.Value)
consumer.go:121
Method
AddFuncs
(fuzzFuncs []interface{})
funcs.go:26
Method
AllowNonUTF8Strings
()
consumer.go:108
Method
AllowUnexportedFields
()
consumer.go:100
Method
CreateFiles
CreateFiles creates pseudo-random files in rootDir. It creates subdirs and places the files there. It is the callers responsibility to ensure that roo
consumer.go:815
Method
CreateSlice
(targetSlice interface{})
consumer.go:958
Method
DisallowNonUTF8Strings
()
consumer.go:112
Method
DisallowUnexportedFields
()
consumer.go:104
Method
FuzzMap
(m interface{})
consumer.go:526
Method
GenerateStructWithCustom
(targetStruct interface{})
funcs.go:60
Method
GetRune
()
consumer.go:916
Method
GetStringArray
()
consumer.go:341
Method
GetStringFrom
GetStringFrom returns a string that can only consist of characters included in possibleChars. It returns an error if the created string does not have
consumer.go:901
Function
New
New returns a new ByteSource from a given slice of bytes.
bytesource/bytesource.go:30
Method
Seed
(seed int64)
bytesource/bytesource.go:60
Function
SetMaxTotalLen
(newLen uint32)
consumer.go:39
Method
Split
(minCalls, maxCalls int)
consumer.go:69
Method
TarBytes
TarBytes returns valid bytes for a tar archive
consumer.go:688
Method
TarFiles
This is similar to TarBytes, but it returns a series of files instead of raw tar bytes. The advantage of this api is that it is cheaper in terms of cp
consumer.go:762
Function
TestGeBytes1
(t *testing.T)
consumer_test.go:151
Function
TestGeBytes2
(t *testing.T)
consumer_test.go:177
Function
TestGeBytes3
(t *testing.T)
consumer_test.go:203
Function
TestGetUint32
*func TestTarBytes(t *testing.T) { data := []byte{ 0x01, // number of files 0x00, 0x00, 0x00, 0x08, // Length of first file nam
consumer_test.go:134
Function
TestSQLAPI
(t *testing.T)
sql_test.go:21
Function
TestStruct_fuzzing1
(t *testing.T)
consumer_test.go:30
Function
TestStruct_fuzzing2
Tests that we can create long byte slices in structs
consumer_test.go:58
Function
returnTarBytes
(buf []byte)
consumer.go:530