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)
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)
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)
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)
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)
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
LEARN ABOUT MOJAVE
base64
base64(n) Text encoding & decoding binary data base64(n)
__________________________________________________________________________________________________________________________________________________NAME
base64 - base64-encode/decode binary data
SYNOPSIS
package require Tcl 8
package require base64 ?2.4.2?
::base64::encode ?-maxlen maxlen? ?-wrapchar wrapchar? string
::base64::decode string
_________________________________________________________________DESCRIPTION
This package provides procedures to encode binary data into base64 and back.
::base64::encode ?-maxlen maxlen? ?-wrapchar wrapchar? string
Base64 encodes the given binary string and returns the encoded result. Inserts the character wrapchar every maxlen characters of
output. wrapchar defaults to newline. maxlen defaults to 76.
Note well: If your string is not simple ascii you should fix the string encoding before doing base64 encoding. See the examples.
The command will throw an error for negative values of maxlen, or if maxlen is not an integer number.
::base64::decode string
Base64 decodes the given string and returns the binary data. The decoder ignores whitespace in the string.
EXAMPLES
% base64::encode "Hello, world"
SGVsbG8sIHdvcmxk
% base64::encode [string repeat xyz 20]
eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6
eHl6eHl6eHl6
% base64::encode -wrapchar "" [string repeat xyz 20]
eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6eHl6
# NOTE: base64 encodes BINARY strings.
% set chemical [encoding convertto utf-8 "Cu2088Hu2081u2080Nu2084Ou2082"]
% set encoded [base64::encode $chemical]
Q+KCiEjigoHigoBO4oKET+KCgg==
% set caffeine [encoding convertfrom utf-8 [base64::decode $encoded]]
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category base64
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
base64, encoding
CATEGORY
Text processing
COPYRIGHT
Copyright (c) 2000, Eric Melski
Copyright (c) 2001, Miguel Sofer
base64 2.4.2 base64(n)