Skip to content

Commit

Permalink
fixed bug with --strip-user-string where it was stripping from both s…
Browse files Browse the repository at this point in the history
…ides not just the end
  • Loading branch information
CausticKirbyZ committed Jan 11, 2023
1 parent 830a425 commit 2f5c948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/helpers/helpers.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ def check_version() : String
# web request to the version file on github
version = HTTP::Client.get("https://raw.githubusercontent.com/CausticKirbyZ/SprayCannon/main/src/helpers/VERSION.cr").body
return version.split("=").last.delete("\"").strip()
end
end

14 changes: 3 additions & 11 deletions src/spray_types/sprayer.cr
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
require "colorize"
require "http/client"


# class User
# @username = ""
# @password = ""
# @lockedout = false
# @attempts = [] of String
# end

class SprayStatus
property username : String = ""
property password : String = ""
Expand Down Expand Up @@ -210,13 +202,13 @@ class Sprayer
res = spray(uname, pass)

elsif @strip_user_string != "" && @strip_pass_string == "" # username striping
res = spray(uname.strip(@strip_user_string), pass)
res = spray(uname.rchop(@strip_user_string), pass)

elsif @strip_user_string == "" && @strip_pass_string != "" # password stripping
res = spray(uname, pass.strip(@strip_pass_string))
res = spray(uname, pass.rchop(@strip_pass_string))

elsif @strip_user_string != "" && @strip_pass_string != "" # both stripping
res = spray(uname.strip(@strip_user_string), pass.strip(@strip_pass_string))
res = spray(uname.rchop(@strip_user_string), pass.strip(@strip_pass_string))
end

rescue e
Expand Down

0 comments on commit 2f5c948

Please sign in to comment.