Giter VIP home page Giter VIP logo

test_service's Introduction

Test Service App

Table Of Contents

  1. About
  2. Installation
  3. Usage Guide

About App

  • Change text: The sender sends the text file and the json file to the server. In respond, the server must read the json file and swap the words from the text according to it.

  • Encode/Decode text: The sender sends the text file and the key (another text). In respond, the server must XOR the text message with the key (One Time Pad cipher) and return it to the client. The decrypting process happens in the same way, but instead of the text message, the client sends the cipher text. Client on odd-numbered request encodes and on even-numbered request decodes.

Installation

In terminal window enter:

git clone https://github.com/TrapTheOnly/Test_Service.git

To install requirements in terminal window enter:

pip install -r requirements.txt

Usage Guide

You need at least 2 seperate terminals being open:

Server Terminal

python3 test_service.py --hostname {Hostname} -p {Port number}

Client Terminal

python3 test_service.py [-h] [-p P] [--hostname HOSTNAME] [--mode {change_text,encode_decode}] file1 file2

By default Hostname is set to 127.0.0.1

By default Port number is set to 65432

In client terminal --mode argument is necessary

After entering --mode argument, file1 and file2 arguments are also necessary

file1 and file2 arguments have to contain the address of required files:

  • In --mode change_text:
    • file1 = some .txt format file that has to be changed
    • file2 = some .json format file that has to be used to repalce text
  • In --mode enrypt_decrypt:
    • When encrypting:
      • file1 = some .txt format file that has to be encrypted
      • file2 = some .txt format file that has to contain key for encrypting
    • When decrypting:
      • file1 = some .txt format file that has to be decrypted
      • file2 = some .txt format file that has to contain key for decrypting

To stop server, head to Server Terminal and press Ctrl+C in terminal.

test_service's People

Contributors

traptheonly 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.