Last active
August 29, 2015 14:09
-
-
Save abdelouahabb/454cd7b2de78b228707e to your computer and use it in GitHub Desktop.
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri Nov 14 23:01:24 2014 | |
@author: Abdelouahab | |
""" | |
import hashlib | |
r = '' | |
source = open('c:/bins.txt', 'r') # ton fichier source | |
with open('c:/liste.txt', 'w') as destine: # ton fichier de desination | |
for prefix in source.readlines(): | |
for i in xrange(0, 100): | |
r = str(i).rjust(10, '0') if len(r)<11 else r[:-1] | |
destine.write('({0}, {1})\n'.format(prefix[:-1]+r, hashlib.md5(prefix[:-1]+r).hexdigest())) | |
destine.close() | |
source.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment