GithubHelp home page GithubHelp logo

task_bugbase's Introduction

Task_bugbase

Final Task Solution

Design

script1.py

  • script1.py allows users to upload a file from the command line to a specified IP address and port and recieve the output of file command from script2.py.
  • Uses the socket module to establish a TCP connection with the server.
  • Checks if the specified file exists on the client-side.
  • Sends the filename to the server.
  • Sends a start-of-transfer message to indicate the beginning of file transfer.
  • Reads the file in chunks and sends them over the socket.
  • Sends an end-of-transfer message to indicate the completion of file transfer.
  • Receives the output of a command executed on the file from the server.
  • Prints the received output in JSON format.

script2.py

  • Uses the socket module to listen for incoming connections from clients.
  • Receives the filename and file data from the client.
  • Saves the received file to a "received" folder on the server.
  • Constructs and executes a specified command on the received file using the subprocess module.
  • Sends the output of the command back to the client in JSON format.

Setup

  • Python3 needs to be installed.

Usage

script2.py

script2.py needs to run first as it will wait for conenction and file from script1.py

python script2.py

script1.py

script1.py requires the file path, the address to send to and the port.

python script1.py <file_path> <host> <port>

Video explanation and usage

Youtube link

Video_explanation_compressed.mp4

task_bugbase's People

Contributors

nishchhal-r avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.