Python Forum
how can I generate a password in hashlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can I generate a password in hashlib
#13
I have a list like:
Quote:['danial', '5104', 'elham', '9770']

I should write every name and password like below format on output csv file:
Quote:daniel,5104
elham,9770

I have used below code, but I dont know where I should update my list to make a correct output.
the output of my code is like below Wall :
Quote:d,a,n,i,a,l,",",5,1,0,4
e,l,h,a,m,",",9,7,7,0

the code which I have used:
esm=data[::2]
#print(esm)
pas=data[1::2]
#print(pas)
#for i in range(0,len(esm)):
    #dataf=[]
    #print('{},{}'.format(esm[i], pas[i]))
    
    #dataf.append(('{},{}'.format(esm[i], pas[i])))
    
with open('code.csv', 'w', newline='') as output_file_name:
        writer = csv.writer(output_file_name)
        for i in range(0,len(esm)):
            dataf=[]
            #print('{},{}'.format(esm[i], pas[i]))
            dataf.append(('{},{}'.format(esm[i], pas[i])))
            writer.writerows(dataf)
        output_file_name.close()
Reply


Messages In This Thread
writing on csv file problem, python - by go127a - May-14-2019, 12:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] How to crack hash with hashlib Milan 0 1,453 Mar-09-2023, 08:25 PM
Last Post: Milan
  Python3 hashlib ogautier 1 1,586 Mar-28-2022, 04:42 AM
Last Post: snippsat
  Confusion about Hashlib Vysero 2 3,030 Jun-25-2018, 04:05 PM
Last Post: DeaD_EyE
  Using SHA3 (keccak) from Hashlib CryptoFlo 0 7,783 Mar-14-2018, 10:56 AM
Last Post: CryptoFlo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020