From 6c00587edc48a41902a2318d6f95c083192b30e8 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 20 May 2014 23:02:33 +0000 Subject: [PATCH] finished bundling libraries --- README.md | 6 +----- onionshare.py | 7 +++++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b15ad5aa..8a60449d 100644 --- a/README.md +++ b/README.md @@ -4,11 +4,7 @@ A program to securely share a file of any size with someone, designed to be run ## Quick Start -Boot to Tails, setting an administrator password. Clone this repository. Install the dependencies: - - sudo apt-get install python-flask - -Then run onionshare.py, and pass it a filename. It will look something like this: +You need to run this script as root, so make sure you set an administrator password when you boot Tails. Run onionshare.py, and pass it a filename. It will look something like this: amnesia@amnesia:~/Persistent/code/onionshare$ sudo ./onionshare.py ~/Persistent/file_to_send.gpg [sudo] password for amnesia: diff --git a/onionshare.py b/onionshare.py index 73735151..2c309900 100755 --- a/onionshare.py +++ b/onionshare.py @@ -1,9 +1,12 @@ #!/usr/bin/env python -import os, sys, subprocess, time, hashlib +import os, sys, subprocess, time, hashlib, inspect from random import randint - from functools import wraps + +lib_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))+'/lib' +sys.path.append(lib_path) + from flask import Flask, Markup, Response, request, make_response, send_from_directory app = Flask(__name__)