nuclei/v2/pkg/protocols/common/generators/generators_test.go

19 lines
409 B
Go
Raw Normal View History

2020-12-22 01:02:38 +05:30
package generators
import (
"fmt"
"testing"
"github.com/stretchr/testify/require"
)
func TestSniperGenerator(t *testing.T) {
generator, err := New(map[string]interface{}{"username": []string{"admin", "password", "login", "test"}}, Sniper)
require.Nil(t, err, "could not create generator")
iterator := generator.NewIterator()
for iterator.Next() {
fmt.Printf("value: %v\n", iterator.Value())
}
}