README.rst 2.01 KB
Newer Older
darko-poljak's avatar
darko-poljak committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
cloak
=====

Download URL target encrypted then compressed and base64 encoded as
DATA.txt file.

Target URL is expected to be base64 encoded zlib compressed AES
encrypted URL. URL can be prepared using this same tool (see usage
below).
URL content is fetched and then AES encrypted, zlib compressed and
base64 encoded. Content is downloaded as DATA.txt. It can be
decoded, uncompressed and decrypted using this same tool (see usage
below).
Content size can be limited.
It uses lock which allows only one request at a time.
It is implemented with bottle microframework.
17

darko-poljak's avatar
darko-poljak committed
18
It is a hack! :)
19 20
This tool was written to deceive/fool proxy which prevented me to
download usefull tools and/or source code files.
darko-poljak's avatar
darko-poljak committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

Usage
=====

Print usage:

.. code:: bash

    python x.py -h

Prepare target URL:

.. code:: bash

    python x.py c TARGET
    python x.py c 'http://www.google.com'

Decode, decompress and decrypt target content saved as DATA.txt and
save it to data.tar.xz:

.. code:: bash

    cat DATA.txt | python x.py d > data.tar.xz

45
Run it in development mode using python wsgiref:
darko-poljak's avatar
darko-poljak committed
46 47 48 49 50 51

.. code:: bash

    python x.py ANY-ARG
    python x.py x

52
Run it in production mode using python wsgiref:
darko-poljak's avatar
darko-poljak committed
53 54 55 56 57

.. code:: bash

    python x.py

58 59 60 61
Run it as apache24 wsig:

see apache-config file for apache configuration

darko-poljak's avatar
darko-poljak committed
62 63 64 65 66 67 68 69 70
When you use this same tool for prepareing target URL and decrypting
target content on the client then x.py need to be defined with the same AES
KEY and IV values as on the server.

Installation
============

Copy bottle.py and x.py to the desired server and directory and run it.

71 72
For use with apache24 install mod_wsgi and see apache-config file for apache configuration.

darko-poljak's avatar
darko-poljak committed
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95
Documentation
=============

this README.rst, code itself, docstrings

It can be found on github.com at:

https://github.com/darko-poljak/cloak

Tested With
===========

Python2.7, Python3.4

Further development ideas
=========================

* Implement key, iv rotation or something similar.

* Add configuration file.

* Support defined maximum requests at a time instead of one lock.