:tocdepth: 3

base/utils/urls.bro
===================

Functions for URL handling.

:Source File: :download:`/scripts/base/utils/urls.bro`

Summary
~~~~~~~
Options
#######
=========================================================== ======================================================
:bro:id:`url_regex`: :bro:type:`pattern` :bro:attr:`&redef` A regular expression for matching and extracting URLs.
=========================================================== ======================================================

Functions
#########
============================================================ ==================================================
:bro:id:`find_all_urls`: :bro:type:`function`                Extracts URLs discovered in arbitrary text.
:bro:id:`find_all_urls_without_scheme`: :bro:type:`function` Extracts URLs discovered in arbitrary text without
                                                             the URL scheme included.
============================================================ ==================================================


Detailed Interface
~~~~~~~~~~~~~~~~~~
Options
#######
.. bro:id:: url_regex

   :Type: :bro:type:`pattern`
   :Attributes: :bro:attr:`&redef`
   :Default:

   ::

      /^?(^([a-zA-Z\-]{3,5})(:\/\/[^\/?#"'\r\n><]*)([^?#"'\r\n><]*)([^[:blank:]\r\n"'><]*|\??[^"'\r\n><]*))$?/

   A regular expression for matching and extracting URLs.

Functions
#########
.. bro:id:: find_all_urls

   :Type: :bro:type:`function` (s: :bro:type:`string`) : :bro:type:`string_set`

   Extracts URLs discovered in arbitrary text.

.. bro:id:: find_all_urls_without_scheme

   :Type: :bro:type:`function` (s: :bro:type:`string`) : :bro:type:`string_set`

   Extracts URLs discovered in arbitrary text without
   the URL scheme included.


