Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

beautiful-lasso

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

beautiful-lasso

A tiny application to expose a file-system branch to the world.

  • 0.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Build Status npm


Lasso

A tiny application to expose a file-system branch to the world.

Installation

sudo yarn global add beautiful-lasso
# or
sudo npm i -g beautiful-lasso

(the reason why it's beautiful-lasso and not lasso is because the name was already taken on npm)

Usage

RANCH=exposed_directory lasso [--port 8000]
# exposed_directory is relative to where the command is invoked

This will expose exposed_directory (also called the ranch ) to the world on port 8000 (default to 3000, the --port is optional). Of course this will not really expose the directory to the world unless you are running this command on a public machine and configure the firewall to accept entrances on the given port.

Configuration

By default, the files in the ranch are secured with http basic authentication. You'll need to create a .lasso.passwd into the ranch so you can register users. Here's an example of .lasso.passwd :

bob:bob_password

Now bob can request a file in the ranch :

curl http://alice.com:8000/database_backup.sql -u bob:bob_password
# you can run
curl http://alice.com:8000/database_backup.sql -u bob
# to prompt for the password so it's not written in bash history

.lasso.public

It's also possible to make some files available publicly without basic authentication required. Just create .lasso.public in the ranch :

public-file.txt
public-file2.txt

Now bob and whoever can request :

curl http://alice.com:8000/public-file.txt
# without the need of authentication

(wildcards are not supported at this moment)

You can also make a directory publicly. In .lasso.public :

public-file.txt
public-directory

Every file in public-directory are exposed,

curl http://alice.com:8000/public-directory/file1.txt

(note that making a directory public is not making its subdirectories public too, you have to explicitily write every directory you want to make public into .lasso.public)

This is Lasso philosophy, you just use your lasso to quickly grab some files, with a very basic layer of security.

Commands

You can also use command keywords, for example :

curl http://alice.com:8000/public-directory/latest -u bob
# This will fetch the last modified file inside public-directory

Keywords

FAQs

Package last updated on 28 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc