r/Python • • Mar 07 '17

CIA uses Python (a lot)

From the latest Vault 7 leaks from Wikileaks, we can see that CIA uses a lot of Python in its secret hacking tools.

Most notably in the Assassin, Caterpillar, MagicViking and Hornet projects.

Unfortunatelly, no files from these projects have been released yet. But if you look at the dump that was released, there are plenty of .py files, and even PIL is included.

There are even Coding Conventions: https://wikileaks.org/ciav7p1/cms/page_26607631.html

You can see more Python-related stuff here: https://search.wikileaks.org/?query=python&exact_phrase=&any_of=&exclude_words=&document_date_start=&document_date_end=&released_date_start=&released_date_end=&publication_type%5B%5D=51&new_search=False&order_by=most_relevant#results

1.1k Upvotes

220 comments sorted by

View all comments

283

u/Frog_and_Toad Mar 07 '17

I'm ok with it as long as they are following PEP8.

-38

u/wolf2600 Mar 07 '17

TABS NOT SPACES!!

165

u/can_dry Mar 07 '17

Indentation

Indent your code blocks with 4 spaces.

Never use tabs or mix tabs and spaces.

Sorry, you're just not CIA material.

10

u/[deleted] Mar 07 '17

Question from a not so experienced programmer: what's wrong with tabs?

0

u/[deleted] Mar 07 '17

[deleted]

8

u/wolf2600 Mar 07 '17

You don't have to count whether you have 3 spaces or 4. ON. EVERY. LINE.

And don't even get started with deeply nested sections.... Was that 24 spaces or 25? Better delete them all and start again.

9

u/trekkiemage Mar 07 '17 edited Mar 10 '17

I have sublime set up so that I hit tab and it enters four spaces. I've also got whitespace visibility turned on and it allows me to control indentation with a hot-key instead of the space bar.

Basically if you're using the space bar to do 4-space indents you're doing it wrong.