Hack Forums
[.NET] [Snippet] Serial Generation Based On Input - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] [Snippet] Serial Generation Based On Input (/showthread.php?tid=615760)



[Snippet] Serial Generation Based On Input - ubbelol - Aug 16, 2010

Right so I saw nathans post on a random generation of serials, so I decided to whip up a very simple and small snippet to generate fixed length serials based on input (which means that the serial generated will always be the same if the input is the same).

This can be quite useful for logins system if used right, but please note that if you're gonna use this snippet for your logins PLEASE put some other encryption on as well or else people will easily crack the serial as this isn't that secure, it's just to show you the basic idea.

Right, so what better way of doing this than using a hash? I decided to go with SHA1, I know it has a fixed length of 40 characters so it's easy making a serial divided into 4 pieces splitted by a '-'.

So here's a little preview:
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/serial.gif[/IMG]

And because the source is so awesome i'm putting it in a $hareCash link.

Nope, never do that.

[IMG]http://i350.photobucket.com/albums/q408/ubbe12/wutwut.png[/IMG]

Have fun and kids, please make something useful out of it. 😉


* - Da Loser - Aug 16, 2010

BUMP FOR SOME RAISON YO.

UbbeLoL Need's Your Thanks To Live.

Gief Thanks Nao.


* - Rue - Aug 16, 2010

Make a key generator for my crackme:
http://crackmes.de/users/ruev/rue_keygenme_1/

Very simple mathematical crackme. Non obfuscated.


* - ubbelol - Aug 16, 2010

And also, if you want to compare..

Code
private function ifCompare(byval plaintext as string, byval hash as string) as boolean
if genSerial(input) = hash then return true
end function