Giter Site home page Giter Site logo

blackgolf / cryptopaste Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hackthissite/cryptopaste

0.0 2.0 0.0 1.24 MB

A secure, browser-side pastebin.

Home Page: https://cryptopaste.org

License: GNU General Public License v3.0

PHP 13.59% CSS 44.45% JavaScript 26.26% HTML 15.70%

cryptopaste's Introduction

CryptoPaste

A secure, browser-side pastebin.

Demonstration

An active demonstration of CryptoPaste can be found at https://cryptopaste.org

Prerequisites

  • PHP 7
  • Composer
  • MySQL or SQLite

Install

  1. Install cryptopaste.sql into your MySQL database and create a user with SELECT, INSERT, UPDATE, and DELETE grants

    • TODO: SQLite installation
  2. Clone or download this repository, then cd into the directory, and run

$ composer install

  1. Copy config.ini.example to config.ini and edit the values

  2. Edit your nginx.conf and add this to your http block:

    map $remote_addr $ip_anonym1 {
     default 0.0.0;
     "~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" $ip;
     "~(?P<ip>[^:]+:[^:]+):" $ip;
    }

    map $remote_addr $ip_anonym2 {
     default .0;
     "~(?P<ip>(\d+)\.(\d+)\.(\d+))\.\d+" .0;
     "~(?P<ip>[^:]+:[^:]+):" ::;
    }

    map $ip_anonym1$ip_anonym2 $ip_anonymized {
     default 0.0.0.0;
     "~(?P<ip>.*)" $ip;
    }

    log_format anonymized '$ip_anonymized - $remote_user [$time_local] ' 
       '"$request" $status $body_bytes_sent ' 
       '"$http_referer" "$http_user_agent"';

    access_log /var/log/nginx/access.log anonymized;
  1. In your nginx.conf, in the server block, this is all you need to run the CryptoPaste app:
      location / {
        try_files $uri /index.php$is_args$args;
      }

      location ~ ^/index\.php(/|$) {
        fastcgi_pass unix:/var/run/php-fpm.sock; # Change this to reflect how your PHP-FPM is running
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
        fastcgi_param SERVER_NAME $host;
      }

TODO

  • (Need Help!) Tidy up all code and add testing
  • (Need Help!) Fix the UI to have better responsive scaling and other improvements
  • Finish README

cryptopaste's People

Contributors

kage avatar

Watchers

 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.