Example: Drive Serial Utility

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Roboblue
    Forum Member
    • Dec 2003
    • 892

    Example: Drive Serial Utility

    I have recently started a small company to produce software for mobile devices. Some of the products are applications to run on removable writable drives. Specifically, USB pen drives. The applications are preloaded onto USB drives and sold as a system. The user has to accept the license agreement to NOT separate the software from the hardware.
    Well, we all know how that will go.
    To avoid having the programs just copied to another pen drive and passed around, I needed a way to keep the application from running if it was copied to any other location. While searching the APMS forum, I found a thread that had an apz that was made by Worm. The apz included a DLL also developed by Worm. After a learning curve, I finally got it right and now have a very secure way to protect my system.
    The program checks for the recorded serial number of the drive. If it doesn't match the encrypted sn file, it exits. After the splash screen, of course. The sn file does not really need to be encrypted, but I encrypt all the user files, so why not? I think the only way for it to be hacked is to get into the exe, and if the sn file IS encrypted, that won't work unless they can decrypt the sn file, too.
    What I do is, check the drive info and get the serial. Then I validate that the serial is correct prior to creating the sn file. Then I create the sn file as a txt and an encrypted file. I then store these files under the serial number in a file archive, and enter the info in a database to keep track of it. Even though it is not necessary (serial is all I really need), I can keep track of what customer has what serial numbered drive.
    The plan is, if the user somehow corrupts the program, I email him a little app that ONLY checks the serial number. He then e mails me the sn that he got from the checker. I check it against the database, and if it's a valid serial, I will put a rebuild of the app, minus the sn file, on ftp for him to download. Then, I email him a little update app that will "load" the sn file into the app AFTER he has re installed it. I have a similar procedure for program updates.
    Being a small company of one, when I have to preload, it is a pain to have to use a drive checker, a validation step, and a file encryption / creator. 100-200 pen drives later and you wish you had some time savers.
    Well, I developed this little utility to help with the chore. You just make sure the drive is connected and Windows knows it's there, and push three buttons to do it all. It has a lot of uses for the APMS developer.
    At this time, all of the files are named the same, and I am very careful to store them under a directory that has the serial as a name. The files are named sn.txt and sn.enc. The sn.txt has the serial readily viewable.
    The only thing I would want, for my purposes, is a way to use an input box to name the final file. So, if anyone could write that in, I would appreciate it. I did leave some room to put an input box as I am going to tackle this myself when I get time.
    I haven't tried yet, but I think it would even work on optical drives. The CD disk doesn't get a serial until it gets it's lead in is written. I think that if you wrote a multi session CD (DVD), put on a Volume label and a small file, that the checker would then see a serial. Create a sn file, put it in your app, then close the multi session when you finish writing the CD.
    I know that some of the coding could be redone so that it is more elegant, but, I had to do this rather quick, so I baby stepped it.
    I hope everyone all can get some use from it. I have gotten so much from all of you.
    Attached Files
  • Intrigued
    Indigo Rose Customer
    • Dec 2003
    • 6138

    #2
    I put an old 128MB (working, confirmed in Win XP) JumpDrive (USB Thumbdrive) in my laptop and Preview(ed, aka. F5'ed) and the serial came back as all zeros (0).

    FYI. This sounds interesting nontheless.

    Here's a screen capture to show what I did, mean.

    SEE: Attachment
    Attached Files
    Last edited by Intrigued; 11-27-2005, 10:18 AM.
    Intrigued

    Comment

    • Roboblue
      Forum Member
      • Dec 2003
      • 892

      #3
      did you format it and give it label?

      Comment

      • Roboblue
        Forum Member
        • Dec 2003
        • 892

        #4
        I can't remember if I have updated that apz so I am uploading it again.
        Attached Files

        Comment

        • Intrigued
          Indigo Rose Customer
          • Dec 2003
          • 6138

          #5
          That did the trick! Now I have it's serial number.

          Thanks for sharing, helping.

          :yes
          Intrigued

          Comment

          • Roboblue
            Forum Member
            • Dec 2003
            • 892

            #6
            Please let me know if it's useful to you, or have any other implementation to the app or idea.
            I have found it to be VERY secure. If the user goofs and accidentaly formats the USB, then a request for a new application can be given. But, it is extremely hard to use the app on any other device. I'm not good enough to ***** it.
            Anyway I hope you can get some good out of it. I have over 300 devices out to customers and haven't had a problem, yet.

            Comment

            • Roboblue
              Forum Member
              • Dec 2003
              • 892

              #7
              Oh, and if you need to see an example of how it's used on the device, I'll put it in a new do nothing application and post it for you. But, I'm sure you can come up with something better.

              Comment

              • Intrigued
                Indigo Rose Customer
                • Dec 2003
                • 6138

                #8
                Originally posted by Roboblue
                Oh, and if you need to see an example of how it's used on the device, I'll put it in a new do nothing application and post it for you. But, I'm sure you can come up with something better.
                Multiple perspectives are welcomed by me.

                Thanks in advance,
                Intrigued

                Comment

                • travis
                  Forum Member
                  • Sep 2005
                  • 10

                  #9
                  I too am developing a suite of applicatiosn that run on a usb drive, for a local company. I am not as advanced as the original poster, and would really appreciate just back tracking a little ot find out how to implement an activation system to stop moving the suite to another usb drive.

                  I am no competition with the poster because my work is local.

                  Comment

                  • Worm
                    Indigo Rose Customer
                    • Jul 2002
                    • 3971

                    #10
                    Robo, that's cool!!!

                    Also its nice to hear how others are using the DLLs I've thrown on the board. Although, now with AMS6 the DLL isn't needed for the serial number. You can use Drive.GetInformation to obtain the serial without the DLL.

                    Comment

                    • sevenn
                      Forum Member
                      • Jun 2006
                      • 17

                      #11
                      Hy everyoane....I hope u can help me

                      when i try to make it i have this error

                      Performing Pre-Build Checks...
                      Checking audio settings...
                      Checking scripts...
                      Checking project settings...
                      Checking object settings...
                      Merging inherited pages...
                      Assigning tab indexes...
                      Collecting Plugins...
                      Error: Plugin "Crypto\Crypto.lmd" is not licensed for re-distribution

                      what is about that??
                      any help
                      tanks

                      Comment

                      • Roboblue
                        Forum Member
                        • Dec 2003
                        • 892

                        #12
                        Prior to AMS 6.0, Crypto was a separate plugin that you had to purchase. In AMS 6.0, it is part of the full version and is just an action.
                        This app was created in AMS 5.0.
                        If you have the full version of AMS 6.0, when you first load this app, just go into the Projects-Plugins and disable the crypto plugin, then do a Tools-Optimize Resources to remove the crypto plugin from the project itself.

                        Or, use this apz instead
                        Attached Files
                        Last edited by Roboblue; 06-13-2006, 12:27 PM.

                        Comment

                        • DKGlobal
                          Forum Member
                          • Jun 2006
                          • 7

                          #13
                          This looks promising, however I would want to use it on a CD/DVD media. Is it possible for this to work on a CD/DVD?

                          Comment

                          • Roboblue
                            Forum Member
                            • Dec 2003
                            • 892

                            #14
                            It cannot be used on a CD. Once the CD is closed by the burning software, it writes a new serial to the CD.
                            If you can find a way to know what that serial is prior to that, it would work.

                            Comment

                            • DKGlobal
                              Forum Member
                              • Jun 2006
                              • 7

                              #15
                              Ok, I would use Thumb drives but for what I am using it for, they would be expensive.

                              Comment

                              Working...
                              X