Skip to content

Instantly share code, notes, and snippets.

View IbroCalculus's full-sized avatar
🏠
Working from home

Ibrahim Suleiman IbroCalculus

🏠
Working from home
View GitHub Profile
@IbroCalculus
IbroCalculus / server.py
Created February 18, 2019 00:14
Server code for python remote access of another machine on which the server part of this code has been installed
import socket
s = socket.socket()
host = socket.gethostname()
port = 9009
s.bind((host,port))
print('This host/server ID is: ', host)
print('\n',host,'has been binded to',port)
print('\nServer is listening for incoming connections')
@IbroCalculus
IbroCalculus / client.py
Created February 18, 2019 00:17
Client code part of the python remote access code to be installed on the machine to be controlled. i.e the client
import socket
import os
s = socket.socket()
host = input('Enter host/server ID: ')
port = 9009
s.connect((host,port))
print('This client has successfully connected to the server')
while True: