All Projects → nejdetckenobi → gimme-that

nejdetckenobi / gimme-that

Licence: GPL-3.0 license
A file upload server tool written in Python.

Programming Languages

javascript
184084 projects - #8 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to gimme-that

localtileserver
🌐 dynamic tile server for visualizing rasters in Jupyter with ipyleaflet or folium
Stars: ✭ 190 (+603.7%)
Mutual labels:  flask-application
jack bunny
Inspired by Facebook's bunnylol search engine.
Stars: ✭ 19 (-29.63%)
Mutual labels:  flask-application
flask-template
Template for creating Flask based projects
Stars: ✭ 60 (+122.22%)
Mutual labels:  flask-application
Python-flask-with-uwsgi-and-nginx
Python Flask with Nginx and uWSGI
Stars: ✭ 34 (+25.93%)
Mutual labels:  flask-application
Nectus
A boilerplate Flask API for a Fullstack Project with some additional packages and configuration prebuilt. ⚙
Stars: ✭ 32 (+18.52%)
Mutual labels:  flask-application
avatar-gen
pillow 生成头像,中英文首字母或者随机像素化。Using pillow for generate avatars, first letter of string in Chinese and English or random pixel like avatars.
Stars: ✭ 31 (+14.81%)
Mutual labels:  flask-application
vue-flask-template
📦 一个快速搭建 Web 应用的模版!前端使用渐进式框架 Vue,后端使用微框架 Flask
Stars: ✭ 29 (+7.41%)
Mutual labels:  flask-application
eleanor
Code used during my Chaos Engineering and Resiliency Patterns talk.
Stars: ✭ 14 (-48.15%)
Mutual labels:  flask-application
searchhub
Fusion demo app searching open-source project data from the Apache Software Foundation
Stars: ✭ 42 (+55.56%)
Mutual labels:  flask-application
pycroft
The new AG DSN management system
Stars: ✭ 16 (-40.74%)
Mutual labels:  flask-application
todoist bot
@Todoist_bot for Telegram (UNofficial)
Stars: ✭ 35 (+29.63%)
Mutual labels:  flask-application
codecat
CodeCat is an open-source tool to help you find/track user input sinks and security bugs using static code analysis. These points follow regex rules. Beta version.
Stars: ✭ 265 (+881.48%)
Mutual labels:  flask-application
MiniBookSearch
📗 Simple book management system using Web API "openBD" / Python(Flask)+ Vue.js + Elasticsearch
Stars: ✭ 30 (+11.11%)
Mutual labels:  flask-application
Python-Studies
All studies about python
Stars: ✭ 56 (+107.41%)
Mutual labels:  flask-application
Telegram-mailer
Web-application for sending messages to list of users. Use several accounts to avoid ban.
Stars: ✭ 28 (+3.7%)
Mutual labels:  flask-application
flask-boilerplate
A Flask Boilerplate to quickly get started with production-grade flask application. It has some additional packages pre-configured for ease of development.
Stars: ✭ 43 (+59.26%)
Mutual labels:  flask-application
project-demo
An Online Web Game "You Perform, I Guess!" based on C3D Model
Stars: ✭ 36 (+33.33%)
Mutual labels:  flask-application
Dog-facts-API
An API returns random dog facts 🐶
Stars: ✭ 46 (+70.37%)
Mutual labels:  flask-application
talkshow
A Call 4 Papers System - A simple base app as example of Flask Architecture
Stars: ✭ 56 (+107.41%)
Mutual labels:  flask-application
certfico
App para geração e envio de certificados para eventos
Stars: ✭ 20 (-25.93%)
Mutual labels:  flask-application

Gimme That Build Status PyPI version

Gimme That is a file transfer tool written in Python. It turns your computer into a server and your friends simply upload their files to your computer! It has a simple web interface. So anyone can use it. It uses Python 3.4+, so...

Peek

Installation

Just use pip install gimmethat to install. It has following Python package dependencies, at its minimum

  • flask
  • flask_bootstrap
  • netifaces
  • gunicorn

And if you want to use additional features like antivirus integration and notifications, you would need

Python side

  • clamd (for antivirus integration)
  • notify2 (for notifications)

OS side

  • python3-gi (for notifications)
  • libnotify-bin (for notifications)
  • clamav (for antivirus integration)

How to use it?

Gimme That has a simple concept: You turn yourself into a server, add some username and password if you wish to have an authorization, give that credentials to your friend with your adress and your friend uploads files to your computer.

So, there are several things you can do with this program.

Authorized Transfers

You can restrict Gimme That's file uploading to a number of users with credentials. Just add the --secure optional argument to restrict file uploads to only authorized users with credentials. All information about user system is below. By default, Gimme That does not use authorization.

Creating users

Use the line below to create a user named USER with the password PASSWORD

gimme add USER PASSWORD

Removing users

Use the line below to remove a user named USER

gimme remove USER

Changing user passwords

Use the line below to change USER's password to PASSWORD

gimme change USER PASSWORD

Showing all users

You can see all users you created by typing

gimme show

Running the server

Use the command below to run your server on port PORT

gimme run

This will produce the output which contains the address of the interfaces you can use to connect the upload page. Once you've start the server, your friends can upload files to your computer. Please use Python 3.x. You can specify port, title and upload directory by using optional parameters. For example, to provide the screen above and to set upload directory to SOMEPATH, you should use the command below

gimme run --port 5000 --directory "SOMEPATH" --title "Someone's file storage"

Default values for parameters

Name Value
--directory "~/Uploads" (~ is current user's home directory in both Windows and *nix)
--port 5000 if not specified.
--title "" (Nothing will be shown as title)
--max-size No limit if not set.
Can be 256 for 256 bytes,
13.6K for 13.6 kilobytes,
1M for 1 megabyte,
2.2G for 2.2 gigabytes,
etc.
--scan False if not specified. Else,
uploaded files will be scanned if you have ClamAV
and will be removed if infected.
--notify False if not specified. Else,
you'll have notifications via libnotify-bin package
--auth False if not specified. Else,
uploading a file requires HTTP basic auth

Notes

  • GimmeThat uses Twitter's Bootstrap.

  • GimmeThat does not overwrite uploaded files. When your friend user used your server to upload wiggle.jpg at 2018-01-17 16:14:24.620737, program will put the files into ~/Uploads/user/2018-01-17 16-14-24.620737/wiggle.jpg. So, even if he/she uploads the same file again and again, it'll be put into different directories.

  • You can drop files. It has drag and drop support.

  • If you specify --scan option and getting interesting logs for every single file (or an error maybe), you may have the issues below: Both issues are solved for linux. Please check Antivirus Issues section.

    • Clamav is not installed.
    • Permission errors. (Possible cause of lstat() failed)

Additional Screenshots

Command line while a client uploads some files, ClamAV's action when an infected file found, multi file uploading and removing infected ones while clean ones stay.

antivirus

You can see the drag&drop support on Chrome

drag_and_drop

You will be notified if you prefer by using libnotify-bin

notifications

Antivirus Issues

Clamav is not installed

Note: For CentOS, please follow this tutorial then take the hard way. The commands below will not work for you obviously till the hard way.

Please use the command below to install ClamAV:

sudo apt-get install clamav-daemon clamav-freshclam clamav-unofficial-sigs

Then update the virus DB by running the commands below. This will take some time.

sudo systemctl stop clamav-daemon
sudo systemctl stop clamav-freshclam
sudo freshclam  # It'll update the virus DB.

And then start ClamAV daemon:

sudo systemctl start clamav-daemon
sudo systemctl start clamav-freshclam

Optionally, you enable clamav-daemon so it will be automatically run on startup:

sudo systemctl enable clamav-daemon
sudo systemctl enable clamav-freshclam

Clamav is not configured properly

Easy way

Linux users uses Debian/Ubuntu based distros, after the installation, run gimmeconf and you should be OK. For all else - or if you're not OK with that - you should try the hard way.

Hard way

I am assuming that you reinstalled the following packages: (If you didn't, please try reinstalling the packages.)

  • clamav-daemon
  • clamav-freshclam
  • clamav-unofficial-sigs

Note: USERNAME is your account's username. Not the name which you created with gimme add.

Stop the ClamAV first:

sudo systemctl stop clamav-daemon
sudo systemctl stop clamav-freshclam

Just because I use ClamAV for on-demand scans, I set the user for ClamAV as ourselves. To do this, open /etc/clamav/clamd.conf with your text editor and find the User line. (Caution: It will require superuser privileges.)

...
User clamav
...

Replace the value clamav with your username. (My username is USERNAME here.)

User USERNAME

Save and close the file when you're done.

Add your user to clamav group.

sudo adduser USERNAME clamav

Then change the ownership of the log file so it can use the file again

sudo chown USERNAME:clamav /var/log/clamav/clamav.log

And lastly, start ClamAV again:

sudo systemctl start clamav-daemon

Thanks

Thanks to the following reddit users for their ideas:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].