Skip to content

Instantly share code, notes, and snippets.

@Skarlett
Skarlett / findSpaceDirectories-Linux.py
Last active October 9, 2016 05:50
Walks from root directory, all the way to the end. Looks for directories named " ", usually where malware hides.
from os import walk, path
for x in walk('/'):
for dirs in x[1]:
if dirs == ' ':
print(path.join(x[0], dirs))
# test this by running the following bash
# mkdir " "
# run this script