1. Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Activation Key Storage Utility

Discussion in 'Programming & Webmastering' started by Kreij, Aug 27, 2010.

  1. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    I only suggested multi core because when i hash my utility dvd iso's their 8GB or so in size so it usually locks the program (havent tried yours yet) or can take some minutes.
     
    10 Year Member at TPU More than 25k PPD
  2. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Since the hash algorithms use a stream for input I'm not sure if I can break it into chucks and multi-thread it. I'll look into it.

    I coded a progress indicator and it was epic fail. lol
    It should be done tomorrow since I found my "Write good threaded code hat" and put it on. :D
     
    Solaris17 says thanks.
  3. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    something simple maybe? like a .giof that is displayed when it starts and exited when it stops?

    like so. this is what i ment by orb but i was thinking ps3 i suppose its more of a circle.

    [​IMG]
     
    10 Year Member at TPU More than 25k PPD
  4. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Yeah, I can do that. The problem I had was going brain dead and trying to cross-access things from threads when I know better than to try that. lol
     
  5. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    the simplest methods are often well simple and all that is needed :)
     
    10 Year Member at TPU More than 25k PPD
  6. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    It's a simple thing, I was just trying to cram a little coding in before the end of the day at work.
    Didn't work as planned, and I didn't want to be late for going home. ;)
    I didn't take the code home with me as I really had more interesting in relaxing and drinking beer tonight than thoughtful code development.
    Sometimes you just need to trade APIs for malt and hops.
     
    Solaris17 says thanks.
  7. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Here's version 0.0.2 for you all to beat up on.

    Fixes for the problems Sol found, and a busy indicator when hashing.

    For next version I added a label to display the time it takes to create the Cryptographic hash.
    The hasher does run in a seperate thead than the app, so the system may utilize another core to run it.
    My rig (in specs) did a 4.5GB mpeg in 52 seconds.

    Still pondering import/export.
    What do we need import and export for? Why would you want to do that? It sort of defeats the whole concept of being "secure".
    Input please.

    More ideas also, please.

    Original Key-Z exe and images pulled from OP.
    Updates to OP when it's reasonably stable and has most of the features.

    @Digi : I have not forgotten about your save/load from FTP suggestion. Looking into best approaches.
     

    Attached Files:

    Last edited: May 19, 2011
    Solaris17 says thanks.
  8. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    I'll put 0.0.3 out in a few days. I'm still looking into stuff.
    I would also like input for the import/export.
     
    Last edited: May 28, 2011
  9. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    Import/Export throw an error about not being implemented. Other then that im having a hard time finding things wrong though i can do more testing at a later date. Perhaps make im/ex into simple menu items so when you click on them nothing happens until implemented?

    The reason i think import/export is a good idea is because others like myself want physical copies in an easy place. For example I have all my keys on a notpad doc. But Iv also printed it and keep it in a safe with my other important documents. This way if my HDD fails I lose a box to a basement flood or otherwise dont have access to the original source and or machine failure i Have the paper with the keys on it. Just because exporting isnt safe doesnt mean that the kes still arent secured ya know? sure someone might be able to high jack your program if you leave it open jack your keys and run off but they could do that anyway if your already in it. even with or without import export the ability to write down keys isnt gone.
     
    Last edited: May 21, 2011
    10 Year Member at TPU More than 25k PPD
  10. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Here's version 0.0.3

    Just added the hash time and versioning in the titlebar.

    Still pondering Imp/Exp.
    Don't really see the benefit of an import as if you have a backup of the key-z file you can just use that (which also negates the need for an export).

    Maybe just a print option for a hard copy instead of Imp/Exp?
    Also, an automatic backup of the key-z file to a secondary location if you have one set?
     

    Attached Files:

    Last edited: May 31, 2011
    Solaris17 says thanks.
  11. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    thats a good point id personally be ok with that.
     
    10 Year Member at TPU More than 25k PPD
  12. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Print engine is almost complete. It's a little rough, but I can make it purdy™ after it gets some stability testing on a variety of printers (that means you guys. lol)
    I'll also add the option for a secondary backup when data is saved.

    Any more suggestions?
     
  13. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    ill certainly play with it and give opinions.
     
    10 Year Member at TPU More than 25k PPD
  14. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    I never realized the personal cost of writing a utility. :/
    Not for coding or testing ... for the beer !!

    Next version up in a day or two.
     
    Solaris17 says thanks.
  15. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    for me its ciggz. trying to find a comma can take almost 2 packs!
     
    10 Year Member at TPU More than 25k PPD
  16. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Here's version 0.0.4
    Added a print preview and print option (It's pretty crude at the moment, please test).
    Added "Set Backup Dir" under the options menu item so you can set a secondary save location for the output file.

    A big thanks to Sol for the icon ! :)
     

    Attached Files:

    Solaris17 says thanks.
  17. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    works mint prints fine havent found any bugs other then random UI stuff.

    other then the help menu no complaints seems to be working fine.
     

    Attached Files:

    Kreij says thanks.
    10 Year Member at TPU More than 25k PPD
  18. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    The missalignment is only on the "new row". This shows up even in VS when editing. It's the default DataGridView settings for that class. Must be a MS "feature".

    I think what you are seeing in the other picture is the grabber bar to resize the row header column horizontally. Another "feature"? lol

    Sol, did you try generating a hash for your whole DVD? How long did it take?
    I can't seem to find a good way to accurately mutli-thread that.
     
  19. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    it took 1:23sec for the ultimate ed (8GB) CPU usage never went above 7% and the app didnt make a second process.

    Interestingly enough though. I had some problems running it. I had to click browse and generate a few times before it would do anything. Though it seems to be working now. I di fin an interesting problem though thrugh further testing. hitting cancel irritates it.

    Code:
    See the end of this message for details on invoking 
    just-in-time (JIT) debugging instead of this dialog box.
    
    ************** Exception Text **************
    System.InvalidOperationException: This BackgroundWorker states that it doesn't support cancellation. Modify WorkerSupportsCancellation to state that it does support cancellation.
       at System.ComponentModel.BackgroundWorker.CancelAsync()
       at Key_Z.Form1.cancelHashButton_Click(Object sender, EventArgs e)
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    
    
    ************** Loaded Assemblies **************
    mscorlib
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.225 (RTMGDR.030319-2200)
        CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
    ----------------------------------------
    Key-Z
        Assembly Version: 0.0.4.0
        Win32 Version: 0.0.4.0
        CodeBase: file:///E:/User/Downloads/Key-Z_0_0_4.exe
    ----------------------------------------
    System.Windows.Forms
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    ----------------------------------------
    System.Drawing
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    ----------------------------------------
    System
        Assembly Version: 4.0.0.0
        Win32 Version: 4.0.30319.1 built by: RTMRel
        CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
    ----------------------------------------
    
    ************** JIT Debugging **************
    To enable just-in-time (JIT) debugging, the .config file for this
    application or computer (machine.config) must have the
    jitDebugging value set in the system.windows.forms section.
    The application must also be compiled with debugging
    enabled.
    
    For example:
    
    <configuration>
        <system.windows.forms jitDebugging="true" />
    </configuration>
    
    When JIT debugging is enabled, any unhandled exception
    will be sent to the JIT debugger registered on the computer
    rather than be handled by this dialog box.
    
    
    

    that happened when trying to cancel the op
     
    10 Year Member at TPU More than 25k PPD
  20. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    The hashing runs in another thread (as you can see by the error you got), but doesn't re-launch another process.

    Fixed the cancelling problem. I was going to use thread reporting for the busy wheel and then decided against it, so I shut off report progress and must have turned off "supports cancelling" accidentally too. DOH !!
     
    Solaris17 says thanks.
  21. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    well if its all fixed up then knock up a help and about and this should be golden. iv beat the shit out of it and cant find anything else
     
    10 Year Member at TPU More than 25k PPD
  22. CrackerJack

    CrackerJack

    Joined:
    Dec 13, 2007
    Messages:
    2,754 (0.84/day)
    Thanks Received:
    468
    Location:
    East TN
    Neat Tool Kreij! :cool:

    @Sol's Problem, That error shows a backgroundworker error.. due to cancellation not being enabled.

    edit: lol sorry slow post
     
    Solaris17 and Kreij say thanks.
  23. Kreij

    Kreij Senior Monkey Moderator Staff Member

    Joined:
    Feb 6, 2007
    Messages:
    13,881 (3.86/day)
    Thanks Received:
    5,632
    Location:
    Cheeseland (Wisconsin, USA)
    Any thought on how to do a help file? Windows Help suck harder than a hooker on steroids.
     
  24. Solaris17

    Solaris17 Creator Solaris Utility DVD

    Joined:
    Aug 16, 2005
    Messages:
    18,590 (4.50/day)
    Thanks Received:
    5,072
    Location:
    Florida
    hmmmm maybe integrate your own HTML Esq type of page?
     
    10 Year Member at TPU More than 25k PPD
  25. CrackerJack

    CrackerJack

    Joined:
    Dec 13, 2007
    Messages:
    2,754 (0.84/day)
    Thanks Received:
    468
    Location:
    East TN
    good idea... or use PDF.
     

Currently Active Users Viewing This Thread: 1 (0 members and 1 guest)