reorganise

This commit is contained in:
CactiChameleon9 2021-01-14 17:31:35 +00:00
parent 74b722834e
commit ca1fddb110
4 changed files with 0 additions and 122 deletions

View File

@ -1,8 +0,0 @@
from pynput.mouse import Button, Controller
import time
mouse = Controller()
# Read pointer position
while True:
print('The current pointer position is {0}'.format(mouse.position))
time.sleep(1)

View File

@ -1,56 +0,0 @@
import socket
import os
from tkinter import *
from pynput import keyboard
#ipFile = open("IP.txt")
#IP = ipFile.read()
#ipFile.close()
#window = Tk()
#label = Label(window, text= 'What is the IP')
#entry = Entry(window, width=200)
#entry.insert(END, IP)
#label.pack()
#entry.pack()
SEPARATOR = "<SEPARATOR>"
BUFFER_SIZE = 128 # send 4096 bytes each time step
host = "safe-mask.auto.playit.gg"
# the ip address or hostname of the server, the receiver
# the port, let's use 5001
port = 56926
# create the client socket
s = socket.socket()
print(f"[+] Connecting to {host}:{port}")
s.connect((host, port))
print("[+] Connected.")
#-----------------------------------------------------------
def on_press(key):
dataToSend = "P"
dataToSend = dataToSend + (('{}'.format(key)).replace("'", ""))
dataToSendBytes = dataToSend.encode()
s.sendall(dataToSendBytes)
def on_release(key):
dataToSend = "R"
dataToSend = dataToSend + (('{}'.format(key)).replace("'", ""))
dataToSendBytes = dataToSend.encode()
s.sendall(dataToSendBytes)
with keyboard.Listener(on_press = on_press, on_release = on_release) as listener:
listener.join()

View File

@ -1,58 +0,0 @@
import socket
import os
from pynput import keyboard
from pynput.mouse import Button, Controller
from pynput import mouse
MOUSE = Controller()
dataToSend = ""
SEPARATOR = "<SEPARATOR>"
BUFFER_SIZE = 128 # send 4096 bytes each time step
host = "4.tcp.ngrok.io"
# the ip address or hostname of the server, the receiver
# the port, let's use 10002
port = 17058
# the name of file we want to send, make sure it exists
# get the file size
# create the client socket
s = socket.socket()
print(f"[+] Connecting to {host}:{port}")
s.connect((host, port))
print("[+] Connected.")
# send the filename and filesize
#s.send(f"{filename}{SEPARATOR}{filesize}".encode())
##############################################################################
def on_click(x, y, button, pressed):
if button == Button.left:
dataToSend = ("L")
else:
dataToSend = ("R")
dataToSend = dataToSend + str(x) + "," + str(y)
dataToSendBytes = dataToSend.encode()
s.sendall(dataToSendBytes)
with mouse.Listener(
on_click = on_click) as listener:
listener.join()
###############################################################################