Git Product home page Git Product logo

imgurb's Introduction

imgurb

Easily take screenshots & upload them somewhere (Linux only).

No real security, once someone figures out your password, or intercepts its hashed version, anyone can upload to your server lol!

Installation

git clone https://github.com/conchyliculture/imgurb

Taking screenshots is done using either import from imagemagick package, or maim. Please install onf of these.

The server requires you install Sinatra.

Server

Start the server & update the config.json file.

$ ruby server/index.rb
Setting password:
qsd

Change value for my_url to be the URL at which your server can be joined.

$ cat server/config.json 
{"my_url":"http://localhost:4567","secret":"f56ce90cd79e038e237ab7f8b89e804b5ebf59be8cda49fa97ca2da997ab2f5a","pics_dir":"pics"}

Then restart the server, which by default listens on localhost, port 4567. I otherwise use Puma for some semi-proper webservering.

$ ruby server/index.rb
[2019-11-14 12:58:24] INFO  WEBrick 1.4.2
[2019-11-14 12:58:24] INFO  ruby 2.5.7 (2019-10-01) [x86_64-linux-gnu]
== Sinatra (v2.0.5) has taken the stage on 4567 for development with backup from WEBrick
[2019-11-14 12:58:24] INFO  WEBrick::HTTPServer#start: pid=18658 port=4567

Client

Start the client & update the config.json file.

$ ruby client/push.rb
Setting password:
bad_password

Change value for upload_url:

$ cat client/config.json
{"upload_url":"http://localhost:4567/upload","secret":"ad96002c8fe486a6ba924379e46d3b5b7a78bd80ddb56c935e823b0b33bca1d3","delay":1}

You can also set the default delay before taking a screenshot here.

Then run again:

$ ruby client/push.rb
sleeping 1s
Running import /tmp/imgurb-screenshot20191114-19016-11l4n0j.jpg
https://localhost:4567/p/2242eeab.jpg

You screenshot is available at that last URL

Make the client wait for more than 1 second before taking a screenshot:

$ ruby client/push.rb 5

imgurb's People

Contributors

conchyliculture avatar

Stargazers

Nicolas RUFF 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.