Exemplo n.º 1
0
 def __init__(self, x_padding, y_padding):
     """
     Parameters:
             y_padding, number representing the boundaries in Y axis
     """
     self.y_padding = y_padding
     self.x_padding = x_padding
     self.max_x = int(USER32.GetSystemMetrics(0) - x_padding)
     self.max_y = int(USER32.GetSystemMetrics(1) - 100)
     self._generator = self._cords_generator()
Exemplo n.º 2
0
import random
import logging
from threading import Thread
from ctypes import WINFUNCTYPE, POINTER
from ctypes import c_bool, c_int, create_unicode_buffer

from lib.common.abstracts import Auxiliary
from lib.common.defines import KERNEL32, USER32
from lib.common.defines import WM_GETTEXT, WM_GETTEXTLENGTH, BM_CLICK

log = logging.getLogger(__name__)

EnumWindowsProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))
EnumChildProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))

RESOLUTION = {"x": USER32.GetSystemMetrics(0), "y": USER32.GetSystemMetrics(1)}


def foreach_child(hwnd, lparam):
    # List of buttons labels to click.
    buttons = [
        "yes",
        "ok",
        "accept",
        "next",
        "install",
        "run",
        "agree",
        "enable",
        "don't send",
        "continue",
Exemplo n.º 3
0
import logging
from threading import Thread
from ctypes import WINFUNCTYPE, POINTER
from ctypes import c_bool, c_int, create_unicode_buffer

from lib.common.abstracts import Auxiliary
from lib.common.defines import KERNEL32, USER32
from lib.common.defines import WM_GETTEXT, WM_GETTEXTLENGTH, BM_CLICK

log = logging.getLogger(__name__)

EnumWindowsProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))
EnumChildProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))

RESOLUTION = {
    "x": USER32.GetSystemMetrics(0),
    "y": USER32.GetSystemMetrics(1)
}

def foreach_child(hwnd, lparam):
    # List of buttons labels to click.
    buttons = [
        "yes",
        "ok",
        "accept",
        "next",
        "install",
        "run",
        "agree",
        "enable",
        "don't send",
Exemplo n.º 4
0
from threading import Thread

from lib.common.abstracts import Auxiliary
from lib.common.defines import BM_CLICK, CF_TEXT, GMEM_MOVEABLE, KERNEL32, USER32, WM_CLOSE, WM_GETTEXT, WM_GETTEXTLENGTH

log = logging.getLogger(__name__)

EnumWindowsProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))
EnumChildProc = WINFUNCTYPE(c_bool, POINTER(c_int), POINTER(c_int))

SM_CXSCREEN = 0
SM_CYSCREEN = 1
SM_CXFULLSCREEN = 16
SM_CYFULLSCREEN = 17
RESOLUTION = {
    "x": USER32.GetSystemMetrics(SM_CXSCREEN),
    "y": USER32.GetSystemMetrics(SM_CYSCREEN)
}
RESOLUTION_WITHOUT_TASKBAR = {
    "x": USER32.GetSystemMetrics(SM_CXFULLSCREEN),
    "y": USER32.GetSystemMetrics(SM_CYFULLSCREEN)
}

INITIAL_HWNDS = []

CLOSED_OFFICE = False
OFFICE_CLICK_AROUND = False


def foreach_child(hwnd, lparam):
    classname = create_unicode_buffer(128)