Add 3 seconds delay before accepting telnet inputs to avoid bruteforce attacks
This commit is contained in:
parent
0055b73917
commit
88c4a037cb
|
@ -68,6 +68,9 @@ func Serve(config *Options) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Avoid bruteforce
|
||||||
|
time.Sleep(3 * time.Second)
|
||||||
|
|
||||||
streamID = string(buff[:n])
|
streamID = string(buff[:n])
|
||||||
streamID = strings.Replace(streamID, "\r", "", -1)
|
streamID = strings.Replace(streamID, "\r", "", -1)
|
||||||
streamID = strings.Replace(streamID, "\n", "", -1)
|
streamID = strings.Replace(streamID, "\n", "", -1)
|
||||||
|
|
Loading…
Reference in New Issue