need help writing a program

Discussion in 'Software' started by red death68, Aug 5, 2012.

  1. red death68

    red death68 Command Sergeant Major

    I want to write a program that can protect my external drive from being accessed without a password.

    I want to make it run when the external drive is plugged into the usb port, and then not allow it to be closed. The program should prompt for a password and if it isn't entered or entered incorrectly will not allow access to the drive.

    Problem is I want the program to run on linux, windows, and mac.

    I know this is alot to ask so here is what i need to know:

    What language to use(I'm not object to learning a new language for this as I know some java and batch scripting language.)

    how would i implement the stop access feature and not allow the program to be closed by any means?

    how would I make this program run when the drive is plugged in?

    all help welcome thank you very much in advance!
     
  2. GermanOne

    GermanOne Guest

    Well, there are cross-platform languages like C++ or Java, but other guys already spent years to develop a good encryption software. Why to reinvent the wheel?
    Check this out:
    TrueCrypt
    You have to encrypt the data because otherwise the files could be accessed with other operating systems...
    Note: Programming languages can be cross-platform -- the compiled binaries aren't since different operating systems work differently. You have to choose one.

    Regards
    GermanOne
     
  3. red death68

    red death68 Command Sergeant Major

    thanks german i figured you would post sorry for lte reply i havnt been to a computer since the 5th....

    I would still like to make the program for the experience as well as the challange so any advice is welcome as for true crypt i checked it out a few years ago but it has been a while so i will check it out again
     
  4. PC-XT

    PC-XT Master Sergeant

    Here are my thoughts, if I were doing this, for what it's worth:

    Definitely encrypt the drive. There is no way to absolutely guarantee your program will run. Even drives with access protections in the hardware can have them circumvented in one way or another if they don't encrypt the information securely. The type and level of encryption would depend on what is best for your situation. Your program(s) would basically just accept a password and use it to decrypt information it reads from the drive, probably putting it into a form your OS can understand at some point. I would probably end up writing different programs for the different OSs, though Java could possibly be used in a limited way to cross platforms if you basically just want to copy files or do other operations in your program, without using the OS to directly access the drive. If you want to use the OS for disk operations, you need code written for that OS to tell it how to understand the drive. If it tries to use the drive, anyway, you get errors or data corruption.
     
  5. GermanOne

    GermanOne Guest

    @PC-XT -- ACK.

    I won't advertize but the reason why I suggest to use TrueCrypt anyway instead of writing your own:
    That also protects you from losing data due to a power interrupt.

    Regards
    aGerman
     
  6. PC-XT

    PC-XT Master Sergeant

    Yes, I think TrueCrypt does a good job, and would use it before I would try to write my own. TrueCrypt is complete and developed. It's a big job to write something similar, and would take a while to achieve the necessary functionality. I would only write my own as a learning experience, but for actual usage, I'd usually go with TrueCrypt, even if my own is functional. A lot of thought and testing has gone into it that would be hard for one person to achieve.

    One more important thought: For things like this, you will need to be careful of data corruption. If there is anything on the drive you want, work with a copy of the drive, not the original.
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds