authcaptureproxy.stackoverflow

Python Package auth capture proxy.

This is code borrowed from stack overflow.

Module Contents

authcaptureproxy.stackoverflow.get_open_port()int

Get random open port.

https://stackoverflow.com/questions/2838244/get-open-tcp-port-in-python/2838309#2838309

Returns

int: a random open port. This does not guarantee the port will remain open and may fail if there is a race condition.

authcaptureproxy.stackoverflow.return_timer_countdown_refresh_html(seconds: int, text: Text, hard_refresh: bool = True)Text

Return JavaScript timer countdown for html injection. This is to use for tester success.

https://stackoverflow.com/questions/16532577/javascript-refresh-countdown-text/16532611#16532611

Parameters
  • seconds (int) – Seconds to delay

  • text (Text) – HTML text to display before the timer text.

  • hard_refresh (bool) – Whether to force refresh of cache

Returns

HTML for injection

Return type

Text