How to Unmask/Decrypt an XML file?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How to Unmask/Decrypt an XML file?
# 1  
Old 11-06-2013
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 tool to load this file it could able to read and load data into the table. we are on Linux - gcc version 4.1.2 20080704 (Red Hat 4.1.2-54). please help.

Code:
ÿþ<^@?^@x^@m^@l^@ ^@v^@e^@r^@s^@i^@o^@n^@=^@"^@1^@.^@0^@"^@ ^@e^@n^@c^@o^@d^@i^@n^@g^@=^@"^@U^@T^@F^@-^@1^@6^@"^@ ^@?^@>^@<^@P^@r^@o^@v^@i^@d^@e^@r^@ ^@x^@@l^@n^@s^@=^@"^@h^@t^@t^@p^@:^@/^@/^@w^@w^@w^@.^@f^@c^@a^@.^@g^@o^@v^@/^@F^@C^@S^@L^@o^@a^@n^@s^@"^@ ^@x^@m^@l^@n^@s^@:^@x^@s^@i^@=^@"^@h^@t^@t^@p^@:^@/^@/^@w^@w^@w^@.^@w^@3^@.^@o^@r^@g^@/^@2^@0^@0^@1^@/^@X^@M^@L^@S^@c^@h^@e^@m^@a^@-^@i^@n^@s^@t^@a^@n^@c^@e^@"^@ ^@x^@s^@i^@:^@s^@c^@h^@e^@m^@a^@L^@o^@c^@a^@t^@i^@o^@n^@=^@"^@h^@t^@t^@p^@:^@/^@/^@w^@w^@w^@.^@f^@c^@a^@.^@g^@o^@v^@/^@F^@C^@S^@L^@o^@a^@n^@s^@ ^@f^@i^@l^@e^@:^@/^@C^@:^@/^@U^@s^@e^@r^@s^@/^@x^@i^@a^@n^@g^@s^@/^@P^@r^@o^@j^@e^@c^@t^@s^@/^@F^@C^@S^@L^@o^@a^@n^@s^@2^@/^@D^@a^@t^@a^@D^@e^@f^@i^@n^@i^@t^@i^@o^@n^@/^@F^@C^@S^@L^@o^@a^@n^@s^@2^@.^@x^@s^@d^@"^@ ^@P^@R^@


Last edited by vbe; 11-06-2013 at 10:57 AM..
# 2  
Old 11-06-2013
Could you attach the file instead of pasting binary junk as a text blob? I don't recognize the data at all this way.
# 3  
Old 11-06-2013
Quote:
Originally Posted by Corona688
Could you attach the file instead of pasting binary junk as a text blob? I don't recognize the data at all this way.
i am not sure if i can share the complete data file as it compromises the data security.
# 4  
Old 11-06-2013
If you cannot post data, we cannot help you.
# 5  
Old 11-06-2013
Quote:
Originally Posted by Corona688
If you cannot post data, we cannot help you.
Please find attached, it is failing when i try to upload it is an XML file. So i zipped it and uploaded it.

Thank you.

Last edited by Ariean; 11-06-2013 at 03:09 PM..
# 6  
Old 11-06-2013
Quote:
Originally Posted by Corona688
If you cannot post data, we cannot help you.
Also when i vi the file i see the below. I came to know it is no end of line indication. But want to how i can convert this file into a human readable format. please help.

"test.xml" [noeol][converted] 1L, 8482752C
# 7  
Old 11-06-2013
Looks like you have binary zeroes in your file, printed as "^@". Stripping those, your line in post#1 reads
Code:
ÿþ<?xml version="1.0" encoding="UTF-16" ?><Provider x@lns="http://www.fca.gov/FCSLoans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.fca.gov/FCSLoans file:/C:/Users/xiangs/Projects/FCSLoans2/DataDefinition/FCSLoans2.xsd" PR

Try applying tr -d '\000' <file to your file...

EDIT: I just realize that encoding="UTF-16". If you're lucky, you could apply iconv with the UTF16 charset to your file...

Last edited by RudiC; 11-06-2013 at 04:27 PM..
This User Gave Thanks to RudiC For This Post:
 
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. Shell Programming and Scripting

How to Change group and Unmask it to 027 in Linux?

I want to propose a change to the run script environment. This would change the effective group of the wsadmin account to prodview with a umask of 027 before running our services. In linux this can be accomplished by the following #!/bin/ksh # # Original shell # newgrp prodview <<... (1 Reply)
Discussion started by: sindhu puja
1 Replies

3. UNIX for Advanced & Expert Users

How to decrypt a file in UNIX?

I have a file which contains encrypted data. Can anyone tell me how to decrypt the file? (14 Replies)
Discussion started by: saga20
14 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. UNIX for Advanced & Expert Users

Decrypt a GPG file through shell script

Hi, I'm trying to decrypt a gpg file thorugh a shell script. But i' could'nt. My script is , -sh-3.1$ cat test_gpg.sh #!/bin/ksh echo " Hello, iam testing GPG" gpg prabhu.txt.gpg <<EOF prompt prabhu EOF exit 0 The file i'm trying to decrypt is prabhu.txt.gpg and my passphrase is... (1 Reply)
Discussion started by: apsprabhu
1 Replies

8. UNIX for Dummies Questions & Answers

Unmask

Hi All, I'm a newbie to UNIX I'm learning AIX 5l Basics I'm unable to execute UNMASK command as mentioned. Could any one help me. (6 Replies)
Discussion started by: udayakumar
6 Replies

9. 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

10. 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
Login or Register to Ask a Question