Giter Site home page Giter Site logo

hashbin's Introduction

HashBin

HashBin is a paste bin that never sees the contents of its pastes.

It takes advantage of some unique properties of the hash portion of a URL to avoid ever being able to see the content the pastes it helps create.

What is the "hash" of a URL, and why is it special? The hash is the portion of the URL that follows the # symbol. For example:

http://example.com#the-hash

Here's what makes it special:

When an agent (such as a Web browser) requests a web resource from a Web server, the agent sends the URI to the server, but does not send the [hash].

-- Wikipedia

At first glance that may not seem terribly note-worthy, but it allows for something very interesting. It allows you to store information in a URL that the server never sees, but can be read by JavaScript.

You can think about it like this, a URL contains two distinct pieces of information:

  1. A pointer to a location where it can download a web app
  2. A piece of data which you want that app to interpret

This is exactly what I have built. When your browser requests http://hashb.in it retrieves a simple JavaScript web app that immediately takes the content of the hash, uncompresses it, and displays it as text on the page.

For example:

A sample HashBin paste

Since my server never sees, much less provides, the content being displayed on the page, I posit that I should be immune to takedown notices. Even if I did receive one, what action could I take? I suppose I could stop hosting the app, but that hardly seems reasonable.

Say a website offered you a .doc file as well as a link to download Microsoft Word so that you could view that file. If that file was found to contain, illegal or copyrighted material, we wouldn't say that Microsoft should stop hosting Microsoft Word would we?

Credit

This site was inspired by two other very similar sites:

hashbin's People

Contributors

captbaritone avatar

Watchers

 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.