README.md 1.94 KB
Newer Older
setop's avatar
setop committed
1

setop's avatar
setop committed
2
3
4
5
6
7
8
9
10
11
# What

**pylufic** is a command line tool which allow to interact with [Let's Upload File (Lufi)](https://demo.lufi.io/about) instances, that is to download and upload client-side encrypted files.

# Why

Lufi is a web-application allowing client-side encrypted file transfers between users. Hence you don't have to trust the service provider to protect your data.

However Lufi works in a web browser, like Firefox or Chormium. When you don't want to run a full-featured graphical web browser on your machine to use it, you need a command line.

setop's avatar
setop committed
12
**pylufic** is a python implementation of a Lufi CLI, useful for those who already have Python in their environments.
setop's avatar
setop committed
13
14
15
16
17

# How

**pylufic** use the same software libraries as the Javascript version - websocket client and Standford Javascript Cryptography Library (SJCL) - but in their python implementations.

setop's avatar
setop committed
18
# Use
setop's avatar
setop committed
19

setop's avatar
setop committed
20
## Install
setop's avatar
setop committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

Be sure to have Python 3.6+ installed.

Git clone this repo (or download as zip) :

```
git clone https://framagit.org/setop/pylufic.git && cd pylufic
```

Optionally, create python virtual environment :

```
python3 -m venv .venv && . .venv/bin/activate
```

Pip install requirements (use sudo if not in a venv) :

```
pip install -r requirements.txt
```

setop's avatar
setop committed
42
If you want to test libraries, run :
setop's avatar
setop committed
43
44
45
46
47

```
./sjcl-test.py && ./ws-test.py
```

setop's avatar
setop committed
48
49
50
51
52
## Run

pylufic uses [baker](https://bitbucket.org/mchaput/baker) library which provide inline help 

### Help
setop's avatar
setop committed
53
54
55
56
57

```
./pylufic.py
```

setop's avatar
setop committed
58
### Upload
setop's avatar
setop committed
59
60
61
62
63
64
65

```
./pylufic.py file service_url
```

You may use "https://framadrop.org/" (consider donation).

setop's avatar
setop committed
66
### download
setop's avatar
setop committed
67
68
69
70
71
72
73

```
./pylufic.py url
```

Be aware a file is opened in the current directory in append mode with the name provided in the metadata of the transfer.

setop's avatar
setop committed
74
75
76
77
78
79
80
81
82
83
84
### delete

To delete a file use link provided by upload function.

An example using curl :

```
curl -s -S 'https://framadrop.org/d/<shortid>/<token>' | html2text
```

# Limitation
setop's avatar
setop committed
85

setop's avatar
setop committed
86
**pylufic** handles only one file at a time ; no multi-files upload or download.