Last active
August 29, 2015 14:27
-
-
Save j105rob/70fcb160d96e9b7baea3 to your computer and use it in GitHub Desktop.
for DA
This file contains hidden or 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
z = "{0:0{1}x}" | |
fout = open('muh.rules', 'w') | |
with open('muh.bad.zones.txt','r') as f: | |
parts = f.readline().split('.') | |
rule = ("|%s|%s|%s|%s|%s|%s"%(z.format(len(parts[0]),2),parts[0],z.format(len(parts[1]),2),parts[1],z.format(len(parts[2]),2),parts[2])) | |
fout.write(rule) | |
fout.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment