May-06-2019, 01:32 PM
Hi
i have a csv file, it contain name and password. I am going to readout and write the password in a csv file.
in the other words reach the password, I know the pass can be varied between 1000 to 9999.
sample input csv file:
i have a csv file, it contain name and password. I am going to readout and write the password in a csv file.
import csv import itertools from collections import OrderedDict import hashlib with open ('code.csv', 'r') as input_file_name: reader=csv.reader(input_file_name) key=[] val1=[] for row in reader: name = row[0] val=[str(num) for num in row[1:]] key.append(name) val1.append(val) value = list(itertools.chain.from_iterable(val1)) #making a simple list from list of list in value value=[str(i) for i in value] print(key) dictionary = dict(zip(key, value)) print(dictionary)my problem is, how can I generate password from the value in dictionary.
in the other words reach the password, I know the pass can be varied between 1000 to 9999.
sample input csv file:
Quote:peter,99b057c8e3461b97f8d6c461338cf664bc84706b9cc2812daaebf210ea1b9974and the correct output:
adam,85432a9890aa5071733459b423ab2aff9f085f56ddfdb26c8fae0c2a04dce84c
Quote:peter,5104
adam,9770