def get_url(self):
        print('\nWaiting for url from clipboard....')

        url = pyperclip.waitForPaste()
        # url = 'https://www.jiosaavn.com/song/shayad-from-love-aaj-kal/GjIBdCt,UX8'
        pyperclip.copy('')

        if str(url).startswith('https://www.jiosaavn.com'):
            print('got url: ', url)

            self.url = url
            self.url_type = self.url.split('/')[3]
Exemplo n.º 2
0
def main(passive, verbose, lang):
    click.echo("Ready!\n")

    if passive:
        # paste and re-copy
        while True:
            s = "".join(sys.stdin.readlines())
            click.echo(Text(s, lang=lang).clean)

    else:
        # read clipboard and re-copy
        clipText = Text(pyperclip.waitForPaste(), lang=lang)
        copy_echo(clipText.clean, verbose=verbose)
        while True:
            clipText = Text(pyperclip.waitForNewPaste(), lang=lang)
            copy_echo(clipText.clean, verbose=verbose)
Exemplo n.º 3
0
def on_press(key):
    if key==Key.ctrl_r:
#        print('screenshot mode (ctrl_r is pressed)')
#        print("starting mouse listner")
        m_listener= mouse.Listener(on_click=on_click)
        m_listener.start()


    elif key==Key.ctrl_l:
        ##copy paste code
#        print('copy paste mode(ctrl_l is pressed)\n (text pasted)')
        para=ppc.waitForPaste()
        writer(para)         ##accepts any text with lenght greater than 0
        clear_clip()                        ##empties clipboard after every copy and paste


    else:pass
Exemplo n.º 4
0
def main():
    global client, IP, SERVER_PORT, client_connected, my_clipboard, verbose
    server_thread = threading.Thread(target=serverThread, args=(), daemon=True)
    server_thread.start()

    # Try connecting as client
    while 1:
        try:
            client.connect((IP, SERVER_PORT))
            print("[bold blue][+][/bold blue]Connected as client. :smiley:")
            break
        except Exception as e:
            print(
                "[yellow][!][/yellow]Couldn't connect as client, trying again in 5 secs.."
            )
            time.sleep(5)

    while not client_connected:
        continue

    print(
        "\n[bold magenta][*]OK. Clipboard is now shared. :thumbs_up:[/bold magenta]\n"
    )
    while 1:
        data = "No data in clipboard"
        if cb.paste() == "" or cb.paste() == None:
            data = cb.waitForPaste()
        else:
            data = cb.waitForNewPaste()

        if not client_connected:
            print("[red][-][/red]No client to send data.")
            sys.exit(0)

        if client_connected and my_clipboard != data and data != "":
            sendClipboardData(data)
Exemplo n.º 5
0
def pyp_manager():
    clipboard_typo(pyperclip.waitForPaste())
    while True:
        clipboard_typo(pyperclip.waitForNewPaste())
Exemplo n.º 6
0
# Finds password using grep
import pyperclip
import csv
import sys

filename = "/home/suman/Documents/Chrome Passwords/Passwords.csv"

with open(filename, 'r') as file:
    reader = csv.reader(file)
    fields = next(reader)

    rows = []
    for row in reader:
        rows.append(row)
    
    arguments = sys.argv[1:]
    
    results = []
    for i in range(len(rows)):
        string = ' '.join(rows[i])
        if all([arg in string for arg in arguments]):
            results.append(rows[i])

    print("Results\n")
    for row in results:
        print(row[:len(row) - 1])
    index = int(input("\nEnter Index: "))
    print("Copied password of " + ' '.join(results[index - 1][ :len(results[index - 1]) - 1]))
    pyperclip.copy(results[index - 1][-1])
    pyperclip.waitForPaste(15)
Exemplo n.º 7
0
import re
import pyperclip

textToSearch = str(pyperclip.waitForPaste())

print("Copied text:")
print(textToSearch)
print("=========")

telephoneRegex = re.compile(
    r"""
(00353|\+353)?   # optionally match country code in either format
(\s|-|)? # match a space or a dash if present
(0?\d{1,2})  # landline area code
(\s|-|)?
(\d{3}-?\d{4}) # match phone number body
""", re.VERBOSE)

emailRegex = re.compile(
    r'''
(\w*)
(@)
(\w*)
(\.[a-zA-Z]{2,4})
(\.[a-zA-Z]{2,4})?
''', re.VERBOSE)

# (\.[a-zA-Z]{2,4})
emailResult = emailRegex.findall(textToSearch)
phoneNumberResult = telephoneRegex.findall(textToSearch)
Exemplo n.º 8
0
 def paste(self):
     self.var_url.set(pyperclip.waitForPaste()) 
Exemplo n.º 9
0
import pyperclip

pyperclip.copy('text to be copied')
print(pyperclip.paste())
# text to be copied

print(type(pyperclip.paste()))
# <class 'str'>

s = pyperclip.paste()
print(s)
# text to be copied

pyperclip.copy('')
print(pyperclip.waitForPaste())
# some text

print(pyperclip.waitForNewPaste())
# new text

# pyperclip.waitForNewPaste(5)
# PyperclipTimeoutException: waitForNewPaste() timed out after 5 seconds.

try:
    s = pyperclip.waitForNewPaste(5)
except pyperclip.PyperclipTimeoutException:
    s = 'No change'

print(s)
# No change