Code Monkey home page Code Monkey logo

cryptonote's People

Contributors

alainmeier avatar bndr avatar dependabot[bot] avatar m3nix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptonote's Issues

Install not @ heroku

Hi,

is it possible to use this tool somewhere else than at Heroku ?
Any way to install this simply on an server ?

thanks for your replies

Add request throttling

Though there is a lot of entropy in both the ID of the message and in the generated password, it would not hurt to add some request throttling to prevent some brute force attacks. Something like Rack Attack would be perfect.

SQLite database migration fails

Using the Dockerfile below, the SQLite migration seems to fail:

FROM ruby:2.5.3

ENV RAILS_ENV production

RUN apt-get install git

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs

WORKDIR /app

RUN git clone https://github.com/alainmeier/cryptonote.git .
RUN cp config/database.yml.sample config/database.yml
RUN echo "gem 'sqlite3', '~> 1.3.6'" >> Gemfile
RUN ./bin/bundle install
RUN ./bin/rake assets:precompile
RUN ./bin/rake db:setup
RUN ./bin/rake db:migrate

CMD ./bin/rails server

It gives the following error:

Step 12/14 : RUN ./bin/rake db:setup
 ---> Running in 406c851864e1
rake aborted!
ActiveRecord::StatementInvalid: SQLite3::SQLException: near "(": syntax error: CREATE TABLE "messages" ("id" uuid DEFAULT uuid_generate_v4() NOT NULL PRIMARY KEY, "content" text, "location" varchar, "password" varchar, "latitude" float, "longitude" float, "created_at" datetime, "updated_at" datetime, "encryption_key" varchar, "salt" varchar, "deleted" boolean DEFAULT 'f')
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `block in execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:846:in `block in method_missing'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:835:in `method_missing'
/app/db/schema.rb:19:in `block in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `instance_eval'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `define'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:44:in `define'
/app/db/schema.rb:13:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:226:in `load_schema'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:255:in `block in load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:295:in `block in each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:254:in `load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:248:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:252:in `block (3 levels) in <top (required)>'
SQLite3::SQLException: near "(": syntax error
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `initialize'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `new'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:91:in `prepare'
/usr/local/bundle/gems/sqlite3-1.3.13/lib/sqlite3/database.rb:137:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `block in execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:590:in `block in log'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract_adapter.rb:583:in `log'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/sqlite3_adapter.rb:232:in `execute'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/connection_adapters/abstract/schema_statements.rb:278:in `create_table'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:846:in `block in method_missing'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `block in say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:815:in `say_with_time'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/migration.rb:835:in `method_missing'
/app/db/schema.rb:19:in `block in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `instance_eval'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:48:in `define'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/schema.rb:44:in `define'
/app/db/schema.rb:13:in `<top (required)>'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `block in load'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:259:in `load_dependency'
/usr/local/bundle/gems/activesupport-5.0.7.2/lib/active_support/dependencies.rb:287:in `load'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:226:in `load_schema'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:255:in `block in load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:295:in `block in each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:292:in `each_current_configuration'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/tasks/database_tasks.rb:254:in `load_schema_current'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:248:in `block (3 levels) in <top (required)>'
/usr/local/bundle/gems/activerecord-5.0.7.2/lib/active_record/railties/databases.rake:252:in `block (3 levels) in <top (required)>'
Tasks: TOP => db:schema:load
(See full trace by running task with --trace)
Created database 'db/production.sqlite3'
-- enable_extension("plpgsql")
   -> 0.0002s
-- enable_extension("uuid-ossp")
   -> 0.0000s
-- create_table("messages", {:id=>:uuid, :default=>#<Proc:0x00005622e65b0d38@/app/db/schema.rb:19 (lambda)>, :force=>:cascade})
The command '/bin/sh -c ./bin/rake db:setup' returned a non-zero code: 1

Passphrase

Allow someone to enable a passphrase on top of the encryption that is required in order to open and thus delete the message.

db:setup?

Instructions say run

rake db:setup

But it errors out for my local fork when I try to setup up the database. Looks like the repo is missing a database.yml file?

Error:

johnbackus$ rake db:setup
rake aborted!
Could not load database configuration. No such file - /Users/johnbackus/Dropbox/coding/cryptonote/config/database.yml
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application/configuration.rb:110:in `database_configuration'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/activerecord-4.0.0.rc2/lib/active_record/railtie.rb:43:in `block in <class:Railtie>'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `instance_exec'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `block in run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie.rb:201:in `run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `block in run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine/railties.rb:17:in `each'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/application.rb:243:in `run_tasks_blocks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/engine.rb:446:in `load_tasks'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/railties-4.0.0.rc2/lib/rails/railtie/configurable.rb:30:in `method_missing'
/Users/johnbackus/Dropbox/coding/cryptonote/Rakefile:6:in `<top (required)>'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/rake_module.rb:25:in `load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:589:in `raw_load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:89:in `block in load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:88:in `load_rakefile'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:72:in `block in run'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:160:in `standard_exception_handling'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/gems/rake-10.0.4/lib/rake/application.rb:70:in `run'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `eval'
/Users/johnbackus/.rvm/gems/ruby-2.0.0-p0/bin/ruby_noexec_wrapper:14:in `<main>'
(See full trace by running task with --trace)

Add Cryptonote API

Add a simple REST API so that the link can be generated programmatically.

The caller would provide a text and the API would return a link.

Improve tests

Right now the testing is non-existent, so fleshing that out would be nice despite the simplicity of the app.

Time expiration

Add the ability to set an expiration time if a message is not read. It should default to 30 days as that is a more secure default than allowing a message to sit on the server forever, encrypted or not.

Syntax highlighting

I sometimes share code on Cryptonote, so it would be nice to have a code mode that enables syntax highlighting for the recipient.

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.