I have a file that contains user id and corresponding password.
Lets say password is "help". The below command will create a hex value for string "help".
perl -e 'print unpack "H*","help"'
So now password is in encoded format.
Then I decoded it in the script where am fetching the password.
perl -e 'print pack "H*","77636462614e3031"'
Now you help is required. In the second step when I am passing the hardcoded value, then it is able to decode it.
But when I am using a variable it is not working.
ex: var="77636462614e3031"
perl -e 'print pack "H*",$var'
This doesn't work. Let me know the syntax so that it will return correct value when I use it in a variable?
I am trying to execute this perl commands in LINUX OS.
Please help.