mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-17 22:55:27 +00:00
19 lines
409 B
Go
19 lines
409 B
Go
|
|
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())
|
||
|
|
}
|
||
|
|
}
|