diff options
author | Logan Hunt <logan.hunt@usu.edu> | 2023-01-24 12:12:58 -0700 |
---|---|---|
committer | Logan Hunt <logan.hunt@usu.edu> | 2023-01-24 12:14:07 -0700 |
commit | ce06ddd669363651d335f5a4c05e1a347020a3c1 (patch) | |
tree | 74e60d55d9c7eaa42b269a6d59de43c86fdb9b77 /lib | |
parent | a634901317de06ca09f3d78b3d0205c4d19df0cf (diff) | |
download | chessh-ce06ddd669363651d335f5a4c05e1a347020a3c1.tar.gz chessh-ce06ddd669363651d335f5a4c05e1a347020a3c1.zip |
Redis time
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chessh/ssh/client/client.ex | 1 | ||||
-rw-r--r-- | lib/chessh/ssh/daemon.ex | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/chessh/ssh/client/client.ex b/lib/chessh/ssh/client/client.ex index 381f337..2554d64 100644 --- a/lib/chessh/ssh/client/client.ex +++ b/lib/chessh/ssh/client/client.ex @@ -76,6 +76,7 @@ defmodule Chessh.SSH.Client do |> Keyword.values() case Hammer.check_rate_inc( + :in_memory, "player-session-#{state.player_session.id}-burst-message-rate", burst_ms, burst_rate, diff --git a/lib/chessh/ssh/daemon.ex b/lib/chessh/ssh/daemon.ex index 6be6732..d602781 100644 --- a/lib/chessh/ssh/daemon.ex +++ b/lib/chessh/ssh/daemon.ex @@ -37,7 +37,7 @@ defmodule Chessh.SSH.Daemon do "#{username} on bucket #{rateId} got their password wrong, or they don't exist! Point at them and laugh!!!!" ) - case Hammer.check_rate_inc(rateId, jail_timeout_ms, jail_attempt_threshold, 1) do + case Hammer.check_rate_inc(:redis, rateId, jail_timeout_ms, jail_attempt_threshold, 1) do {:allow, _count} -> Logger.debug("Bucket #{rateId} can continue to brute force though") false |