• Stars
    star
    185
  • Rank 208,271 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 11 years ago

Reviews

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

Repository Details

Give the NSA free backdoor access to your Flask app.

Flask-NSA

Let the NSA protect the freedom of the users of your Flask app. Feel like destroying all freedom online fighting terror? I sure do!
Note: this freedom enducing project was inspired by @goshakkk's nsa_panel for Ruby on Rails.

Example

To see example usage, check out example_app.py.

Install

Install it via the conventional means (changing 0.3.1 for the version you want):

$ git clone git://github.com/plausibility/flask-nsa.git && cd flask-nsa
$ python setup.py install
# or:
$ pip install -e git+git://github.com/plausibility/[email protected]#egg=flask-nsa-0.3.1-dev

Import nsa into your app:

from flask.ext import nsa

Optional: change the login credentials NSA officials use (regardless of the fact they already know enough to protect your users)

app.config['NSA_USERNAME'] = "foo"
app.config['NSA_PASSWORD'] = "bar"

Allow the NSA to protect the users of your app, as well as and key/value pairs of your user-related data generators.
Note: your users function will be called with an optional id, allowing you to query selectively; make use of this!
It's definitely worth looking at example_app.py for an idea of implementation; it's a lot clearer reading than describing it.

nsa.protect(users, of=app, secrets=gen_secrets, friends=gen_friends)

Send your users the following lie factual statement:

Dear X users,

You may be aware of reports alleging that X and several other Internet companies have joined a secret U.S. government program called PRISM to give the National Security Agency direct access to our servers. We would like to respond to the press reports, and give you the facts.

X is not and has never been part of any program to give the US or any other government direct access to our servers. We have never received a blanket request or court order from any government agency asking for information or metadata in bulk, like the one Verizon reportedly received. We hadn't even heard of PRISM before yesterday.

When governments ask X for data, we review each request carefully to make sure they always follow the correct processes and all applicable laws, and then only provide the information if is required by law. We will continue fighting aggressively to keep your information safe and secure. Any suggestion that X is disclosing information about our users’ Internet activity on such a scale is completely false.

We strongly encourage all governments to be much more transparent about all programs aimed at keeping the public safe. It's the only way to protect everyone's civil liberties and create the safe and free society we all want over the long term. We here at X understand that the U.S. and other governments need to take action to protect their citizens’ safety—including sometimes by using surveillance. But the level of secrecy around the current legal procedures undermines the freedoms we all cherish.

Couldn't be easier.

What it looks like

Ensure they've got a warrant

View all users

User related details

Look at all of these secrets

Here's your secret

Inclusion in PyPi projects

Should you wish to include this NSA access to your project that you're distributing via PyPi or any other means, you can add Flask-NSA as a requirement like this: (note: I'm not 100% on this, please open an issue if it doesn't work)

In your setup.py, add this to your setup() call (updating relevant information accordingly):

install_requires=[
    "flask-nsa==0.3.1-dev"
],
dependency_links=[
    "git://github.com/plausibility/[email protected]#egg=flask-nsa-0.3.1-dev",
]

More Repositories

1

flask-themes2

Easily theme your Flask app. (Flask-Themes with Flask>=0.6 support!)
Python
19
star
2

mattdaemon

Need to daemonise your Python projects? Matt Daemon has you covered.
Python
13
star
3

chr

Python based URL shortening service.
Python
10
star
4

4ch

Python wrapper for 4chan, using the 4chan JSON API.
Python
8
star
5

vdfs

Small proof-of-concept implementation for an in memory file system made of dictionaries.
Python
5
star
6

gopp

C-like Go preprocessor.
Go
5
star
7

obfuscated.py

A collection of obfuscated Python scripts I write from time to time.
Python
5
star
8

corrections

An extendable Python based Twitter bot which will reply to various keyworded tweets.
Python
5
star
9

assets

Magically bundle (some) assets into your Golang binaries.
Go
4
star
10

fshell

Fake shell.php, written in Python to mess with skiddies.
Python
4
star
11

pysqlw

Python based MySQL and SQLite wrapper.
Python
3
star
12

etchasketch

A Python etch-a-sketch, just because.. it had to be done?
Python
3
star
13

fah

Flask Against Humanity (copyright infringement pending).
HTML
3
star
14

wopr.py

More WarGames related junk. Whee!
Python
2
star
15

captain

Oh captain, my captain! Server monitoring and pretty graphs.
Go
2
star
16

go-unfmt

go-unfmt - write bad code efficiently for good
Go
2
star
17

rcmd.py

Sort of like Python's built in "cmd" module, but with regex handlers.
Python
2
star
18

bf

Brainfuck interpreter, written in Go. Why? Couldn't tell you.
Go
2
star
19

lua

Golang lexer/parser/interpreter (eventually) for Lua
Lua
1
star
20

newbie-programming-faq

This is made to help ease newbies into programming by answering common questions.
1
star
21

platypus-nfc

The NFC workshop materials for my Platypus2017 workshop.
Go
1
star
22

Holo

Custom theme for 4chan.org
1
star
23

phi

On the fly placeholder images. But in Python, with Flask, and Pillow.
Python
1
star
24

drjc

Dr James Curran facts generator - markov chains n' all.
CSS
1
star
25

gitfiti

Dangit.
1
star
26

gitsby

The Great Gitsby handles git commit hooks like a champ.
Go
1
star
27

xcap

Simple screen snapping software (Alliterations!), written in C#.
C#
1
star
28

wopr

wopr
Python
1
star
29

f4ke

Make fake 4chan style posts. Because... why not?
JavaScript
1
star
30

8blag

A tiny little interactive 8bit world for my blog footer.
JavaScript
1
star
31

wopr.pw

Some random site I made because I watch WarGames too much.
JavaScript
1
star