Skip to content

Commit

Permalink
added a simple basic auth check for 200 codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
CausticKirbyZ committed Oct 4, 2023
1 parent 9e19ecb commit facaaf4
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/spray_types/sprayer.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
require "colorize"
require "http/client"




annotation SprayType
end

class SprayStatus
property username : String = ""
property password : String = ""
Expand Down
29 changes: 28 additions & 1 deletion src/spraycannon.cr
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,31 @@ parser = OptionParser.new() do |opts|
end

opts.on("--list-spraytypes","List the available spraytypes.") do
["msol (o365)", "msol_adfs", "Okta", "ExchangeEAS","ExchangeOWA","cisco_vpn","ADFS_forms","vpn_sonicwall_virtualoffice","vpn_sonicwall_virtualoffice_5x","vpn_sonicwall_digest","sonicwall_sma","vpn_fortinet","spiceworks","InfinateCampus","egnyte","global_protect","ESXI_web", "VMWare_Horizon","Mattermost", "Citrix","IMAP"].each {|t| puts t}

[ "msol (o365)",
"msol_adfs",
"Okta",
"ExchangeEAS","ExchangeOWA",
"cisco_vpn",
"ADFS_forms",
"vpn_sonicwall_virtualoffice",
"vpn_sonicwall_virtualoffice_5x",
"vpn_sonicwall_digest",
"sonicwall_sma",
"vpn_fortinet",
"spiceworks",
"InfinateCampus",
"egnyte",
"global_protect",
"ESXI_web",
"VMWare_Horizon",
"Mattermost",
"Citrix",
"IMAP",
"BasicAuth"
].each {|t| puts t}


exit 0
end

Expand Down Expand Up @@ -411,6 +435,9 @@ when "citrix"
when "imap"
s = IMAP.new(options["usernames"].as(Array(String)),options["passwords"].as(Array(String)))

when "basicauth", "basic_auth", "basic-auth", "basic"
s = BasicAuth.new(options["usernames"].as(Array(String)),options["passwords"].as(Array(String)))

else
STDERR.puts "Not a valit sprayer type!!".colorize(:red)
exit 1
Expand Down

0 comments on commit facaaf4

Please sign in to comment.