|
| 1 | +# Package/Script Name: Word Transfer |
| 2 | + |
| 3 | +## Short description of package/script |
| 4 | + |
| 5 | +- For transfer of files between computers or between a windows or VM in a same computer |
| 6 | +- It imports the library socket |
| 7 | + |
| 8 | +## Setup instructions |
| 9 | + |
| 10 | +- Need to switch off the local firewall in both the pcs |
| 11 | +- To run the server in a VM or in a different computer and the client in the different computer and change the IP in the client folder based on the IP of the VM/Computer. |
| 12 | + |
| 13 | +## Detailed explanation of script, if needed |
| 14 | + |
| 15 | +A. Steps to create the socket program on word transfer from client to server with Ubuntu on VM as the server: |
| 16 | +- While creating the server file on Ubuntu(file_transfer_server): |
| 17 | + a. First created a socket |
| 18 | + b. Took an arbitary port number greater than 1023(in this case it is 2110) for the transfer of infromation |
| 19 | + c. Binded the ports of the client and server |
| 20 | + d. Listened to the client for information |
| 21 | + e. Received the file name from the client |
| 22 | + f. Opened a file with the same filename in write mode |
| 23 | + g. Received the contents of the file and wrote it on the new file |
| 24 | + h. Sent that the file has been received |
| 25 | + i. Ended the connection |
| 26 | +- While creating the client file on Windows(word_transfer_client): |
| 27 | + a. First created a socket |
| 28 | + b. Took the same port number as in the server(in this case 3603) |
| 29 | + c. Looked for the ip address in the Ubuntu on VM |
| 30 | + d. Entered the ip address for connecting with the server |
| 31 | + e. Sent the filename to the server |
| 32 | + f. Sent the file contents to the server |
| 33 | + g. Received the file sending result from the server |
| 34 | + h. Displayed it to the client |
| 35 | + i. Ended the connection |
| 36 | + |
| 37 | +## Output |
| 38 | + |
| 39 | +<img src="https://github.com/kumarjeetray/Awesome_Python_Scripts/blob/main/BasicPythonScripts/Word%20Transfer/Images/word_transfer_client_ss_1.jpg"/> |
| 40 | +<img src="https://github.com/kumarjeetray/Awesome_Python_Scripts/blob/main/BasicPythonScripts/Word%20Transfer/Images/word_transfer_client_ss_2.jpg"/> |
| 41 | +<img src="https://github.com/kumarjeetray/Awesome_Python_Scripts/blob/main/BasicPythonScripts/Word%20Transfer/Images/word_transfer_server_ss.jpg"/> |
| 42 | +## Author(s) |
| 43 | + |
| 44 | +Kumarjeet Ray |
| 45 | + |
| 46 | +## Disclaimers, if any |
| 47 | + |
| 48 | +N/A |
0 commit comments