Skip to content

🌆 A responsive web application for server-side image scrambling.

License

Notifications You must be signed in to change notification settings

adildsw/safedun-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

safedun-server

A responsive web application for server-side image scrambling.

safedun-server is a server-side image scrambling web app.

Getting Started

The following instructions will help you get safedun-server up and running in your preferred server/port. Before proceeding to the installation, make sure that your system contains all the prerequisites.

Prerequisites

safedun-server is built on Python and uses external libraries like numpy, opencv and flask. Follow the instructions below to setup your system.

1. Install Python 3.6+ (Anaconda distribution recommended)

2. Install dependencies

Run the following command on the terminal/command prompt to install all the dependencies:

pip install numpy opencv-python flask

Installing

Clone safedun-server repository into your system using the following command:

git clone https://github.com/adildsw/safedun-server.git

Running safedun-server

Starting the server

Navigate to the cloned repository directory.

cd safedun-server

Start the server

python server.py

Upon successful server hosting, the terminal/command prompt should return the following message:

* Serving Flask app "server" (lazy loading)
* Environment: production
  WARNING: This is a development server. Do not use it in a production deployment.
  Use a production WSGI server instead.
* Debug mode: off
* Running on http://x.x.x.x:port/ (Press CTRL+C to quit)

http://x.x.x.x:port/ is the address of the hosted server.

Opening safedun-server

Once the server is up and running, open the address http://x.x.x.x:port/ (refer to terminal/command prompt running the server) in your browser to open safedun-server.

Closing the server

Open the terminal/command prompt running the server and press CTRL+C to terminate the server.

How to use

safedun-server offers the functionality of scrambling and unscrambling images using specific keyphrases and cycles.

Instructions

  1. Operation Mode: choose whether you want to scramble or unscramble an image
  2. Cycle: select the number of cycles you the want the scrambling/unscrambling to go over
  3. Key: input the key you want to scramble/unscramble the image over
  4. File: select the image file you want to scramble/unscramble

NOTE: Unscrambling should be done with the same key and cycle which was used while scrambling the image.

NOTE: Do not transfer scrambled image over lossy channels. ORIGINAL IMAGE WILL BE LOST FOREVER.

Configuration

safedun-server allows users to change the default host IP, port number and activate debug mode.

Starting the server in localhost

python server.py --local True

Starting the server in a custom host IP/port

python server.py --host x.x.x.x --port xxxx

Starting the server in debugging mode

python server.py --debug True

NOTE: By default, safedun-server attempts to host the server in the system's local network with the default port 5000.

Results

Cycle Key Original Image Scrambled Image
1 @mAz!ng
5 van!llaTEA
10 thisIStotallyCrAzY
20 Sp@gheTT!

Built With

References

Upload Icon is obtained from FontAwesome made available under Attribution 4.0 International (CC BY 4.0).

License

MIT License

Copyright (c) 2019 Adil Rahman

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Made with GitHub

About

🌆 A responsive web application for server-side image scrambling.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published