Well, i got bored and decided to make a simple Serial Code generation function set. It makes serial keys with quite a nice speed and with a-z,A-Z,0-9 in them. formatted like this:
CMV1-DQzr-QgSq-Pn67-N2mW
CMV1-SS64-hBZU-m9X4-JLsw
CMV1-OdJo-sSq9-SbIU-87hk
CMV1-EJ4c-KieE-MQvI-rtI2
CMV1-epRE-kNrT-O0TS-aYrW
CMV1-w0Se-MNJb-teFw-ZdLr
CMV1-zg1G-FrRE-4kSW-nlyf
CMV1-KNio-aqG8-tyRj-RzHk
CMV1-ENS9-xLIO-5h0G-iWtV
CMV1-R46I-mcK6-vbN7-sluf
CMV1-5bLt-Ytje-D0Mc-pLfM
CMV1-YdTK-uK5x-RvvL-bQ5M
as you can see CMV1 is set as prefix of the serial keys. It works pretty good, for making the serials you need 1 Type, which's data will be added when calling the generation function. the loading requires another one, which is filled when its function is called.
The following commands can be used:
Gosub SS_Setup_Types - Will setup all required types.
SS_Generate_Keys(Filename$,Filenum,Prefix$) - Will generate the keys and write them to the file specified.
SS_Load_Serials(Filename$,Filenum) - Loads the keys to the applications database. also checks if the file exists.
If you look through the functions you'll see that i didnt name 1 function, but that is not bad. no need to call it. SS_Generate_Keys calls that one.
Also, this writes files which are READABLE from a file, so not encryption on them. you must add that yourself if you want to. I do not recommend to use it in this state in a Client - Checked one, if it would be checked by a server, like client sends his serial. Server checks if it exists in the generated list. and sends results. you can do that. but no Client Side checks...
Now, after i have said that, i'll give you guys the functions:
//Serial System Types:
SS_Setup_Types:
Type SS_Char
ID as String
Endtype
Type SS_Serial
Key as String
endtype
Global Dim SS_Char(62) as SS_Char
Global Dim SS_Serial(99999) as SS_Serial
Return
//Serial System Functions:
Function SS_Generate_Keys(Filename$,Filenum,Prefix$)
//This function generates the software keys.
//Give Characters a meaning
SS_Give_Char()
//Make the Serial File
Open to Write Filenum,Filename$
//Now generate the Serials
For X= 1 to 99999
Serial$ = Serial$ + Prefix$+"-"
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + "-"
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + "-"
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + "-"
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Serial$ = Serial$ + SS_Char(RND(61)+1).ID
Write String Filenum,Serial$
Serial$ = ""
Next X
//Close the File
Close File Filenum
Endfunction
Function SS_Give_Char()
//Give Numbers a meaning.
SS_Char(1).ID = "a"
SS_Char(2).ID = "b"
SS_Char(3).ID = "c"
SS_Char(4).ID = "d"
SS_Char(5).ID = "e"
SS_Char(6).ID = "f"
SS_Char(7).ID = "g"
SS_Char(8).ID = "h"
SS_Char(9).ID = "i"
SS_Char(10).ID = "j"
SS_Char(11).ID = "k"
SS_Char(12).ID = "l"
SS_Char(13).ID = "m"
SS_Char(14).ID = "n"
SS_Char(15).ID = "o"
SS_Char(16).ID = "p"
SS_Char(17).ID = "q"
SS_Char(18).ID = "r"
SS_Char(19).ID = "s"
SS_Char(20).ID = "t"
SS_Char(21).ID = "u"
SS_Char(22).ID = "v"
SS_Char(23).ID = "w"
SS_Char(24).ID = "x"
SS_Char(25).ID = "y"
SS_Char(26).ID = "z"
SS_Char(27).ID = "A"
SS_Char(28).ID = "B"
SS_Char(29).ID = "C"
SS_Char(30).ID = "D"
SS_Char(31).ID = "E"
SS_Char(32).ID = "F"
SS_Char(33).ID = "G"
SS_Char(34).ID = "H"
SS_Char(35).ID = "I"
SS_Char(36).ID = "J"
SS_Char(37).ID = "K"
SS_Char(38).ID = "L"
SS_Char(39).ID = "M"
SS_Char(40).ID = "N"
SS_Char(41).ID = "O"
SS_Char(42).ID = "P"
SS_Char(43).ID = "Q"
SS_Char(44).ID = "R"
SS_Char(45).ID = "S"
SS_Char(46).ID = "T"
SS_Char(47).ID = "U"
SS_Char(48).ID = "V"
SS_Char(49).ID = "W"
SS_Char(50).ID = "X"
SS_Char(51).ID = "Y"
SS_Char(52).ID = "Z"
SS_Char(53).ID = "0"
SS_Char(54).ID = "1"
SS_Char(55).ID = "2"
SS_Char(56).ID = "3"
SS_Char(57).ID = "4"
SS_Char(58).ID = "5"
SS_Char(59).ID = "6"
SS_Char(60).ID = "7"
SS_Char(61).ID = "8"
SS_Char(62).ID = "9"
Endfunction
Function SS_Load_Serials(Filename$,Filenum)
//Load the Serials in a Type
//Check if the serial file exists.
If File Exist(Filename$) = 0
Text 0,0,"Error! File '"+Filename$+"'Does not exist."
Text 0,20,"Press Any key to exit"
Wait key
end
endif
//Open the File
Open to Read Filenum,Filename$
//Read it, and apply it.
For X = 1 to 99999
Read String Filenum,Serial$
SS_Serial(X).Key = Serial$
Next X
//Close the File
Close File Filenum
Endfunction
NOTE : This does NOT generate serial keys for DBP, i am telling this as looking at the title might confuse you, or software piraters. if a serial works on any game or program, this is just pure dumb luck.