npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pidrop

v1.0.3

Published

Turn a Raspberry Pi into a device similar to a dead drop

Downloads

5

Readme

Node Pidrop

Turn your boring Raspberry Pi into a spy-thriller file dead drop with Node.js and USB sticks.

How It Works

You will follow the instructions below for setting up the Pi and installing the pidrop Node package. You will be prompted with some options and asked to plug in your "Admin" USB stick. This will create a special folder on the USB drive. When the pidrop process is running, if you plug in that USB stick with that special folder, the contents of that folder will be copied to the Pi. Whenever anybody else plugs in a USB stick the files will be downloaded to their stick.

Setup Instructions

This project and these instructions assume you are using a Raspberry Pi running Raspian as the pi user. They may also work on Mac OSX, but no promises.

  1. Install Node
  2. Automount USB Drives
  3. Install Pidrop
  4. Run Pidrop

Install Node

  1. Install nvm by running curl https://raw.githubusercontent.com/creationix/nvm/v0.24.0/install.sh | bash.
  2. Open ~/.bashrc and add this to a new line at the bottom: source ~/.nvm/nvm.sh.
  3. Run source ~/.bashrc.
  4. Run nvm install 0.10.28.
  5. Run nvm alias default 0.10.28.
  6. Run nvm use default.
  7. Verify everything works by running which node. You should see something like /home/pi/.nvm/v0.10.28/bin/node.

Automount USB Drives

  1. Make sure your system is up to date by running sudo apt-get update then sudo apt-get upgrade.
  2. Install usbmount by running sudo apt-get install usbmount.
  3. By default, usbmount mounts new drives as root. We need to mount them as pi.
    1. Run id. This will print a handful of things to the console. Look for gid and uid and write down their numbers. Chances are, both of them are 1000.
    2. Open the usbmount config by running sudo nano /etc/usbmount/usbmount.conf.
    3. Find the line that reads FS_MOUNTOPTIONS="". It should be blank between the quotes right now.
    4. Inside those quotes, add -fstype=vfat,gid=1000,uid=1000 where 1000 is replaced with the gid and uid you wrote down earlier.
    5. Save the file and exit.
  4. Reboot the pi by running sudo reboot.
  5. Verify automounting as pi works by:
    1. Plugging in a USB stick.
    2. Run df. The last column lists mounting points of drives. You should see one that says something like /media/usb0. Note that folder path.
    3. Run ls -all /media/usb0 using the folder path of your drive, if it is different.
    4. The first line, 3rd and 4th column, should both say pi.

Install Pidrop

  1. Run npm install -g pidrop.
  2. You will see a bunch of dependencies download, then a series of prompts about folder names. The prompts will explain how each folder is used. You can accept the defaults by pressing enter at each prompt.
  3. You will then be asked to ensure that your "Admin" USB stick is unplugged. Make sure it is unplugged, then answer y to continue.
  4. You will be asked to now plug in your "Admin" stick. Do this and leave it in until the install instructions tell you it is safe to unplug the stick.

Run Pidrop

  1. Run pidrop. The process will now run and wait for drives to be plugged in. You now have an operational Pidrop.

Current Limitations

  • USB drives must be FAT formatted.