Coder Social home page Coder Social logo

wehe-py3's Introduction

Wehe

This software is covered by the CRAPL licence (see CRAPL-LICENSE.txt)

How to run a replay step by step:

On the server:

  • Change the content in folders.txt to where the replay pickle is (in this example, it can be ../replayTraces/Youtube and ../replayTraces/YoutubeRandom)

  • You can now run the replay_server and replay analyzer with

    ./restartServers.sh

On the client:

  • Assume the server used is wehe3.meddle.mobi (can use your own server as well, just edit class Instance in python_lib.py). You can then run a replay of the recorded traffic

    python3 replay_client.py --pcap_folder={the/dir/to/replayFiles} --serverInstance=wehe

Containerization

This tool has been containerized. To run it within a container first go to the cloned directory and build with:

docker build . -t wehe

Then run with:

docker run -v <local_absolute_path_to_ssl_keys_directory>:/wehe/ssl --net=host --env SUDO_UID=$UID -itd wehe <public_IP_address/hostname>

/data is where the results are saved. Remove d from -itd to run outside of detached mode and see the output in STDOUT.

For SSL encryption

run certGenerator.py to generate your own certificate that can be used to encrypt sidechannel communications.

Testing Containers

The server and client can run from the same docker image. The included docker-compose.yaml provides a minimal test that the server can start and the client can run a test to this server from within the docker image.

docker-compose build wehe-server
docker-compose up

If the client or server fail, the build is out of order.

Create your own test

Prepare the replay traffic, the replay is recorded in a pcap file, and we will use the parser script to process the pcap and create the pickle file that can be used by the client and server.

Assume the pcap is stored in the/dir/to/pcap. Copy the same pcap to the/dir/to/pcapRandom.

Create a file named client_ip.txt in both directories, with the only content in it be the client's ip in the pcap file.

On the client:

  • Create the replay file with original payload
sudo python3 replay_parser.py --pcap_folder={the/dir/to/pcap}
  • Creat the replay file with bit-inverted payload
sudo python3 replay_parser.py --pcap_folder={the/dir/to/pcapRandom} --randomPayload=True --invertBit=True
  • Copy the pickle directory (the/dir/to/pcap, and the/dir/to/pcapRandom) to the server via scp.

wehe-py3's People

Contributors

fangfanli avatar zeinabshmeis avatar nkinkade avatar drchoffnes avatar stephen-soltesz avatar dng24 avatar

Stargazers

 avatar Dr. Renard Sc.D avatar Muhammad Abdullah avatar

Watchers

Lucian avatar  avatar  avatar  avatar Christo Wilson avatar Muhammad Abdullah avatar

wehe-py3's Issues

Remove references to `WhoTheFAreU?` from replay server/client code

This message show up a few times in the code:

The message was probably meant to be amusing or funny when it was added a long time ago, and surely almost nobody will ever encounter it. However, recently an M-Lab site host actually shut down and entire M-Lab site because they thought that the servers were compromised and had been defaced. It would probably be better to change that message to something slightly more benign, possibly with a link to a page about what Wehe is.

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.