Code Monkey home page Code Monkey logo

pidrop's Introduction

Pidrop

The goal of this project is to turn a Raspberry Pi into a device similar to a dead drop. Ultimately, the following interactions should be possible:

  • The owner of the Pi goes through a setup procedure that sets up this process and creates the necessary folders on their USB stick.
  • When a person inserts a USB stick into the Pi, if that stick contains a special folder (determined during setup above) then the contents of that folder are uploaded to a drop folder on the Pi.
  • When a person inserts a USB stick into the Pi that does not have that special folder, they are a receiver. The contents of the drop folder are copied to a folder on the receiver's USB stick.

The target use case for this is slightly less shady than the spy origins of "dead drop" suggest. We have a teacher in a classroom with a Raspberry Pi who has issued USB sticks to their students. They want to be able to disseminate class material to students by having them plug in their sticks as they come into lecture.

Roadmap

These are the broad, generic steps we will take to get to our final destination. For a given programming language, (see node) more specific instructions can be found in that folder.

Step 1

Print a message to the console whenever a USB device is plugged in.

Step 2

Check for the existence of a folder named pidrop-admin at the root of that USB device and print something to the console.

Step 3

Grab all files from that folder and copy them to a folder on the Pi named swap. Any previous contents of the swap folder should be wiped away. The copy should be recursive, so if the admin folder contains directories those directories should all be copied.

Step 4

If the admin folder doesn't exist, find or create a folder at the root of the USB device named pidrop-user. Copy the contents of the swap folder on the Pi to this pidrop-user folder on the USB device. When copying files, overwrite any existing files but do not wipe the contents of that user folder.

Step 5

Take all the hardcoded values for folder names and move them to a config file.

Step 6

Write a setup script to generate this config file.

Step 7

Write an upstart script.

pidrop's People

Contributors

imakewebthings avatar whyqqqqq avatar

Stargazers

 avatar

Watchers

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