Skip to content

Instantly share code, notes, and snippets.

@Skarlett
Last active October 9, 2016 05:50
Show Gist options
  • Save Skarlett/5baae6be3e22afc7ee4706f8cc4adcac to your computer and use it in GitHub Desktop.
Save Skarlett/5baae6be3e22afc7ee4706f8cc4adcac to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment