Last active
October 9, 2016 05:50
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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