Click here to Skip to main content
Click here to Skip to main content

TCExplorer - Portable Software to Import, Export, Delete, Rename, View, Edit and Execute Files in TrueCrypt Containers

By , 9 Oct 2007
 
Screenshot - TCExplorer.gif

Introduction

TrueCrypt is a free open-source disk encryption software. It is able to create a virtual encrypted disk within a file and mounts it as a real disk. The encryption is automatic, real-time (on-the-fly) and transparent. However, a major disadvantage of TrueCrypt and all other on-the-fly encryption software is the requirement of administrative privileges on the computers where they are used. Thus they will not be usable in places such as public libraries and internet cafes, where the computers are typically locked down and the users are given only limited privileges.

The purpose of this software is to overcome this limitation of TrueCrypt by providing an interface, similar to compression and decompression software, where directories and files can be imported and exported easily from TrueCrypt containers. There are some debates on the merits of such software. Those in favor argue that it will make TrueCrypt truly portable. Those against it argue that it is a security breach to extract files stored in TrueCrypt containers to computers where you do not have control. I do not wish to partake in such debates. This software arises because of my own needs. I wish to transport my documents (which are not very confidential) in my thumbdrive but I do not wish others to be able to look at my documents if I accidentally lose my thumbdrive. Thus I need to encrypt my files and a good candidate to encrypt them is TrueCrypt. However, as I may need to extract the files onto other computers (which most likely will not be logged in as administrator), I will need a software which allows me to extract TrueCrypt files without requiring administrative privileges. A search on the net shows that it is possible to create such software and a proof-of-concept commandline software, OTFExplorer has been created by Josh Harris. However, the author did not wish to continue the project to build a GUI interface. This software picks up where Josh Harris left off.

Main Features

  1. Import directories/files into TrueCrypt containers
  2. Export directories/files from TrueCrypt containers
  3. Delete directories/files stored in TrueCrypt containers
  4. Rename directories/files stored in TrueCrypt containers
  5. View text/HTML/graphic files stored in TrueCrypt containers
  6. Edit files stored in TrueCrypt containers
  7. Execute files stored in TrueCrypt containers
  8. Show total, used and free space in TrueCrypt containers
  9. Color-code files according to their extensions
  10. Rapidly access list of favorite TrueCrypt containers

Main Limitations

The following limitations primarily arise because of the limitation of OTFExplorer.

  1. Cannot handle files with Unicode names in TrueCrypt containers (though able to open TrueCrypt containers with Unicode names)
  2. Can only open TrueCrypt containers with FAT partitions
  3. Cannot handle hidden volumes (may not be a limitation of OTFExplorer)

Usage

Opening a TrueCrypt container: Either use File->Open or just drag and drop a TrueCrypt container from Windows Explorer to TCExplorer.

Importing directories/files into TrueCrypt container: Drag and drop directories/files from Windows Explorer to TCExplorer.

Exporting directories/files from TrueCrypt container: Drag and drop directories/files from TCExplorer to Windows Explorer. The directories/files will first be extracted to a predefined temporary directory, and then moved to the destination directory.

Deleting directories/files from TrueCrypt container Select directories/files in TCExplorer and press Del key.

Renaming directories/files from TrueCrypt container: Select a directory or file in TCExplorer and click on it again to activate the change name option.

Opening a TrueCrypt container from commandline: The command "TCExplorer.exe confidential.tc" will launch TCExplorer and load the TrueCrypt container "confidential.tc". TCExplorer will then prompt the user for password before continuing. This feature may be useful if you want to always automatically load a particular TrueCrypt container when you plug in your thumbdrive.

Opening a file in TrueCrypt container for editing or execution: Double click on the files to open. The files will first be extracted to a predefined temporary directory and then either opened using the associated program or if it is an executable file, it will be run. If the opened files were modified, the user will be asked whether he/she wishes to re-import the modified file into the TrueCrypt container.

Viewing a file using the internal viewerRight-click on a file and choose "View with Internal Viewer". The file will be extracted to memory and shown in an internal viewer. This feature is useful if you do not wish to write any files to disk. However, the file may still remain in memory after the internal viewer is closed.

Options

  1. Stay on top: Make TCExplorer stay on top of other windows
  2. View file size: View size of files stored in TrueCrypt containers
  3. Save window position: Save last window position and size on closing and revert on next launch

Points of Interest

TCExplorer is built using wxWidgets. The source codes provide a good learning resource for drag and drop operations. Of particular interest is the development of customized wxIDropSource and wxDropSource classes (TCIDropSource and TCDropSource).

STDMETHODIMP TCIDropSource::QueryContinueDrag(BOOL fEscapePressed,
                                              DWORD grfKeyState)
{
  if ( fEscapePressed )
    return DRAGDROP_S_CANCEL;

  // initialize ourselves with the drag begin button
  if ( m_grfInitKeyState == 0 ) {
    m_grfInitKeyState = grfKeyState & (MK_LBUTTON | MK_RBUTTON | MK_MBUTTON);
  }

  if ( !(grfKeyState & m_grfInitKeyState) ) {
    // button which started d&d released, go!

    m_pDropSource->tcList_->Export(); 	// Export directories and files 
					// to temporary system directory.

    return DRAGDROP_S_DROP;
  }

  return S_OK;
}    

The above shows the modifications to the wxIDropSource class. By adding codes before the return DRAGDROP_S_DROP; statement, TCExplorer is able to delay the extraction of files to the temporary directory until the user releases the mouse button. However, I do not know how to check whether the window where the user drops the files is able to receive the files or not. So even if the window is not able to receive the files, the files will still be extracted to the temporary directory.

TCDropSource::TCDropSource(TCList *tcl,
                           const wxCursor &cursorCopy,
                           const wxCursor &cursorMove,
                           const wxCursor &cursorStop)
            : wxDropSourceBase(cursorCopy, cursorMove, cursorStop), tcList_(tcl)
{
    Init();
}

TCDropSource::TCDropSource(wxDataObject& data,
                           TCList *tcl,
                           const wxCursor &cursorCopy,
                           const wxCursor &cursorMove,
                           const wxCursor &cursorStop)
            : wxDropSourceBase(cursorCopy, cursorMove, cursorStop), tcList_(tcl)
{
    Init();
    SetData(data);
}   

The above shows the main modification to the wxDropSource class. The two constructors are changed so that they will receive a pointer to the class which handles the export function.

A side effect of using the wxIDropSource and wxDropSource classes is that TCExplorer can only be compiled for the Windows platform, even though it is using wxWidgets.

In addition to the drag and drop operations, the source codes also provide numerous examples of directory operations in wxWidgets. The source codes are fairly well commented and the reader is invited to look at them to understand more of the inner workings of TCExplorer.

Compiling the Source Code

A Code::Blocks configuration file is provided. You will need to download and install wxWidgets before you can compile TCExplorer. For more details on the required location of the wxWidgets libraries, please refer to the Code::Blocks configuration file.

Known Bugs

  • Bug 1: The list control window in TCExplorer may not refresh correctly after renaming a directory/file. Workaround: Press F5 to refresh the list control. (If there are any wxWidgets experts who know how to solve this, please contact me.)
  • Bug 2: TCExplorer may crash when importing/exporting/deleting/renaming a file with apostrophe. I was able to duplicate the crash a few times before it disappears again.

License

TCExplorer is released as public domain. This means that the source code is provided without any restrictions. The licence for OTFExplorer is included in the source code package.

Future Plans

None. TCExplorer has currently met all my personal needs so I will not be adding any new features in the near future (though from my updates since version 1.1, you can see that I do add new features if I find that they are easy to add). Since the source code is public domain, you are free to modify it to suit your needs. However, I would appreciate it if you could either send me any important modifications so that I can incorporate it into TCExplorer, or release the modifications yourself so that everyone can benefit from it.

History

  • 29 September 2007: Version 1.6 released
    • Bugfix: Corrected bug that occurs during drag and drop TrueCrypt container file after previous opening error.
    • Enhancement: Added "Delete temp dir now" under File menu to delete the temporary directory immediately.
    • Enhancement: Added "Restore Defaults" button to Temporary Directory options.
    • Enhancement: Allow user to specify colours for displaying files based on their extensions.
    • Enhancement: Allow user to view contents of text files without extracting the files from the TrueCrypt container.
  • 17 September 2007: Version 1.5.1 released
    • Bugfix: Resolve "DDE execute request failed" error.
  • 4 September 2007: Version 1.5 released.
    • Bugfix: Corrected over-aggressive check for full TrueCrypt container on import.
    • Enhancement: Added message dialog for confirmation of overwriting existing files in container during import.
    • Enhancement: Allow user to define any directory as the temporary directory.
    • Enhancement: Added option to securely delete directories/files in temporary directory using Eraser commandline (eraserd.exe).
    • Enhancement: Added Favorites menu to allow user to maintain a list of TrueCrypt containers for easy access.
    • Enhancement: Allow TCExplorer to open a file in TrueCrypt container using the associated program and re-import the file if changes are done.
  • 11 June 2007: Version 1.4 released.
    • Enhancement: TCExplorer now has an icon!
    • Enhancement: Allow TCExplorer to open a file from the commandline. e.g. "TCExplorer.exe confidential.tc".
    • Enhancement: Added option to allow TCExplorer to save last window position and size on closing and revert on next launch.
    • Enhancement: Added option to allow TCExplorer to not delete directories/files in temporary directory after exporting is finished so that users can use their own file shredder software to securely delete the temporary directories/files.
    • Enhancement: Added option to securely delete directories/files in temporary directory after exporting is finished by overwriting the files with null characters and then renaming them to ~ before deleting them. Directories are also renamed to ~ before deletion.
  • 8 June 2007: Version 1.3 released
    • Bugfix: Prevent directories/files in TrueCrypt container from dragging and dropping onto the same TrueCrypt container. The previous bugfix didn't really solve the problem.
    • Bugfix: Remove error message when no renaming is done.
    • Enhancement: Added option to view size of files stored in TrueCrypt containers.
  • 7 June 2007: Version 1.2 released. Thanks to dcrochet from TrueCrypt forum for pointing out the following bugs.
    • Bugfix: Prevent files from being imported if TrueCrypt container becomes full.
    • Bugfix: Prevent directories/files in TrueCrypt container from dragging and dropping onto the same TrueCrypt container.
    • Enhancement: TCExplorer is now compressed with UPX, thanks to BuddhaChu from PortableApps for the suggestion.
  • 3 June 2007: Version 1.1 released
    • Renamed software to TCExplorer because TrueCrypt is a registered trademark and cannot be used
  • 2 June 2007: Version 1.0 released

Disclaimer

The author does not guarantee that the software will work perfectly. Please use this software only on data that you can afford to lose. By downloading and using this software, you have implicitly agreed to be part of the guinea pig experiment to test the software for any bugs.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Yap Chun Wei
Researcher
Singapore Singapore
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
Generalhelp file to compile the sourcemembersanjayasaukar2 Dec '08 - 23:11 
Hello friends, please guide me to compile the source. the tools required to compile the source too.
 
when i compiled using code::blocks, it gave me an error for TCDropSource.cpp file:
 
Error is
 
TCIDropSource::TCIDropSource(TCDropSourcenmake -f makefile.cv TARGET_CPU=AMD64pDropSource)
 
please help to debug the source.
Generalcannot find '/'. make sure the path is correctmemberspdwslc25 Jun '08 - 14:47 
Hi,
 
Thanks for this great tool. However, I ecounter a problem. When I drag the volume to TCExplorer, it pops out a message "cannot find '/'. Make sure the path is correct.". I am using the demo version. Is it due to that?
 
Thanks,
Sunny
AnswerRe: cannot find '/'. make sure the path is correctmemberRaidiator31 Jul '08 - 3:34 
I had the same problem. Use version 1.51 with Truecrypt version v4.3a.
Generalerror at first use: Not an OTF volume or incorrect passwordmemberscottb8 Feb '08 - 12:24 
I get this error when trying to open a TrueCrypt file, the pw is definitely correct (it works mounting thru truecrypt).
 
This app seems like a great idea, I'd really like to get it to work! I'm using the most current version or truecrypt (just downloaded yesterday).
thx
GeneralRe: error at first use: Not an OTF volume or incorrect passwordmemberYap Chun Wei9 Feb '08 - 2:39 
TCExplorer will not work with the latest version of TrueCrypt (i.e. version 5.0). This is because TrueCrypt 5.0 uses XTS mode for encryption whereas TCExplorer can only open containers that are encrypted using the older LRW mode.
GeneralRe: error at first use: Not an OTF volume or incorrect passwordmemberscottb11 Feb '08 - 9:42 
thx, is there any plan for TCExplorer to support TrueCrypt ver 5 in the future, if so is there any timeline?
GeneralRe: error at first use: Not an OTF volume or incorrect passwordmemberYap Chun Wei11 Feb '08 - 13:36 
No plans to support ver 5 at the current moment. This is because TCExplorer is dependent on OTFExplorer to open, read, and write to TrueCrypt containers. So if OTFExplorer is not updated, TCExplorer will not be able to support ver 5.
QuestionKeyfile support?sussLocalfreak28 Dec '07 - 11:26 
I love this piece of software, it's been a godsend in accessing my private files on the run.
Thank you for releasing it =)
 
One feature request I have though is support for keyfiles.
A few of my crypts are using them for simplicity on my part but I can't seem to access them at all through TCexplorer.
GeneralRe: Keyfile support?memberYap Chun Wei16 Jan '08 - 14:12 
It is not possible for me to add support for keyfiles because the actual package doing the assessing of the TrueCrypt files, OTFExplorer, is not programmed by me. TCExplorer is basically just a GUI wrapper for OTFExplorer.
GeneralProblem in opening in vs 2005memberbhaskar jatav18 Dec '07 - 22:20 
I am opening ur souce code in Visual studio 2005, but around some 10 error are coming like.
 
1) wx/wxprec.h, wx/string.h,wx/dnd.h .these header file is opening.
 
Pls help wht to do.
 

Thanks in advance
 
Bhaskar Jatav
QuestionFeature requestsussDom7 Dec '07 - 2:05 
Would it be possible to add a timer to TCExplorer that would lock or close the TrueCrypt file after a set period (I guess close/lock on screensaver would be another option/addition but I know you mention that you don't want to make big changes)? The application works brilliantly but it does leave the file open/unlocked unless you explicitly close the file which I quite often forget to do!
 
Thanks for an excellent utility
 
Dom
GeneralRe: Feature requestmemberYap Chun Wei16 Jan '08 - 14:10 
Unfortunately, I don't have the time to implement this feature now.
GeneralI can't compile the sourcecodememberTrabi14 Nov '07 - 22:39 
Hello,
 
i tried to compile your sourcecode of TCExplorer 1.6 with
Code::Blocks 1.0 RC2 and wxWidget 2.8.6.
 
But i get this errormessage:
 
e:\CodeBlocks\lib/libmingw32.a(main.o):main.cFrown | :( text+0x106): undefined reference to `WinMain@16'
 
Can you explain me, what i do wrong?
 
Thanks.
 
Chris from Germany.
GeneralRe: I can't compile the sourcecodememberYap Chun Wei16 Jan '08 - 14:10 
You will need the latest nightly build for Code:Blocks.
QuestionError: Cannot find '/'. Make sure the path is correct.memberlz1nwm11 Nov '07 - 13:37 
What means error: "Cannot find '/'. Make sure the path is correct." ?
There is nothing that i've changed but I cant open volumes for some time. Just this message.

GeneralTrojan-Downloader.Win32.Zlob.dmx (virus)memberlz1nwm23 Oct '07 - 13:31 
Thanks for the great program.
 
Since last week my anti-virus program recognize TCExplorer.exe as virus. I've read that that Zone Alarm also recognizes this file as virus.
 
Could you please fix the problem?
 
Thanks,
 
svilen
 

 
Scanning Report
24 October 2007 02:19:36 - 02:19:38
Computer name: NEMO
Scanning type: Scan target
Target: C:\bin\TCExplorer\TCExplorer.exe
 

--------------------------------------------------------------------------------
 
Result: 1 malware found
Trojan-Downloader.Win32.Zlob.dmx (virus)
C:\bin\TCExplorer\TCExplorer.exe
 

 

--------------------------------------------------------------------------------
 
Statistics
Scanned:
Files: 1
Not scanned: 0
Result:
Viruses: 1
Spyware: 0
Suspicious items: 0
Riskware: 0
Actions:
Disinfected: 0
Renamed: 0
Deleted: 0
Quarantined: 0
Failed: 0
Boot Sectors:
Scanned: 0
Infected: 0
Suspicious items: 0
Disinfected: 0
 

--------------------------------------------------------------------------------
 
Options
Definitions version:
Viruses: 2007-10-23_08
Spyware: 2007-10-23_07
Scanning Engines:
F-Secure AVP: 7.00.171, 2007-10-23
F-Secure Libra: 2.04.01, 2007-10-21
F-Secure Orion: 1.02.37, 2007-10-23
F-Secure Draco: 1.00.35, 2007-10-15
Scanning options:
Scan defined files: COM EXE SYS OV? BIN SCR DLL SHS HTM HTML HTT VBS JS INF VXD DO? XL? RTF CPL WIZ HTA PP? PWZ P?T MSO PIF . ACM ASP AX CNV CSC DRV INI MDB MPD MPP MPT OBD OBT OCX PCI TLB TSP WBK WBT WPC WSH VWP WML BOO HLP TD0 TT6 MSG ASD JSE VBE WSC CHM EML PRC SHB LNK WSF {* PDF ZL? XML ANI AVB BAT CEO CMD LSP MAP MHT MIF PHP POT WMF NWS TAR TGZ ZIP JAR ARJ LZH TAR TGZ GZ CAB RAR BZ2 HQX
Scan inside archives
Excluded:
Spyware: RemoteAdmin.Win32.WinVNC
Actions:
Viruses: Ask after scan
Spyware: Ask after scan
 
--------------------------------------------------------------------------------
 
Copyright © 1998-2007 Product support | Send virus sample to F-Secure
F-Secure assumes no responsibility for material created or published by third parties that F-Secure World Wide Web pages have a link to. Unless you have clearly stated otherwise, by submitting material to any of our servers, for example by E-mail or via our F-Secure's CGI E-mail, you agree that the material you make available may be published in the F-Secure World Wide Pages or hard-copy publications. You will reach F-Secure public web site by clicking on underlined links. While doing this, your access will be logged to our private access statistics with your domain name. This information will not be given to any third party. You agree not to take action against us in relation to material that you submit. Unless you have clearly stated otherwise, by submitting material you warrant that F-Secure may incorporate any concepts described in it in the F-Secure products/publications without liability.
GeneralRe: Trojan-Downloader.Win32.Zlob.dmx (virus)memberYap Chun Wei23 Oct '07 - 14:19 
I think you are mistaken. You should ask your anti-virus software and Zone Alarm to fix the problem and not me. You can take a look at the source code and decide for yourself whether there is any virus or not in TCExplorer.
GeneralRe: Trojan-Downloader.Win32.Zlob.dmx (virus)memberlz1nwm11 Nov '07 - 13:34 
Yep, you were right. F-Secure fixed the issue in a week.
GeneralIssuesmemberMc_Bain18 Sep '07 - 23:02 
Hi,
 
first of all... thanks for this neat tool!
 
But i guess there are 2 small issues you might want to take a look at.
 
Try this:
- Drop a TC-Container on TCExplorer and enter a WRONG password
- Press OK on the Infodialog ("Not an OTF ...")
- Drop the TC-Container on TCExplorer --> TCExplorer tries to import the TC-Container instead of opening it (as no TC-Container is loaded yet).

A really tiny "issue":
You can enter any value in the "Address-Bar" and after pressing "Enter" TCExplorer shows this nonExistant folder in the Address-Bar and shows an empty list of files.
(BTW: The textfield for the Address-Bar is a bit longer than the file-list.)
 
Cheers
McBain
GeneralRe: IssuesmemberYap Chun Wei20 Sep '07 - 3:08 
1. Thanks for identifying this bug. Will fix it in the next revision (v1.5.2 or above)
 
2. Will see if there is a way to improve this. May not be easy though. BTW, your eyes are very sharp. The length of the textfield for the address-bar is purposely made to be longer than the file-list. In fact it is not just a bit longer but much longer. The purpose is to ensure that you can always see the whole length of the address-bar, regardless of the size of the main window. Had to do this hack because I haven't found a way to recalculate and resize the address-bar when the size of the main window changes. :p
GeneralRe: IssuesmemberYap Chun Wei28 Sep '07 - 18:39 
The first bug has been fixed in v1.6
GeneralRe: IssuesmemberMc_Bain1 Oct '07 - 21:07 
Thanks!
Generalalternativememberdonald00714 Sep '07 - 0:09 
Interesting work.
 
I like TrueCrypt very much, but you should know there is a commercial app named Dekart Private Disk which provide the mobility feature you request (there is no need to install any software on target computer).
 
http://www.private-disk.net/[^]
 
http://www.dekart.com/products/encryption/private_disk/[^]

GeneralRe: alternativememberYap Chun Wei17 Sep '07 - 4:53 
Although Dekart Private Disk is often cited as not needing to install any software on the target computer, it does suffer from the same limitation as TrueCrypt, which is the requirement of administrative privileges on the target computer or it must be preinstalled on the target computer.
 
Just look at the statement given in your second link: "Administrative privileges are not required if the program was previously launched by an administrator." How many target computers do you think will have Dekart Private Disk previously launched by an administrator? Poke tongue | ;-P
QuestionGreat tool. Feature request + NTFS support?memberAlexander Shilonosov24 Aug '07 - 3:19 
Hi,
 
I am very happy that somebody was made it, even with 'write' possibility !
 
Here is a small feature request:
- Double click - extracts a file (somewhere on the USB drive itself but not on the guest PC temp folder)
and opens an associated application. After the files being closed import file back to TC.
- An internal text-file quick viewer - to be able to very-very safely veiw password files that is plain text.
It would be great.Smile | :)
 
I am using the free tool Rohos Mini drive[^]. It has the same Browser utility. In general it works better because the tool is integrated with the Browser and where it's possible the virtual volume is mounted otherwise the Browser opens. I dont know is it possible with TrueCrypt?
 
Also What about NTFS support?

 
--
Alexander Shilonosov

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 9 Oct 2007
Article Copyright 2007 by Yap Chun Wei
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid