From 2f5c948a7431648a7e0d2275fb8b7007b1a875dc Mon Sep 17 00:00:00 2001 From: CausticKirbyZ Date: Wed, 11 Jan 2023 08:46:23 -0600 Subject: [PATCH] fixed bug with --strip-user-string where it was stripping from both sides not just the end --- src/helpers/helpers.cr | 3 ++- src/spray_types/sprayer.cr | 14 +++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/helpers/helpers.cr b/src/helpers/helpers.cr index 82a84f3..3327f1d 100644 --- a/src/helpers/helpers.cr +++ b/src/helpers/helpers.cr @@ -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 \ No newline at end of file +end + diff --git a/src/spray_types/sprayer.cr b/src/spray_types/sprayer.cr index 9dbb99e..02bb30f 100755 --- a/src/spray_types/sprayer.cr +++ b/src/spray_types/sprayer.cr @@ -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 = "" @@ -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