Skip to content

Commit b40d9e5

Browse files
committed
Prompt Client for Host's IP Address
1 parent 155eb56 commit b40d9e5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

rsa_encryption_gui/client/network_client.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77
import os
88
from rsa_encryption_gui.rsa_encryption import PublicKey
99

10-
HOST_IP = "ENTER HOST IP HERE" # Ex: 192.168.0.19
1110

12-
13-
def run():
11+
def run(host_ip=raw_input('Enter Host IP Address')):
1412
data_file = open(os.path.join(os.path.dirname(__file__), 'Message/Message_to_encrypt.txt'), "r")
1513
out = open(os.path.join(os.path.dirname(__file__), 'Message/encrypted_text.txt'), "r+")
1614
data = list()
@@ -27,7 +25,7 @@ def run():
2725

2826
# Use the same port number as the host
2927
port = 1234
30-
s.connect((HOST_IP, port))
28+
s.connect((host_ip, port))
3129
print "Connected to socket"
3230

3331
# Wait to receive the public key from the host

0 commit comments

Comments
 (0)