Пример #1
0
    def __init__(self, page):
        self.img_id = page.doc.find("//input[@id='identifiantClavierVirtuel']").attrib['value']
        img = page.doc.find("//img[@id='clavier_virtuel']")
        res = page.browser.open('/portal/rest/clavier_virtuel/%s' % self.img_id)
        MappedVirtKeyboard.__init__(self, BytesIO(res.content), page.doc, img, (0, 0, 0), convert='RGB')

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #2
0
 def __init__(self,basepage):
     img=basepage.document.find("//img[@usemap='#MapGril']")
     MappedVirtKeyboard.__init__(self,basepage.browser.openurl(self.url % time.time()),basepage.document,img,self.color)
     if basepage.browser.responses_dirname is None:
         basepage.browser.responses_dirname = \
                 tempfile.mkdtemp(prefix='weboob_session_')
     self.check_symbols(self.symbols,basepage.browser.responses_dirname)
Пример #3
0
 def __init__(self,basepage):
     img=basepage.document.find("//img[@id='idImageClavier']")
     random.seed()
     self.url+="%s"%str(long(math.floor(long(random.random()*1000000000000000000000))))
     MappedVirtKeyboard.__init__(self,basepage.browser.openurl(self.url),
                                 basepage.document,img,self.color,"id")
     self.check_symbols(self.symbols,basepage.browser.responses_dirname)
Пример #4
0
 def __init__(self, basepage):
     img = basepage.document.find("//img[@id='idImageClavier']")
     random.seed()
     self.url += "%s" % str(
         long(math.floor(long(random.random() * 1000000000000000000000))))
     MappedVirtKeyboard.__init__(self, basepage.browser.openurl(self.url),
                                 basepage.document, img, self.color, "id")
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #5
0
    def __init__(self, page):
        key = page.document.getroot().xpath('//input')[0].value
        page.browser.login_key = key
        img = page.document.getroot().xpath('//img')[0]
        img_url = 'https://www.axa.fr/.sendvirtualkeyboard.png?key=' + key
        img_file = page.browser.openurl(img_url)
        MappedVirtKeyboard.__init__(self, img_file, page.document, img, self.color)

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #6
0
 def __init__(self, basepage):
     img = basepage.document.find("//img[@usemap='#MapGril']")
     MappedVirtKeyboard.__init__(
         self, basepage.browser.openurl(self.url % time.time()),
         basepage.document, img, self.color)
     if basepage.browser.responses_dirname is None:
         basepage.browser.responses_dirname = \
                 tempfile.mkdtemp(prefix='weboob_session_')
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #7
0
    def __init__(self, page):
        key = page.document.getroot().xpath("//input")[0].value
        page.browser.login_key = key
        img = page.document.getroot().xpath("//img")[0]
        img_url = "https://www.axa.fr/.sendvirtualkeyboard.png?key=" + key
        img_file = page.browser.openurl(img_url)
        MappedVirtKeyboard.__init__(self, img_file, page.document, img, self.color)

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #8
0
 def __init__(self, page):
     img = page.doc.find('//img[@usemap="#gridpass_map_name"]')
     res = page.browser.open(img.attrib['src'])
     MappedVirtKeyboard.__init__(self,
                                 BytesIO(res.content),
                                 page.doc,
                                 img,
                                 self.color,
                                 convert='RGB')
     self.check_symbols(self.symbols, None)
Пример #9
0
 def __init__(self, page, vkid):
     img = page.doc.find('//img[@id="clavier_virtuel"]')
     res = page.browser.open("/portal/rest/clavier_virtuel/%s" % vkid)
     MappedVirtKeyboard.__init__(self,
                                 BytesIO(res.content),
                                 page.doc,
                                 img,
                                 self.color,
                                 convert='RGB')
     self.check_symbols(self.symbols, None)
Пример #10
0
 def __init__(self, basepage):
     img = basepage.doc.xpath('//img[@id="gridpass_img"]')[0]
     imgdata = basepage.browser.open(img.attrib['src']).content
     MappedVirtKeyboard.__init__(self,
                                 BytesIO(imgdata),
                                 basepage.doc,
                                 img,
                                 self.color,
                                 convert='RGB')
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #11
0
    def __init__(self, page):
        img = page.document.find("//img[@usemap='#login-pad_map']")
        img_file = page.browser.openurl(img.attrib['src'])
        MappedVirtKeyboard.__init__(self,
                                    img_file,
                                    page.document,
                                    img,
                                    self.color,
                                    convert='RGB')

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #12
0
    def __init__(self, page):
        img = page.doc.find("//img[@usemap='#cv']")
        res = page.browser.open(img.attrib['src'])
        MappedVirtKeyboard.__init__(self,
                                    BytesIO(res.content),
                                    page.doc,
                                    img,
                                    self.color,
                                    'href',
                                    convert='RGB')

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #13
0
class BNPVirtKeyboard(MappedVirtKeyboard):
    symbols = {'0': '97a2b5816f2db74851fe05afd17dc9fe',
               '1': '0a24fe3a35efeb0a89aa5e7b098e6842',
               '2': '65ff550debf85eacf8efaadd6cd80aa5',
               '3': '2bd67143fcd4207ac14d0ea8afdf4ebb',
               '4': 'a46bfd21636805a31a579b253c3b23d5',
               '5': '3f644894037255bc0feaba9abb1facfa',
               '6': '40d91064a749563fa4dd31fb52e880f0',
               '7': 'cd3af65da74d57df1e6a91ca946c09b7',
               '8': '85b718e032a02e887c757a7745a1f0bd',
               '9': 'c2cdc08c8c68855d83c0899d7e8c6719',
               '-1': 'd41d8cd98f00b204e9800998ecf8427e',
               }

    color = 45

    def __init__(self, basepage):
        img = basepage.document.find("//img[@usemap='#MapGril']")
        imgdata = basepage.browser.openurl(img.attrib['src'])
        MappedVirtKeyboard.__init__(self, imgdata, basepage.document, img, self.color)
        self.check_symbols(self.symbols, basepage.browser.responses_dirname)

    def get_symbol_coords(self, (x1, y1, x2, y2)):
        # strip borders
        return MappedVirtKeyboard.get_symbol_coords(self, (x1+6, y1+1, x2-6, y2-4))
Пример #14
0
 def get_symbol_code(self, md5sum_list):
     for md5sum in md5sum_list:
         try:
             code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
         except VirtKeyboardError:
             continue
         else:
             return ''.join(re.findall(r"'(\d+)'", code)[-2:])
     raise VirtKeyboardError('Symbol not found')
Пример #15
0
 def get_symbol_code(self, md5sum_list):
     for md5sum in md5sum_list:
         try:
             code = MappedVirtKeyboard.get_symbol_code(self,md5sum)
         except VirtKeyboardError:
             continue
         else:
             return ''.join(re.findall("'(\d+)'", code)[-2:])
     raise VirtKeyboardError('Symbol not found')
Пример #16
0
class VirtKeyboard(MappedVirtKeyboard):
    symbols = {
        '0': 'daa52d75287bea58f505823ef6c8b96c',
        '1': 'f5da96c2592803a8cdc5a928a2e4a3b0',
        '2': '9ff78367d5cb89cacae475368a11e3af',
        '3': '908a0a42a424b95d4d885ce91bc3d920',
        '4': '3fc069f33b801b3d0cdce6655a65c0ac',
        '5': '58a2afebf1551d45ccad79fad1600fc3',
        '6': '7fedfd9e57007f2985c3a1f44fb38ea1',
        '7': '389b8ef432ae996ac0141a2fcc7b540f',
        '8': 'bf357ff09cc29ea544991642cd97d453',
        '9': 'b744015eb89c1b950e13a81364112cd6'
    }

    color = (0xff, 0xff, 0xff)

    def __init__(self, page):
        img = page.document.find("//img[@usemap='#map']")
        img_file = page.browser.openurl(img.attrib['src'])
        MappedVirtKeyboard.__init__(self,
                                    img_file,
                                    page.document,
                                    img,
                                    self.color,
                                    map_attr='id')

        self.check_symbols(self.symbols, page.browser.responses_dirname)

    def get_symbol_code(self, md5sum):
        code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
        return '%02d' % int(code.split('_')[-1])

    def get_string_code(self, string):
        code = ''
        for c in string:
            code += self.get_symbol_code(self.symbols[c])
        return code

    def get_symbol_coords(self, (x1, y1, x2, y2)):
        # strip borders
        return MappedVirtKeyboard.get_symbol_coords(
            self, (x1 + 3, y1 + 3, x2 - 3, y2 - 3))
Пример #17
0
class VirtKeyboard(MappedVirtKeyboard):
    symbols = {
        '0': '18b66bc587a29742cbce4e10b7f1cb3f',
        '1': '8f21fb2dddd2e4751b3c2347e5b991cb',
        '2': 'ae90fc2f7e44ab03e8eb0a6f2a8fcdfd',
        '3': '35f1cc1a07dc1c1410761f56d37ac5f2',
        '4': '86f286828f95846f5cde187436e53855',
        '5': '6e08bc067ab243cb564226aba5e1ca1e',
        '6': 'ada513599ea3c98ad882ed9ffcd4b139',
        '7': 'ed13fea6185f3cbca43023374b5f41be',
        '8': 'ab4317d59ce2a7b1fd2e298af5785b10',
        '9': '8c165ad38c1eb72200e6011636c4c9b6'
    }

    color = (0xff, 0xff, 0xff)

    def __init__(self, page):
        img = page.document.find("//img[@usemap='#map']")
        img_file = page.browser.openurl(img.attrib['src'])
        MappedVirtKeyboard.__init__(self,
                                    img_file,
                                    page.document,
                                    img,
                                    self.color,
                                    map_attr='id')

        self.check_symbols(self.symbols, page.browser.responses_dirname)

    def get_symbol_code(self, md5sum):
        code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
        return '%02d' % int(code.split('_')[-1])

    def get_string_code(self, string):
        code = ''
        for c in string:
            code += self.get_symbol_code(self.symbols[c])
        return code

    def get_symbol_coords(self, (x1, y1, x2, y2)):
        # strip borders
        return MappedVirtKeyboard.get_symbol_coords(
            self, (x1 + 3, y1 + 3, x2 - 3, y2 - 3))
Пример #18
0
 def get_symbol_code(self,md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self,md5sum)
     return re.search("'(\w{3}\|)'", code).group(1)
Пример #19
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     m = re.search('(\d+)', code)
     if m:
         return m.group(1)
Пример #20
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return ''.join(re.findall(r"'(\d+)'", code)[-2:])
Пример #21
0
 def __init__(self, img_file, doc, img):
     MappedVirtKeyboard.__init__(self, img_file, doc, img, self.color)
     self.check_symbols(self.symbols, None)
Пример #22
0
 def __init__(self, basepage):
     img = basepage.doc.xpath('//img[@id="gridpass_img"]')[0]
     imgdata = basepage.browser.open(img.attrib['src']).content
     MappedVirtKeyboard.__init__(self, StringIO(imgdata), basepage.doc, img, self.color, convert='RGB')
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #23
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return code[-2:]
Пример #24
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     m = re.search('(\d+)', code)
     if m:
         return m.group(1)
Пример #25
0
    def __init__(self, page):
        img = page.doc.find("//img[@usemap='#cv']")
        res = page.browser.open(img.attrib['src'])
        MappedVirtKeyboard.__init__(self, BytesIO(res.content), page.doc, img, self.color, 'href', convert='RGB')

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #26
0
 def get_symbol_code(self,md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self,md5sum)
     return '%02d' % int(code.split('_')[-1])
Пример #27
0
    def __init__(self, page):
        img = page.doc.find("//img[@usemap='#cv']")
        res = page.browser.open(img.attrib["src"])
        MappedVirtKeyboard.__init__(self, StringIO(res.content), page.doc, img, self.color, "href", convert="RGB")

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #28
0
 def __init__(self, page, vkid):
     img = page.doc.find('//img[@id="clavier_virtuel"]')
     res = page.browser.open("/portal/rest/clavier_virtuel/%s" % vkid)
     MappedVirtKeyboard.__init__(self, BytesIO(res.content), page.doc, img, self.color, convert='RGB')
     self.check_symbols(self.symbols, None)
Пример #29
0
 def get_symbol_coords(self, coords):
     # strip borders
     x1, y1, x2, y2 = coords
     return MappedVirtKeyboard.get_symbol_coords(self, (x1 + 10, y1 + 10, x2 - 10, y2 - 10))
Пример #30
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return ''.join(re.findall(r"'(\d+)'", code)[-2:])
Пример #31
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return re.search("'(\w{3}\|)'", code).group(1)
Пример #32
0
 def __init__(self, basepage):
     img = basepage.document.find("//img[@usemap='#MapGril']")
     imgdata = basepage.browser.openurl(img.attrib['src'])
     MappedVirtKeyboard.__init__(self, imgdata, basepage.document, img, self.color)
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #33
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     code = code.split("'")[3]
     assert code.isdigit()
     return code
Пример #34
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     code = code.split("'")[1]
     assert code.isdigit()
     return code
Пример #35
0
 def get_symbol_coords(self, coords):
     # strip borders
     x1, y1, x2, y2 = coords
     return MappedVirtKeyboard.get_symbol_coords(
         self, (x1 + 10, y1 + 10, x2 - 10, y2 - 10))
Пример #36
0
 def __init__(self, basepage):
     img = basepage.document.find("//img[@usemap='#MapGril']")
     MappedVirtKeyboard.__init__(
         self, basepage.browser.openurl(self.url % time.time()),
         basepage.document, img, self.color)
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #37
0
    def __init__(self, page):
        img = page.document.find("//img[@usemap='#cv']")
        img_file = page.browser.openurl(img.attrib['src'])
        MappedVirtKeyboard.__init__(self, img_file, page.document, img, self.color, 'href', convert='RGB')

        self.check_symbols(self.symbols, page.browser.responses_dirname)
Пример #38
0
 def get_symbol_code(self, md5sum):
     code = MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return '%02d' % int(code.split('_')[-1])
Пример #39
0
 def __init__(self, basepage):
     img = basepage.document.find("//img[@usemap='#MapGril']")
     imgdata = basepage.browser.openurl(img.attrib['src'])
     MappedVirtKeyboard.__init__(self, imgdata, basepage.document, img,
                                 self.color)
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #40
0
 def __init__(self, basepage):
     img=basepage.document.find("//img[@usemap='#MapGril']")
     MappedVirtKeyboard.__init__(self, basepage.browser.openurl(self.url % time.time()), basepage.document, img, self.color)
     self.check_symbols(self.symbols, basepage.browser.responses_dirname)
Пример #41
0
 def get_symbol_code(self, md5sum):
     code=MappedVirtKeyboard.get_symbol_code(self, md5sum)
     return code[-2:]
Пример #42
0
 def __init__(self, page):
     img = page.doc.find('//img[@usemap="#gridpass_map_name"]')
     res = page.browser.open(img.attrib['src'])
     MappedVirtKeyboard.__init__(self, BytesIO(res.content), page.doc, img, self.color, convert='RGB')
     self.check_symbols(self.symbols, None)