Skip to content

Instantly share code, notes, and snippets.

@abdelouahabb
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abdelouahabb/454cd7b2de78b228707e to your computer and use it in GitHub Desktop.
Save abdelouahabb/454cd7b2de78b228707e to your computer and use it in GitHub Desktop.
# -*- 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