How to reverse the b64 format(encoded b64(b64(md5($pass)))) into md5 hash format?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to reverse the b64 format(encoded b64(b64(md5($pass)))) into md5 hash format?
# 1  
Old 11-03-2016
How to reverse the b64 format(encoded b64(b64(md5($pass)))) into md5 hash format?

I have about 1500 rows (encoded b64(b64(md5($pass))) algorythm) in a file.

I would like reverse the b64 into md5 hash format.
How could I do that from command line? So I need only the correct md5 hash formats.

These row format:
Code:
4G5qc2WQzGES6QkWAUgl5w
P9tKxonBOg3ymr8vOBLnDA
Lk7X7MxDgnJB8Q2Ara4wgQ
FLTI8uRiXQ8WsmrsY5I2Kg
9x1MIvDOyQnfusEShe4Mow
FUoZYzDwD6kEWxWMIsvxbg
5Z9LKc013FROw4qKh+32cQ


Last edited by Don Cragun; 11-03-2016 at 01:18 AM.. Reason: Fix CODE tags.
# 2  
Old 11-03-2016
/tmp/base64.txt if you base64 values file



Code:
#!/bin/bash

input_file="/tmp/base64.txt"
ouput_file="/tmp/out.txt"


while read base_value
do
    echo "${base_value}" | base64 --decode >> ${ouput_file}
done < "${input_file}"

Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Apply md5 hash to a field in csv file

I have a .csv file and I want to md5 hash the second column for each row in the file. File is something like data1,foobar1,123,345 data2,foobar2,456,9393 data3,foobar3,1002,10109 Output would be like data1,6c81243028f8e455fa617dd5f0232ce1,123,345... (3 Replies)
Discussion started by: jjwags
3 Replies

2. Shell Programming and Scripting

Create md5 sums and archive the resulting md5 files

Hello everyone, I am looking to basically creating md5sum files for all iso files in a directory and archive the resulting md5 files into a single archive in that very same directory. I worked out a clumsy solution such as: #find files for which md5sum are to be created and store the... (1 Reply)
Discussion started by: SurfTranquille
1 Replies

3. UNIX for Dummies Questions & Answers

How to convert MD5 hash into shadow format?

I am trying to use John the Ripper but it doesn't take regular MD5 hashes, only shadow MD5 hashes. For example this hash: 900150983cd24fb0d6963f7d28e17f72 (which, decrypted, is 'abc') within a text file, John the Ripper does not detect because it is not in shadow format. How can I convert this MD5... (2 Replies)
Discussion started by: guitarscn
2 Replies

4. Shell Programming and Scripting

MD5 hash filename

I am a newbie to shell programming. Can someone help me with the following ? Shell script that accomplishes the following - # Step 1 List all files in the directory # Step 2 Loop through each filename say a.htm and MD5 hash the filename to say b.htm # Step 3 copy a.htm to b.htm # Step 4... (1 Reply)
Discussion started by: bebar
1 Replies

5. Programming

MD5 hash calculation

hi i want to generate MD5 hash of string in unix (hp) i have the algorithm which takes file as argument and returns hash of file but when i tried to generate hash of "a" result was "60b725f10c9c85c70d97880dfe8191b3" hash but actually it should have been "0cc175b9c0f1b6a831c399e269772661" now i... (4 Replies)
Discussion started by: zedex
4 Replies

6. Shell Programming and Scripting

How to create md5 Hash variable?

I have a script that runs the grub-md5-crypt command based on whether the pass_value variable is a non-zero string. The md5 hash is being created in the /opt/hostconfigs/$HOST file, but I can't echo $md5_value. It is blank. Is there a way to create and echo a md5 hash variable? if then... (1 Reply)
Discussion started by: cstovall
1 Replies
Login or Register to Ask a Question