Artem's blog

Mainly .NET (C#, ASP.NET) and my projects

Archives for News

A new feature is coming to SKGL Project

In order to decrease the distribution of serial keys over ‘bad’ hacking sites, I would like to present a feature that probably will be released in SKGL 2.1.1.0 – Machine code locking. This means that each serial key will have support for machine code storage, so that the serial key is bounded to a single computer. As you know, the project is open source, and you can join it whenever you want to (http://skgl.codeplex.com/). If you think I should change something, please write to me or comment this post. Good Luck!

       static string getMachineCode()
        {
            /* 
             * Copyright (C) 2012 Artem Los, All rights reserved.
             * 
             * This code will generate a 5 digits long key, finger print, of the system
             * where this method is being executed. However, that might be changed in the
             * hash function "GetStableHash", by changing the amount of zeroes in
             * MUST_BE_LESS_OR_EQUAL_TO to the one you want to have. Ex 1000 will return 
             * 3 digits long hash.
             * 
             * Please note, that you might also adjust the order of these, but remember to
             * keep them there because as it is stated at 
             * (http://www.codeproject.com/Articles/17973/How-To-Get-Hardware-Information-CPU-ID-MainBoard-I)
             * the processorID might be the same at some machines, which will generate same
             * hashes for several machines.
             * 
             * The function will probably be implemented into SKGL Project at http://skgl.codeplex.com/
             * and Software Protector at http://softwareprotector.codeplex.com/, so I 
             * release this code under the same terms and conditions as stated here:
             * http://skgl.codeplex.com/license
             * 
             * Any questions, please contact me at
             *  * artem@artemlos.net
             */
            ManagementObjectSearcher searcher = new ManagementObjectSearcher("select * from Win32_Processor");
            string collectedInfo = ""; // here we will put the informa

            foreach (ManagementObject share in searcher.Get())
            {
                // first of all, the processorid
                collectedInfo += share.GetPropertyValue("ProcessorId").ToString ();
            }

            searcher.Query = new ObjectQuery("select * from Win32_BIOS");
            foreach (ManagementObject share in searcher.Get())
            {
                //then, the serial number of BIOS
                collectedInfo +=share.GetPropertyValue("SerialNumber").ToString ();
            }

            searcher.Query = new ObjectQuery("select * from Win32_BaseBoard");
            foreach (ManagementObject share in searcher.Get())
            {
                //finally, the serial number of motherboard
                collectedInfo+= share.GetPropertyValue("SerialNumber").ToString();
            }
            return GetStableHash(collectedInfo ).ToString ();
        }

        static public int GetStableHash(string s)
        {
            /*
             * modification of code from:
             * http://stackoverflow.com/questions/548158/fixed-length-numeric-hash-code-from-variable-length-string-in-c-sharp
             *
             * modified by Artem Los
             *
             */
            const int MUST_BE_LESS_OR_EQUAL_TO = 100000;
            uint hash = 0;

            foreach (byte b in System.Text.Encoding.Unicode.GetBytes(s))
            {
                hash += b;
                hash += (hash << 10);
                hash ^= (hash >> 6);
            }

            hash += (hash << 3);
            hash ^= (hash >> 11);
            hash += (hash << 15);

            int result = (int)(hash % MUST_BE_LESS_OR_EQUAL_TO);
            int check = MUST_BE_LESS_OR_EQUAL_TO / result;

            if (check > 1)
            {
                result *= check;
            }

            return result;
        }

Microsoft’s Surface – a better version of iPad

Microsoft SurfaceiPad was the only device that actually succeed on the tablet-pc market since 2010, from that “magical day“. No other tablet-pc has gotten much traction as Apple’s iPad (except the Kindle Fire from Amazon). But yesterday, that changed. Microsoft has now a new clear goal: to make a tablet that’s better than the iPad.

By announcing their new product, Surface, which will be available in two versions: one with Windows RT, and the other one with Windows 8 Pro (full list of features), they will probably set a stop for Apple’s monopoly on iPads, because of the good quality of the device and amazing new features that are not avaialable in iPad.

Keyboard is one of the features that will be better in Surface than iPad’s touch keyboard because of following reasons:

  1. When writing something such as an email or a document, it is impossible to do it as quickly as it can be done with a physical keyboard.
  2. There are keyboards that are available for iPad as well (3rd party products), but they are nothing compared to Microsoft’s build-in keyboard, which is in the same time portable, because of the form.
  3. Also, the keyboard is easy to attach to the tablet by magnets.
  4. As an advantage, the keyboard for Microsoft’s Surface will be in several colours, which is a clear benefit of in comparison with iPad.

The size of the screen is also a great benefit of this device. The one with Windows 8 Pro will have a 10.6 ClearType Full HD display, and as it is announced, Microsoft’s Surface will have the same dimension as a movie screen, so no black borders will be shown.

The storage is a big advantage, specially when comparing Windows 8 Pro model with iPad. You will get up to 128GB, whereas iPad only allows you 64GB.

The amount of ports on a Microsoft’s Surface beats iPad totally. In both versions you will have two USB ports, but as a great future, Window’s 8 Pro model will support USB 3.0, whereas Windows RT model only supports USB 2.0.

There are of course other amazing features available that are not listed here, so please visit the official website of Microsoft’s Surface, www.surface.com or the source of this article at CNN.

Software Protector awarded by Softpedia

When I was searching on my project at google.com, and when I found it at Softpedia, I was a bit surprised.

Originally, my plan was to make Software Protector a part of SKGL API, as an example of how people might use the library to generate and/or validate their own serial keys through their .NET projects. This changed yesterday. I think it would be better to say that SKGL API is a part of Software Protector. The positions of the projects have now been changed to something that I did not expect before. That is good!

Something that really impressed me was the description of the software at Softpedia. It was written by someone else!

Software Protector is a handy and reliable utility designed to enable you to protect your software from hackers and theft.

Software Protector is able to generate strong and unbreakable serial keys in order to make sure that your development work is fully protected. You can customize the creation and expiration date for trials.

The idea behind the entire project has always been to make a software protection utility free of charge and also open source based. Because of the fact that almost all programs that really do the same thing are expensive for a single developer, my motto is to make it simple to use, simple to develop the core and adjust it, and finally for no cost!

Extract sound from a flash file

In this article we will look at a very easy way (in terms of software required) of extracting sound from a flash file (.flv). Please note that it might be done quickly, by using a sound converting software, but in case you only have the latest free version of 7-Zip, and just do not have anything better to do, try this out!

As we know, an FLV file is a container-format, which means the system inside it is similar to the one we use in archives, so the media files are converted into an archive. Therefore, you might want to open the file using a zipping software (I recommend 7-Zip), and explore the FLV file. There you will find two files (video’s name is myvideo), myvideo.video.flv and myvideo.audio.flv. Extract the audio file, and inside, you will find myvideo.audio.mp3!

Software Protector as a single project

Recently, a part of SKGL API (http://skgl.codeplex.com/), called Software Protector was promoted, and now you might find the new versions of it easily at http://softwareprotector.codeplex.com/.

Software Protector + SKGL 2.0

Today, it is an important event – release of SKGL library, and also a well-working GUI – Software Protector.

Before, when SKGL was hosted at CliZ Ware, even though the library was free of charge, the source of it was closed by the license. Now, however, the newer versions of SKGL will have an open source, so that you can learn, and maybe, write your own Serial Key Algorithm in future, much more improved and securer.

In order to download the library, enter a link below:

 

Installer build into Windows

IExpress is an easy to use, free of charge, build in to Windows setup system. It consist of an easy wizard, which is also a big help to all new software developers. In order to call the program, type iexpress.exe in Run.

This is the first screen of the installer. You can either choose an existing SED file, which is basically a plaint text, or you can create a new SED file with the easy wizard.

Later on, you will be able to chose from different kinds of setups.Ether you create a setup project with an installation command, extract files only, or a CAB file that might be used by other applications.

Eventually, you will be able to specify what to display on the target machine, which files that are to be extracted, a licence agreement, dialog boxes, and more.

An advantage with IExpress is certainly the ability to use it right away – it is already installed in Windows. It is also easy-to-use and it outputs an EXE file. The output executable is also easy to follow, easy to install. Finally, it is free of charge!

SKGL is now released!

SKGL – Software licensing system is now released! The page is currently hosted at http://skgl.clizware.net/

Hash code generator

Dear Readers,

The last time I have spent on the development of SKGL API, which is a library for those of you who want to secure, protect your hard-coded .NET application. I meanwhile, I have also spent sometime on a code, (basically half an hour), that produces hash code. It is not the best way of doing it, however, so it would be a pleasure to see another version of this code. Much appreciated!

        static string twentyfiveByteHash (string s)
        {
            int amountOfBlocks = s.Length / 5;
            string[] preHash = new string[amountOfBlocks];

            if (s.Length <= 5)
            {
                //if the input string is shorter than 5, no need of blocks!
                preHash[0] = GetStableHash(s).ToString ();
            }
            else if (s.Length > 5)
            {
                //if the input is more than 5, there is a need of dividing it into blocks.
                for (int i = 0; i < amountOfBlocks-1; i++)
                {
                    preHash[i] = GetStableHash (s.Substring(i*5,5)).ToString ();
                }
                preHash[preHash.Length-1] = GetStableHash (s.Substring((preHash.Length-1) * 5, s.Length - (preHash.Length - 1) * 5)).ToString ();

            }
            return String.Join ("",preHash);
        }

        static public int GetStableHash(string s)
        {
            /*
             * modification of code from:
             * http://stackoverflow.com/questions/548158/fixed-length-numeric-hash-code-from-variable-length-string-in-c-sharp
             *
             * modified by Artem Los
             *
             */
            const int MUST_BE_LESS_OR_EQUAL_TO = 100000000;
            uint hash = 0;

            foreach (byte b in System.Text.Encoding.Unicode.GetBytes(s))
            {
                hash += b;
                hash += (hash << 10);
                hash ^= (hash >> 6);
            }

            hash += (hash << 3);
            hash ^= (hash >> 11);
            hash += (hash << 15);

            int result = (int)(hash  % MUST_BE_LESS_OR_EQUAL_TO);
            int check = MUST_BE_LESS_OR_EQUAL_TO / result;

            if (check > 1)
            {
                result *= check;
            }

            return result;
        }

Secure DotNet Applications with SKGL

SKGL – Serial Key Generating Library is an API that contains a serial key generating algorithm that helps you secure your application. This version is in BETA mode, but can still be used.  (Example is included)

SKGL might be downloaded

Page 4 of 6:« First« 1 2 3 4 5 6 »