fluidasserts.format.captcha module

This module allows to check CAPTCHA vulnerabilities.

fluidasserts.format.captcha.is_insecure_in_image(image, expected_text)

Check if the given image is an insecure CAPTCHA.

The check is performed by converting the image to text and comparing with the given expected text.

Parameters
  • image (str) – Path to the image to be tested.

  • expected_text (str) – Text the image might contain.

Return type

tuple

fluidasserts.format.captcha.is_insecure_in_url(image_url, expected_text, *args, **kwargs)

Check if the image in the URL is an insecure CAPTCHA.

The check is performed by converting the image to text and comparing with the given expected text.

Parameters
  • image_url (str) – Path to the image to be tested.

  • expected_text (str) – Text the image might contain.

  • *args – Optional positional arguments for HTTPSession.

  • **kwargs – Optional keyword arguments for HTTPSession.

Return type

tuple