Despite what others may say, parsing URIs is not hard.
In fact, Ruby already makes parsing URIs fairly easy with the URI() method.
Query Params
Although, the URI library does not parse the parameters within the query
string. Ronin, like other modern Ruby projects, depends on many other smaller
RubyGems for functionality; also so you don’t have to install and require
them by hand. One such RubyGem is uri-query_params, which allows you to
access the parameters within the query string of anyURI::HTTP
(or URI::HTTPS) object:
Additionally, you can parse/dump individual query strings:
The URI::QueryParams.dump method is also used by
HTTP
helper methods for the :query_params option:
Non-standard URIs
There are URIs that Ruby has trouble parsing, such as so called
punycode domains. Not to worry, Ronin also requires the
addressable RubyGem, a URI parsing library on steroids:
With Ronin, parsing URIs is easy.
If Ronin interests you or you like the work we do, consider donating to Ronin
on
GitHub,
Patreon, or
Open Collective
so we can continue building high-quality free and Open Source security tools
and Ruby libraries.