add: [sshd] typos
parent
5bb4df40e8
commit
a158868857
|
@ -14,7 +14,7 @@ type (
|
||||||
// It should provide:
|
// It should provide:
|
||||||
// Set to assign a redis connection to it
|
// Set to assign a redis connection to it
|
||||||
// Parse to parse a line of log
|
// Parse to parse a line of log
|
||||||
// Flush recomputes statisitcs and recompile output
|
// Flush recomputes statistics and recompile output
|
||||||
Compiler interface {
|
Compiler interface {
|
||||||
Set(*sync.WaitGroup, *redis.Conn, *redis.Conn, io.Reader, int, *sync.WaitGroup, *chan error, time.Duration)
|
Set(*sync.WaitGroup, *redis.Conn, *redis.Conn, io.Reader, int, *sync.WaitGroup, *chan error, time.Duration)
|
||||||
SetReader(io.Reader)
|
SetReader(io.Reader)
|
||||||
|
|
|
@ -97,13 +97,13 @@ func (s *SSHDCompiler) Pull(c chan error) {
|
||||||
r1 := *s.r1
|
r1 := *s.r1
|
||||||
|
|
||||||
for {
|
for {
|
||||||
jsoner := json.NewDecoder(s.reader)
|
jsoner := json.NewDecoder(s.reader)
|
||||||
DecodeLoop:
|
DecodeLoop:
|
||||||
for jsoner.More() {
|
for jsoner.More() {
|
||||||
var m GrokedSSHD
|
var m GrokedSSHD
|
||||||
err := jsoner.Decode(&m)
|
err := jsoner.Decode(&m)
|
||||||
if err := jsoner.Decode(&m); err == io.EOF {
|
if err := jsoner.Decode(&m); err == io.EOF {
|
||||||
// On EOF we break this loop to go to a sleep
|
// On EOF we break this loop to go to a sleep
|
||||||
break DecodeLoop
|
break DecodeLoop
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
s.teardown(err)
|
s.teardown(err)
|
||||||
|
@ -532,7 +532,7 @@ func csvStats(s *SSHDCompiler, v string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func MISPexport(s *SSHDCompiler) error {
|
func (s *SSHDCompiler) MISPexport() error {
|
||||||
|
|
||||||
today := time.Now()
|
today := time.Now()
|
||||||
dstr := fmt.Sprintf("%v%v%v", today.Year(), fmt.Sprintf("%02d", int(today.Month())), fmt.Sprintf("%02d", int(today.Day())))
|
dstr := fmt.Sprintf("%v%v%v", today.Year(), fmt.Sprintf("%02d", int(today.Month())), fmt.Sprintf("%02d", int(today.Day())))
|
||||||
|
|
Loading…
Reference in New Issue