• Stars
    star
    483
  • Rank 90,467 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Filename based peer to peer file transfer

zget

Build Status Build status Docs Status Latest Version Supported Python versions License

A simple, Zeroconf-based, peer to peer file transfer utility, for situations where you and your peer are sitting next to each other and want to transfer a file quickly (and can shout the filename across the room).

Files and peers are recognized by the filename they want to transfer, not by their hostnames or IPs.

zget uses the fact that the filename is known to both parties as a basic authentication feature: The sender only advertises the sha1 hash of the filename on the network. Since the receiver must also know the filename, it can look for the sha1 using zeroconf.

If a match was found, a simple HTTP request is made: For transferring the file the actual filename is then requested from the sender. If this filename wasn't correct, the process is aborted.

Installation

$ pip install zget

I recommend a global --user installation, but you may have to fix $PATH issues on your platform.

Usage

zget works both ways:

  • zput for sharing a file
  • zget for receiving

Sharing

To share some pictures do:

$ zput my_holiday_pictures.zip

then shout

Hey Tom, I am sending you my_holiday_pictures.zip!

Tom will then do

$ zget my_holiday_pictures.zip

Done.

Receiving

You want to have some very important data from Tom:

$ zget annual_reports.xlsx

then shout

Hey Tom, can you send me annual_reports.xlsx?

Tom then does

$ zput annual_reports.xlsx

Boom. Done.

Aliases

Alternatively, in case of really complicated filenames, you can use aliases or have zput generate one for you:

$ zput LICENSE
Download this file using `zget LICENSE` or `zget C6P3`

Also zget can generate an alias so you can initiate the transfer without knowing what file will be transferred.

$ zget
Upload a file using `zput <filename> YHKC`

As of version 0.10 zget will figure out the resulting filename from the transfer metadata, so you won't be stuck with a file YHKC on your computer.

Options

You may inspect the available options using

$ zput -h

or

$ zget -h

Configuration

By default zget uses a random open port and the sending party must be able to accept incoming connections. This may be a problem when you have restrictive firewall settings or multiple network cards.

You may create a config file

  • ~/.zget.cfg on Linux/OSX
  • %APPDATA%/zget/zget.ini on Windows

to permanently set the port number and/or interface zget uses, e.g.

[DEFAULT]
port = 8080
interface = eth0

Note that port numbers below 1024 may require root permissions to be opened.

Python Interface

As of zget 0.8, there exists a Python interface for sending and receiving files as function calls. E.g.:

For sending:

import zget
zget.put("filename", port=2200)

and for receiving:

import zget
zget.get("filename", "filename_to_save_to")

For more information please see the API reference.

Security Considerations

Neither Zeroconf nor HTTP, both technologies used in this tool, should be used on untrusted networks (like public WiFi at a coffee shop).

Additonally, zput announces the filename and aliases as a simple unsalted SHA-1 hash on the network. This means that a malicious party could trivially intercept your transfers by simply generating a large enough number of hashes and then accepting the transfer on behalf of the desired recipient.

In this case you should however notice the attack by the recipient never receiving a file while the sender sees an upload happening.

More Repositories

1

raspi-overlayroot

Protect your SD card against wear and tear
Shell
117
star
2

crestic

Configurable Restic Wrapper
Python
104
star
3

owm-display

brightsky.dev display
JavaScript
69
star
4

mdct

A fast MDCT implementation using SciPy and FFTs
Python
50
star
5

stft

Spectrogram calculation for NumPy
Python
44
star
6

pymushra

pyMUSHRA is a python web application which hosts webMUSHRA experiments and collects the data with python.
Python
34
star
7

pymf

Python Matrix Factorization Module
Python
32
star
8

raspi-dashboard

Arch Linux based fullscreen web display
Shell
28
star
9

Typewriter

Unique Markdown editor for WebOS
JavaScript
22
star
10

python-go-cffi

Python to Go bindings using CFFI
Python
18
star
11

lastfm-albums

A generator for album art badges from your Last.fm stats
PHP
16
star
12

xbmc-somafm

SomaFM Plugin for XBMC
Python
13
star
13

dump_db

A database dumper for Symphony CMS
PHP
11
star
14

airdroppy

A browser based peer-to-peer file transfer proxy written in Python
Python
8
star
15

less_compiler

LESS Compiler for Symphony CMS
PHP
8
star
16

XSLTproc

XSLTproc integration for TextMate
JavaScript
8
star
17

Bugaroo

A Symphony CMS powered bugtracker
PHP
8
star
18

dont_drop

Hides single Section Navigation Group dropdown-menus
PHP
7
star
19

beta_ntf

Nonnegative Matrix and Tensor Factorization in Python
Python
7
star
20

readonly_mode

Readonly Mode for Symphony CMS
PHP
6
star
21

xslresourceloader

Lets you define resources to load directly in your XSL
PHP
5
star
22

dspy

Digital Signal Processing tools for Python
Python
4
star
23

noediting

Filter to prevent users from editing entries from frontend forms.
PHP
4
star
24

wavplot

Soundcloud plots for everyone
Python
4
star
25

SIP-Notifier

A tiny SIP client to notify of incoming calls
C#
4
star
26

sass_compiler

A SASS compiler for Symphony CMS
PHP
3
star
27

Computergraphics

just some homework we need to do
C
3
star
28

rir-generator.rs

RIR Generator in Rust
Rust
3
star
29

laravel-scaffold

Model-independent scaffolding for Laravel 4
PHP
3
star
30

Showdown

A JavaScript based Markdown parser
JavaScript
2
star
31

twofa

A simple command-line 2-factor authentication token manager
Python
2
star
32

admin_rainbow_headline

Symphony Admin Rainbow Headline Extension
PHP
2
star
33

beancount-paypal

PayPal Importer for Beancount
Python
2
star
34

mobile_phone_backend

Mobile phone related backend improvements for Symphony
PHP
1
star
35

gnome3-candythief

Gnome 3 extension that removes overly candy-like buttons
JavaScript
1
star
36

Dribbzine

JavaScript
1
star
37

joe-sh

joe implemented as shell functions
Shell
1
star
38

headunit-desktop-pkgbuild

Shell
1
star
39

version_info

This extension is DEPRECATED as recent versions of Symphony display the version number themselves.
PHP
1
star
40

pplt

Python
1
star
41

ftm-python

Python
1
star
42

Symposium-2011

My presentations at the Symphony CMS Symposium 2011 in Cologne
JavaScript
1
star
43

vue-mushra

1
star
44

alerts

A stupid extension that displays a lot of alert messages.
PHP
1
star
45

pycell

A Hydrogen code cell executor
Python
1
star
46

enable_tabkey

Enables tab-indentation in code-editors
JavaScript
1
star
47

x264

Mirror of the x264 implementation
C
1
star