How to decrypt a file in UNIX?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to decrypt a file in UNIX?
# 1  
Old 08-22-2013
HP How to decrypt a file in UNIX?

I have a file which contains encrypted data. Can anyone tell me how to decrypt the file?
# 2  
Old 08-22-2013
You have not provided sufficient information for anybody to be able to help you. For example, do you know what encryption method was used to encrypt the file? Do you know what type of plaintext is in the file? ASCII, binary or what?
# 3  
Old 08-22-2013
I have no idea about the type of encryption or type of text the file contains. We are extracting the file from sfdc,when we extract,we are getting encrypted data. The file content is-
Code:
Q2xhaW1OdW1iZXIsQ2xhaW1EZWFsVHlwZSxSZWplY3Rpb25SZWFzb24sRGVhbE51bWJlcixTYWxlc09yZGVyTnVtYmVyLEhQU2FsZXNPcmRlck51bWJlcixJbnZvaWNlRGF0ZSxJbnZvaWNlTnVtY
mVyLFNLVSxRdWFudGl0eSxTZXJpYWxOdW1iZXIsQmlsbFRvTmFtZSxFVXNlck5hbWUsQmlsbFRvQWRkcmVzczEsQmlsbFRvQWRkcmVzczIsQmlsbFRvQ2l0eSxCaWxsVG9TdGF0ZSxCaWxsVG9aaX
BDb2RlLFNoaXBUb05hbWUsU2hpcFRvQWRkcmVzczEsU2hpcFRvQWRkcmVzczIsU2hpcFRvQ2l0eSxTaGlwVG9TdGF0ZSxTaGlwVG9aaXBDb2RlLEVuZFVzZXJOYW1lLEVuZFVzZXJBZGRyZXNzMSx
FbmRVc2VyQWRkcmVzczIsRW5kVXNlckNpdHksRW5kVXNlclN0YXRlLEVuZFVzZXJaaXBDb2RlLEJhdGNoTnVtYmVyLENvbXBhbnlMb2NhdGlvbklELERpc3RyaWJ1dG9yTmFtZQ0KIkMxMjQ1MzIi
LCJWb2x1bWUgSFBOIFN3aXRjaGluZyBSb3V0aW5nIEFwcGxpY2F0aW9ucyBBY2Nlc3NvcmllcyBOQk8iLCIiLCJENzIxNzU4IiwiIiwiIiwiOC8xLzIwMTMgMTI6MDA6MDAgQU0iLCI0MDI1NjE0M
TEi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MjQyMiIsIjEwMDI2MjQyIiwiSW5ncmFtIE1pY3JvIC0gMTAwMjYyNDIiLA0KIkMxMjQ1MzEiLCJWb2x1bWUgUFNHIE5vdGVib29rcyBOQk8iLCIiLCJENjQ3ODAxIiwiIiwiIiwiOC8yLzIwMTMgM
TI6MDA6MDAgQU0iLCIzMjE3Mzc4MjEiLCJEOEU2NlVUI0FCQSIsIjExIiwiIiwiTkVUR0FJTiBURUNITk9MT0dJRVMgSU5DIiwiQ0VOVEVSUyBGT1IgWU9VVEggJiBGQU1JTElFUyIsIlBPIEJPWC
AyNTE5NzAiLCIiLCJMSVRUTEUgUk9DSyIsIkFSIiwiNzIyMjUxOTcwIiwiQ0VOVEVSUyBGT1IgWU9VVEggJiBGQU1JTElFUyIsIjY1MDEgVyAxMlRIIFNUIiwiIiwiTElUVExFIFJPQ0siLCJBUiI
sIjcyMjA0MTUxMSIsIkNFTlRFUlMgRk9SIFlPVVRIICYgRkFNSUxJRVMiLCI2NTAxIFcgMTJUSCBTVCIsIiIsIkxJVFRMRSBST0NLIiwiQVIiLCI3MjIwNDE1MTEiLCIyNDIyIiwiMTAwMjYyNDIi
LCJJbmdyYW0gTWljcm8gLSAxMDAyNjI0MiIsDQ==


Moderator's Comments:
Mod Comment Use code tags please, see PM.

Last edited by zaxxon; 08-22-2013 at 08:06 AM..
# 4  
Old 08-22-2013
Usually, for decryption, you need a key, a password or alike. If you don't, chances are low.
# 5  
Old 08-22-2013
Your example does not show encrypted, but encoded data. In this case it is base64. Use commands like

Code:
openssl base64 -d <input >output

The openssl command is a little picky about the line length. You have to reformat the text, so that all but the last line are exactly 64 characters long.
# 6  
Old 08-23-2013
I am not getting any data in the output file,its creating empty output file. Please help.
# 7  
Old 08-23-2013
As I said, openssl is a little picky, every encoded line (except the last one) has to be 64 characters long.

Code:
Q2xhaW1OdW1iZXIsQ2xhaW1EZWFsVHlwZSxSZWplY3Rpb25SZWFzb24sRGVhbE51
bWJlcixTYWxlc09yZGVyTnVtYmVy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0VOVEVSUyBGT1IgWU9VVEggJiBGQU1J
TElFUyIsIjY1MDEgVyAxMlRIIFNUIiwiIiwiTElUVExFIFJPQ0siLCJBUiIsIjcy
MjA0MTUxMSIsIkNFTlRFUlMgRk9SIFlPVVRIICYgRkFNSUxJRVMiLCI2NTAxIFcg
MTJUSCBTVCIsIiIsIkxJVFRMRSBST0NLIiwiQVIiLCI3MjIwNDE1MTEiLCIyNDIy
IiwiMTAwMjYyNDIiLCJJbmdyYW0gTWljcm8gLSAxMDAyNjI0MiIsDQ==

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Encrypt and Decrypt a File with Password

Hello, I have few files on unix which are payroll related and I need them to encrypt with password so others wouldn't see the data. I use ETL tool and would like to know the unix command that does encryption/decryption to use in the ETL. Thank you, Sri (3 Replies)
Discussion started by: eskay
3 Replies

2. Programming

Encrypt and Decrypt file using RIJNDAEL-128

Hi All, Can I use MCRYPT - (RIJNDAEL-128) / CBC mode to encrypt and decrypt a file? I am trying to find some sample C program on internet, which will encrypt and decrypt a file. But was not able to find any thing. Can some help me with the programming. Thanks. (1 Reply)
Discussion started by: Shre
1 Replies

3. UNIX for Dummies Questions & Answers

How to Unmask/Decrypt an XML file?

Hello All, Below is the content of the XML datafile when i do vi the XML file not sure why the content is showing like this, it could be because the data inside the file is masked or something? is there a way i can decrypt or unmask the data in a human readable format? . When i use my Informatica... (20 Replies)
Discussion started by: Ariean
20 Replies

4. UNIX for Dummies Questions & Answers

How to decrypt any file in UNIX?

How to decrypt a file in unix? I dont know the type of decryption nor the type of text data it contains. We extracted the file from sfdc & need to process it in unix. When extracted, we get encrypted data in the file. The file content is- ... (0 Replies)
Discussion started by: saga20
0 Replies

5. Shell Programming and Scripting

Need to decrypt a file in a directory (SHL script)

I need to decrypt a file in a directory, I need to write a shl scrip & cron job How I find the files in the directory: the file is like this: dailypayments_sfs_payment_201011151800.dat -d The decrypt command: gpg -o dailypayments_sfs_payment_201011151800.dat -d 20101115 (the date... (7 Replies)
Discussion started by: rechever
7 Replies

6. Shell Programming and Scripting

decrypt the file

Hello all I am getting a encrypted file (.pgp) and a key which i have to use to decrypt that file. I couldn't understand where to put the key on my unix box so that decryption happens. Please reply. (2 Replies)
Discussion started by: vasuarjula
2 Replies

7. Shell Programming and Scripting

How to encrypt and decrypt a file

How to encrypt and decrypt a file using unix Command? Can any one help me? (2 Replies)
Discussion started by: laknar
2 Replies

8. Solaris

Decrypt Des file - then encrypt

Help.. I need to decrypt a file that was encrypted using DES 56 Bit. I have the encryption key and the block size used but no idea what utility to use.. I then need to encrypt the file using pgp and another key I have.. againt I dont know what utility to use. I am running solaris 9 .... ... (0 Replies)
Discussion started by: frustrated1
0 Replies

9. Programming

decrypt function in unix?

Hai Friends We have a function called char * crypt(const char *ps, const char* key) to encrypt the password in the unix environment.. Do we have any decrypt function to decrypt it? If not then how can we verify the password through program? Thanks in Advance Collins (1 Reply)
Discussion started by: collins
1 Replies

10. Shell Programming and Scripting

How to decrypt a file which is encrypted in UNIX, In Windows NT

Hi, I want to encrypt a file in UNIX(HP-UX) and Transfer to a FTP server. Our FTP server is Windows NT. SO, how can i decrypt the file which is encrypted in UNIX, in Windows NT. Please, help me this is urgent. Siva Gorantla:confused: (3 Replies)
Discussion started by: gorantla
3 Replies
Login or Register to Ask a Question