Пример #1
0
def main():
    args = parse_args()

    proxy = setup_proxy(args.proxy_url, args.proxy_auth)


    if not args.QR_text == "":
        args.file = "./img/QRcode.png"
        Image.create_QR_image(args.QR_text, args.QR_scale)

    image = Image(args.file, args.round_sensitive, args.image_brightness)

    bot = Bot(image, args.fingerprint, args.start_x, args.start_y, args.mode_defensive, args.colors_ignored, args.colors_not_overwrite, args.min_range, args.max_range, proxy,
              args.draw_strategy, args.xreversed, args.yreversed)

    bot.init()

    def run():
        try:
            bot.run()
        except NeedUserInteraction as exception:
            alert(str(exception))
            try:
                if raw_input(I18n.get('token_resolved')).strip() == 'y':
                    run()
            except NameError as e:
                if input(I18n.get('token_resolved')).strip() == 'y':
                    run()

    run()
Пример #2
0
def main():
    args = parse_args()

    proxy = setup_proxy(args.proxy_url, args.proxy_auth)

    image = Image(args.file, args.round_sensitive, args.image_brightness)

    bot = Bot(image, args.fingerprint, args.start_x, args.start_y, args.mode_defensive, args.colors_ignored, proxy, args.draw_strategy)

    bot.init()

    def run():
        try:
            bot.run()
        except NeedUserInteraction as exception:
            alert(exception.message)
            if raw_input(I18n.get('token_resolved')) == 'y':
                run()
    run()