Results 1 to 40 of 68

Thread: C# - PC fingerprint (for program piracy protection)

Hybrid View

  1. #1
    New Member
    Join Date
    Mar 2005
    Posts
    3

    Re: C# - PC fingerprint (for program piracy protection)

    Quote Originally Posted by BrianHawley
    Cool!

    Thx, Brian.

    But my question is still open

    What happens if you multiply a char value within C#?

    Rgds
    SolutionDeveloper

  2. #2

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Re: C# - PC fingerprint (for program piracy protection)

    The char is implicitly converted to its ascii value before being multiplied.

    so...

    Code:
       {
          int x = 2;
          int y = 0;
          string s = "abc";
          char c = s[1];
    
          y = c * x;
    
    
        }
    ...works okay.

    But there are people who will tell you is bad practice to rely on implicit conversion.

    Hope this helps.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  3. #3
    New Member
    Join Date
    Mar 2005
    Posts
    3

    Re: C# - PC fingerprint (for program piracy protection)

    Yes, it does. It's excatly what my routine does as well...

    Rgds
    SolutionDeveloper

  4. #4

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Re: C# - PC fingerprint (for program piracy protection)

    Maybe the behaviour is a little less obvious once we get into Unicode strings, so perhaps better to convert explicitly as the purists recommend. I generally avoid implicit conversion, but that's more to do with readability.
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  5. #5
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: C# - PC fingerprint (for program piracy protection)

    Brian, where did you find these strings:

    "Win32_BIOS", "Win32_DiskDrive", "Win32_Processor" and so on...?

    I can't find any list of these in MSDN.

    What others are available?
    I don't live here any more.

  6. #6

    Thread Starter
    Fanatic Member BrianHawley's Avatar
    Join Date
    Aug 2001
    Location
    Saudi Arabia
    Posts
    796

    Re: C# - PC fingerprint (for program piracy protection)

    Quote Originally Posted by wossname
    Brian, where did you find these strings:

    "Win32_BIOS", "Win32_DiskDrive", "Win32_Processor" and so on...?

    I can't find any list of these in MSDN.

    What others are available?
    It is in MSDN. I'm guessing you have an MSDN content filter turned on.

    Here is an on-line verison:

    http://msdn.microsoft.com/library/de...win32_bios.asp

    Hope that helps!
    Brian
    (Fighting with the RightToLeft bugs in VS 2005)

  7. #7
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: C# - PC fingerprint (for program piracy protection)

    Yep, nice one
    I don't live here any more.

  8. #8
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985

    Re: C# - PC fingerprint (for program piracy protection)

    That method also uses clock speed? So if I over clock my CPU by 1MHz, your software will no longer work? That is definately not a good idea. Writing security code like this in .Net is not a good idea either since it can be disassembled easily.

    The best idea I've come accrossed is to have the person setup a username and password on your server(s). Then, when they purchase your software, attach it to the username, then make them login when they use the software. Just don't allow more than two connections at the sametime. It's a very good scheme if the user has an always on connection or requires it for your program, otherwise it could be cumbersom but you could always have an off-line mode where it verifies that it's a legal copy once every few days or so just by login in and checking if anyone else is using it.

  9. #9
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: C# - PC fingerprint (for program piracy protection)

    Quote Originally Posted by kasracer
    That method also uses clock speed? So if I over clock my CPU by 1MHz, your software will no longer work?
    I don't think it works that way. I reckon it would take the number that is hardwired into the CPU at the factory. Say its a 3ghz when it leaves the factory, and you clock it up to 3.5ghz I think it would still return 3ghz.

    But I agree that this fingerprint should not be based upon customizable things like Ram, framework version and so on because they do not affect the validity of the software. Companies upgrade their hardware all the time they don't want to pay for new software every time they stick another gig of ram in their workstation. HDD serial number would be an exception of course.
    Last edited by wossname; Mar 17th, 2005 at 04:37 AM.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width