-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwclient.py
40 lines (33 loc) · 849 Bytes
/
wclient.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#Wire-P2P Wifi - Client Side
import socket
#username
user = 'nointernet'
#one time password
otp = 'defg'
#server local wlan address
sIp = '127.0.0.1'
#service port
servicePort = 22244
#create the socket
print 'Attempting to Contact Server'
serverSocket= socket.socket()
serverSocket.connect((sIp, servicePort))
print "Sending Credentials"
serverSocket.send(user)
print serverSocket.recv(50)
serverSocket.send(otp)
print serverSocket.recv(50)
serverSocket.send('Process Verification')
print 'Verification Pending'
authcode = serverSocket.recv(2)
if authcode =='F':
print 'Access Failed'
else:
print 'Access Granted Enjoy Wire-P2P Internet'
'''
print 'Credentials Sent'
print serverSocket.recv(1000)
print ('You will now be disconnected')
print ('Press enter when reconnected')
#input('Press enter when connected to')
'''