mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-01-03 15:52:20 +00:00
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
Block a user