Skip to content

Instantly share code, notes, and snippets.

@popey456963
Created April 5, 2016 13:23
Show Gist options
  • Save popey456963/0d9693ff2ad2641deaac2e3ed607e89e to your computer and use it in GitHub Desktop.
Save popey456963/0d9693ff2ad2641deaac2e3ed607e89e to your computer and use it in GitHub Desktop.
Parse Folder for Specific String
import os
d=os.path.dirname(os.path.realpath(__file__))
dir = [o for o in os.listdir(d) if os.path.isdir(os.path.join(d,o))]
# print(dir)
for i in dir:
carryOn = True
try:
for index,char in enumerate(i):
if "dc-dm____n___D__Js_L__Xs__k-pro_.ha__e.com"[index] != "_":
if "dc-dm____n___D__Js_L__Xs__k-pro_.ha__e.com"[index] != char:
carryOn = False
# print("Failed: " + i)
break
except:
# print("Failed: " + i)
carryOn = False
if carryOn:
print("Nailed: " + i)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment