lib/ronin/cli/commands/http.rb in ronin-2.0.0.beta3 vs lib/ronin/cli/commands/http.rb in ronin-2.0.0.beta4

- old
+ new

@@ -54,11 +54,11 @@ # --trace Send a TRACE request # --unlock Send an UNLOCK request # --shell URL Open an interactive HTTP shell # -P, --proxy URL The proxy to use # -U, --user-agent-string STRING The User-Agent string to use - # -u chrome_linux|chrome_macos|chrome_windows|chrome_iphone|chrome_ipad|chrome_android|firefox_linux|firefox_macos|firefox_windows|firefox_iphone|firefox_ipad|firefox_android|safari_macos|safari_iphone|safari_ipad|edge, + # -u chrome-linux|chrome-macos|chrome-windows|chrome-iphone|chrome-ipad|chrome-android|firefox-linux|firefox-macos|firefox-windows|firefox-iphone|firefox-ipad|firefox-android|safari-macos|safari-iphone|safari-ipad|edge, # --user-agent The User-Agent to use # -H, --header "NAME: VALUE" Adds a header to the request # -B, --body STRING The request body # -F, --body-file FILE Sends the file as the request body # -f, --form-data NAME=VALUE Adds a value to the form data @@ -170,10 +170,14 @@ @user_agent = ua end option :user_agent, short: '-u', value: { - type: Support::Network::HTTP::UserAgents::ALIASES.keys + type: Hash[ + Support::Network::HTTP::UserAgents::ALIASES.keys.map { |key| + [key.to_s.tr('_','-'), key] + } + ] }, desc: 'The User-Agent to use' do |name| @user_agent = name end