How to use the webtech.utils.dict_from_caseinsensitivedict function in webtech

To help you get started, we’ve selected a few webtech examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ShielderSec / webtech / webtech / target.py View on Github external
if BURP:
            # Burp flag is set when requests is not installed.
            # When using Burp we shouldn't end up in this function so we are in a Python CLI env without requests
            raise ImportError("Missing Requests module")
        # By default we don't verify SSL certificates, we are only performing some useless GETs
        try:
            response = get(url, headers=headers, cookies=cookies, verify=False, allow_redirects=True, timeout=timeout)
        except RequestException as e:
            raise ConnectionException(e)
        # print("status: {}".format(response.status_code))

        # TODO: switch-case for various response.status_code

        self.data['url'] = url
        self.data['html'] = response.text
        self.data['headers'] = dict_from_caseinsensitivedict(response.headers)
        self.data['cookies'] = dict_from_cookiejar(response.cookies)
        self.parse_html_page()
github kaiiyer / webtech / webtech / target.py View on Github external
if BURP:
            # Burp flag is set when requests is not installed.
            # When using Burp we shouldn't end up in this function so we are in a Python CLI env without requests
            raise ImportError("Missing Requests module")
        # By default we don't verify SSL certificates, we are only performing some useless GETs
        try:
            response = get(url, headers=headers, cookies=cookies, verify=False, allow_redirects=True, timeout=timeout)
        except RequestException as e:
            raise ConnectionException(e)
        # print("status: {}".format(response.status_code))

        # TODO: switch-case for various response.status_code

        self.data['url'] = url
        self.data['html'] = response.text
        self.data['headers'] = dict_from_caseinsensitivedict(response.headers)
        self.data['cookies'] = dict_from_cookiejar(response.cookies)
        self.parse_html_page()