Parse CSRF information from the website.

CSRFParser

Bases: HTMLParser

Information such as the CSRF or the hmac will be available in the HTML.

This will parse the information from a <script> tag in the HTML.

handle_data(data)

Parse the contents of a script tag to extract csrf information.

handle_endtag(tag)

Determine whether a script tag has been left.

handle_starttag(tag, attrs)

Determine whether a script tag has been entered.

CSRFState dataclass

Bases: DataClassYAMLMixin

Holds CSRF and embeds HMAC and RelayState for the authorization.

TemplateModel dataclass

Bases: DataClassORJSONMixin

Holds HMAC and RelayState for the authorization.