Decrypting Captiva 7 XML Files

In a previous post, I talked about Captiva 7 XML files being encrypted (i.e., not human readable) and the Emc.InputAccel.CaptivaUtils.exe tool supplied by EMC Tech Support to compare them.  You knew I couldn’t leave it there….

After some poking and prodding, reading and experimenting, I came up with the VB .Net code below to decrypt Captiva 7 XML (and .config) files.  And for the record, the files are obfuscated, base64 encoded, not encrypted per se.  Regardless, the result is the same:  they are not human readable.  This little program takes the encoded XML file as a command line parameter, and spits out the decoded XML to the console as well as a text file.  Enjoy!

Imports Emc.InputAccel.Core
Imports System.IO

Module viewCCXml

    Sub Main()
        Dim filename As String
        Console.WriteLine("")
        Console.WriteLine("(C) 2014 MSRoth  msroth.wordpress.com")
        Console.WriteLine("*** View Captiva Capture XML and Config files ***")

        ' get file name from cmd line
        Dim args As String() = Environment.GetCommandLineArgs()

        If (args.Length < 2) Then
           Console.WriteLine("")
           Console.WriteLine("Usage:  c:\> viewCCXml <FQN for Captiva Capture XML or config file to view>")
        Else
            filename = args(1)

            If File.Exists(filename) Then

                Dim rawContent As String = File.ReadAllText(filename)

                ' config files have this goofy prefix and suffix
                If (rawContent.StartsWith(">>>>*") And rawContent.EndsWith("*>>>>")) Then
                    rawContent = rawContent.Replace(">>>>*", "")
                    rawContent = rawContent.Replace("*>>>>", "")
                End If

                ' here is the secret decoder call
                Dim decodedContent = SystemHelper.DecodeData(rawContent)

                Console.WriteLine("")
                Console.WriteLine(decodedContent)

                filename = filename + ".txt"
                File.WriteAllText(filename, decodedContent)

                Console.WriteLine("")
                Console.WriteLine("Wrote result to: " + filename)
            Else
                Console.WriteLine("")
                Console.WriteLine("ERROR: file does not exist: " + filename)
            End If
        End If

        Console.WriteLine("")
        Console.WriteLine("*** Done ***")
        Console.WriteLine("")

    End Sub

End Module

Here is the entire VB.Net project if you prefer.

P.S.  This URL performs similar capabilities online.

Advertisements

About Scott
I have been implementing Documentum solutions since 1997. In 2005, I published a book about developing Documentum solutions for the Documentum Desktop Client (ISBN 0595339689). In 2010, I began this blog as a record of interesting and (hopefully) helpful bits of information related to Documentum, and as a creative outlet.

6 Responses to Decrypting Captiva 7 XML Files

  1. Bryan says:

    It is not encrypted. It is obfuscated.

    Why do you want to edit this directly anyways and not go through Captiva Designer?

    What is the use case here?

    Like

    • Scott says:

      You are right, they are obfuscated and base64 encoded. The use case was discussed in the previous post. Basically, I had a configuration management situation where I had two Standard Export profiles with the same name, in different Designer projects, and needed to know if they were the same or different. Thinking that the XML file contained, well, XML, I wanted to compare them. Once I found out that the XML file didn’t contain readable XML it made me a little angry, and thus started this investigation.

      Like

  2. sam says:

    Bryan, have you tried to edit fields or move fields around in designer when you have over 200 fields. Designer slows to a crawl. So here is a use case; it would be much faster to edit the xml files

    Like

  3. This also appears to work to decode the CaptureFlow (*.XPP) processes.

    At least until the Settings element, which appears to contain encoded data prior to the file being encoded,

    Like

    • Dennis Van Aelst says:

      if you decode the settings then you get the same export as when you do paste settings to file in the administrator. Great post and super helpfull

      Like

  4. Pingback: Links to All of My Source Code | dm_misc: Miscellaneous Documentum Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: