diff --git a/CM2/FOFF.nfo b/CM2/FOFF.nfo new file mode 100644 index 0000000..3e1ae93 --- /dev/null +++ b/CM2/FOFF.nfo @@ -0,0 +1,146 @@ + + + : ۲ ۲۲ ۲۲ ۲ ۲ ۲ : + ij ۱ ۱۲ ۱۲ ۱ ۱ ۲ + ---۰--۰۰۲۰--۰--- + ۱ ۱ ۱ ۲ ۱ ۱ + | ۲ ۲ ۲ ۲ ۲ ۲ ۲ | + : : + : iNFORMATiON : + .. + . . + + - FiGHT ONLY 4 FREEDOM - + P r e s e n t s + + KeygenMe 1 (c) by Team FOFF + + + ܲ۲۲ + ۲۲۲ + ۲ ܲ + + + Cracked by. [ - ] Rls Type . [ KeygenMe 1 ] + Tested by.. [ Team FOFF ] Date ..... [ 05-03-2007 ] + Packed by.. [ Team FOFF ] OS ....... [ Win All ] + Supplied by [ Team FOFF ] Language . [ English ] + Protection. [ Serial ] Disks .... [ 01 ] + + . + ۲ ܲ ۲ +ܲ ۲۲ܲ۲ ۲ ۲ ۲ ۲ ۲۲ ߲ + ޲ ۲ ߲ ܲ ۲ ݰ ޲ + ߲ ߲ ۲ +۲ . + + + ߲ ߲ + ܲ ߲ + ܲ ܲ + ۲ ߲ + ߱ NOTES + + + + KegenMe by cLoNeTrOnE written on masm32, create a keygen for it on + any kind of programming tool but bruteforce is not allowed. + + + + + ܲ + + ߲ ߲ + ߲ ߲ + ܲ + ۲ ܲ + ߱ NOTES + + + + + Unpack from ZIP archieve and run it :) + + + + + + ܲ + + ߲ ܲ + ܲ ߲ ܲ + ܲ + ۲ MEMBERS + + + + + + {:... Team Components ....:} + + MiStEr_X.................................:{ Founder/Cracker } + cLoNeTrOnE ................................:{ Cracker/Coder } + CooL As Ice....................................:{ Supporter } + + + + + + + + ܲ + ܲ + ۲ Join Us + + + + + We at FOFF are opened to accept new members and relese cracks to + contribute to the underground community. Of course we can not + accept newbies, we are willing to have in our Team experienced + crackers, coders, keygenners, etc. + + + + + + ܲ + ܲ ܲ + ܲ + ۲ GREETz ߲ + ߱ + + + + +  CrackZ  FFF  CiM  ARTeam  DiGERATi  +  PARADOX  PiZZA  DEViANCE  TSRh  FHCF  +  Astalavista.MS Community  + + + + + ߲ ߲ + ܲ ܲ ߲ ܲ + ܲ + ۲ CONTACT ߲ + ߱ + + + + + :[WWW] ................:[ http://foff.astalavista.ms ]: + + + + + . + ۲ ܲ ۲ +ܲ ۲۲ܲ۲ ۲ ۲ ۲ ۲ ۲۲ ߲ + ޲ ۲ ߲ ܲ ۲ ݰ ޲ + ߲ ߲ ۲ +۲ + [ NFO by creepah Last update on 12-02-2k7 ] + + diff --git a/CM2/KeyGenMe_#1_cLoNeTrOnE.exe b/CM2/KeyGenMe_#1_cLoNeTrOnE.exe new file mode 100644 index 0000000..a901a78 Binary files /dev/null and b/CM2/KeyGenMe_#1_cLoNeTrOnE.exe differ diff --git a/CM2/KeyGenMe_#1_cLoNeTrOnE_w81fix.exe b/CM2/KeyGenMe_#1_cLoNeTrOnE_w81fix.exe new file mode 100644 index 0000000..764e3af Binary files /dev/null and b/CM2/KeyGenMe_#1_cLoNeTrOnE_w81fix.exe differ diff --git a/CM2/file_id.diz b/CM2/file_id.diz new file mode 100644 index 0000000..3fa12ee --- /dev/null +++ b/CM2/file_id.diz @@ -0,0 +1,3 @@ + KeygenMe 1 (c) by Team FOFF + + [DISK: xx/01 ] [DATE: 05-03-2007 ] [OS: Win All ] \ No newline at end of file diff --git a/CM2/keygen/sp_keygen.exe b/CM2/keygen/sp_keygen.exe new file mode 100644 index 0000000..91df6d4 Binary files /dev/null and b/CM2/keygen/sp_keygen.exe differ diff --git a/CM2/solve.md b/CM2/solve.md new file mode 100644 index 0000000..ed2e8f5 --- /dev/null +++ b/CM2/solve.md @@ -0,0 +1,241 @@ +算密钥 + +先来一组可用密钥: + +``` +chenx221 +48-000002AB-GA +``` + +*此crackme在win8.1及以上的系统上存在兼容性问题,判断serial时会崩溃。`KeyGenMe_#1_cLoNeTrOnE.exe+1321`前缺少对edx进行清理 + +密钥由以下部分组成 + +1. `keyDatabase[name[0] % 0x10]` +2. `keyDatabase[name[1] % 0x10]` +3. `-` +4. `Name的Ascii码总和 (%.8X格式化输出)` +5. `-` +6. `keyDatabase[name[^2] % 0x10]` +7. `keyDatabase[name[^1] % 0x10]` + +keyDatabase: `1AG4T3CX8ZF7R95Q` + +细节: + +```assembly +0040102B | 55 | push ebp | start +0040102C | 8BEC | mov ebp,esp | +0040102E | 817D 0C 10010000 | cmp dword ptr ss:[ebp+C],110 | +00401035 | 75 3B | jne keygenme_#1_clonetrone.401072 | +00401037 | 66:C705 C9324000 | mov word ptr ds:[4032C9],5 | +00401040 | C605 CB324000 00 | mov byte ptr ds:[4032CB],0 | +00401047 | FF75 08 | push dword ptr ss:[ebp+8] | +0040104A | E8 93030000 | call | +0040104F | 68 BA314000 | push keygenme_#1_clonetrone.4031BA | +00401054 | 6A 06 | push 6 | +00401056 | FF75 08 | push dword ptr ss:[ebp+8] | +00401059 | E8 7E030000 | call | +0040105E | 68 BA314000 | push keygenme_#1_clonetrone.4031BA | +00401063 | 6A 03 | push 3 | +00401065 | FF75 08 | push dword ptr ss:[ebp+8] | +00401068 | E8 6F030000 | call | +0040106D | E9 75010000 | jmp keygenme_#1_clonetrone.4011E7 | +00401072 | 837D 0C 10 | cmp dword ptr ss:[ebp+C],10 | +00401076 | 75 0F | jne keygenme_#1_clonetrone.401087 | +00401078 | 6A 00 | push 0 | +0040107A | FF75 08 | push dword ptr ss:[ebp+8] | +0040107D | E8 48030000 | call | +00401082 | E9 60010000 | jmp keygenme_#1_clonetrone.4011E7 | +00401087 | 817D 0C 11010000 | cmp dword ptr ss:[ebp+C],111 | +0040108E | 0F85 4A010000 | jne keygenme_#1_clonetrone.4011DE | +00401094 | 33C0 | xor eax,eax | +00401096 | 8B45 10 | mov eax,dword ptr ss:[ebp+10] | [ebp+10]:EntryPoint +00401099 | C1E8 10 | shr eax,10 | +0040109C | 0BC0 | or eax,eax | +0040109E | 0F85 43010000 | jne keygenme_#1_clonetrone.4011E7 | +004010A4 | 33C0 | xor eax,eax | +004010A6 | 8B45 10 | mov eax,dword ptr ss:[ebp+10] | [ebp+10]:EntryPoint +004010A9 | C1C0 10 | rol eax,10 | +004010AC | C1E8 10 | shr eax,10 | +004010AF | 83F8 01 | cmp eax,1 | +004010B2 | 0F85 E7000000 | jne keygenme_#1_clonetrone.40119F | +004010B8 | 66:FF0D C9324000 | dec word ptr ds:[4032C9] | CheckBtn +004010BF | 6A 50 | push 50 | +004010C1 | 68 54324000 | push | Name +004010C6 | 6A 03 | push 3 | +004010C8 | FF75 08 | push dword ptr ss:[ebp+8] | +004010CB | E8 00030000 | call | +004010D0 | A3 B8324000 | mov dword ptr ds:[],eax | length +004010D5 | 6A 14 | push 14 | +004010D7 | 68 A4324000 | push | Serial +004010DC | 6A 06 | push 6 | +004010DE | FF75 08 | push dword ptr ss:[ebp+8] | +004010E1 | E8 EA020000 | call | +004010E6 | A3 BC324000 | mov dword ptr ds:[],eax | length +004010EB | FF75 08 | push dword ptr ss:[ebp+8] | +004010EE | E8 EF020000 | call | +004010F3 | FF35 B8324000 | push dword ptr ds:[] | +004010F9 | 68 54324000 | push | +004010FE | E8 76020000 | call | +00401103 | 833D B8324000 00 | cmp dword ptr ds:[],0 | +0040110A | 75 14 | jne keygenme_#1_clonetrone.401120 | check if name is empty +0040110C | 68 BB314000 | push keygenme_#1_clonetrone.4031BB | 4031BB:"There is nothing here to be processed." +00401111 | 6A 03 | push 3 | +00401113 | FF75 08 | push dword ptr ss:[ebp+8] | +00401116 | E8 C1020000 | call | +0040111B | E9 9E000000 | jmp keygenme_#1_clonetrone.4011BE | +00401120 | 833D B8324000 04 | cmp dword ptr ds:[],4 | +00401127 | 73 14 | jae keygenme_#1_clonetrone.40113D | check if name length > 4 +00401129 | 68 0B324000 | push keygenme_#1_clonetrone.40320B | 40320B:"Name was too short. Put more than 3 chars" +0040112E | 6A 03 | push 3 | +00401130 | FF75 08 | push dword ptr ss:[ebp+8] | +00401133 | E8 A4020000 | call | +00401138 | E9 81000000 | jmp keygenme_#1_clonetrone.4011BE | +0040113D | 833D B8324000 3C | cmp dword ptr ds:[],3C | 3C:'<' +00401144 | 76 11 | jbe keygenme_#1_clonetrone.401157 | check if name length < 60 +00401146 | 68 E2314000 | push keygenme_#1_clonetrone.4031E2 | 4031E2:"Name was too long, buffer will overflow." +0040114B | 6A 03 | push 3 | +0040114D | FF75 08 | push dword ptr ss:[ebp+8] | +00401150 | E8 87020000 | call | +00401155 | EB 67 | jmp keygenme_#1_clonetrone.4011BE | +00401157 | 0BC0 | or eax,eax | +00401159 | 75 11 | jne keygenme_#1_clonetrone.40116C | check if name contains illegal char (!ascii) +0040115B | 68 00304000 | push keygenme_#1_clonetrone.403000 | 403000:"The Name contains invalid ASCII char [>127]." +00401160 | 6A 03 | push 3 | +00401162 | FF75 08 | push dword ptr ss:[ebp+8] | +00401165 | E8 72020000 | call | +0040116A | EB 52 | jmp keygenme_#1_clonetrone.4011BE | +0040116C | FF75 08 | push dword ptr ss:[ebp+8] | +0040116F | E8 EE000000 | call | +00401174 | 803D CB324000 00 | cmp byte ptr ds:[4032CB],0 | +0040117B | 75 19 | jne keygenme_#1_clonetrone.401196 | +0040117D | 68 10100000 | push 1010 | Fail +00401182 | 68 C6304000 | push keygenme_#1_clonetrone.4030C6 | 4030C6:"Invalid Serial - Serial Rejected" +00401187 | 68 7C304000 | push keygenme_#1_clonetrone.40307C | 40307C:"Wrong Serial. The Serial Is Case-Sensitive. Try Again. Never Give Up !!!." +0040118C | FF75 08 | push dword ptr ss:[ebp+8] | +0040118F | E8 42020000 | call | +00401194 | EB 07 | jmp keygenme_#1_clonetrone.40119D | +``` + +```assembly +00401379 | 55 | push ebp | isAscii (string,len) +0040137A | 8BEC | mov ebp,esp | EAX: True->1, False->0 +0040137C | 51 | push ecx | +0040137D | 52 | push edx | +0040137E | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +00401380 | 33C9 | xor ecx,ecx | +00401382 | 33D2 | xor edx,edx | +00401384 | 8B4D 0C | mov ecx,dword ptr ss:[ebp+C] | p1 +00401387 | 8B45 08 | mov eax,dword ptr ss:[ebp+8] | p0 +0040138A | EB 27 | jmp keygenme_#1_clonetrone.4013B3 | Loop +0040138C | 8A10 | mov dl,byte ptr ds:[eax] | eax:_TppWorkerThread@4 +0040138E | 80FA 7F | cmp dl,7F | +00401391 | 76 0B | jbe keygenme_#1_clonetrone.40139E | char <= ascii 127 +00401393 | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +00401395 | B8 00000000 | mov eax,0 | eax:_TppWorkerThread@4 +0040139A | EB 1B | jmp keygenme_#1_clonetrone.4013B7 | +0040139C | EB 13 | jmp keygenme_#1_clonetrone.4013B1 | +0040139E | 80FA 80 | cmp dl,80 | +004013A1 | 73 0E | jae keygenme_#1_clonetrone.4013B1 | char >= 128 +004013A3 | 83F9 01 | cmp ecx,1 | +004013A6 | 75 09 | jne keygenme_#1_clonetrone.4013B1 | l !== 1 +004013A8 | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +004013AA | B8 01000000 | mov eax,1 | eax:_TppWorkerThread@4 +004013AF | EB 06 | jmp keygenme_#1_clonetrone.4013B7 | +004013B1 | 40 | inc eax | eax:_TppWorkerThread@4 +004013B2 | 49 | dec ecx | +004013B3 | 0BC9 | or ecx,ecx | +004013B5 | 75 D5 | jne keygenme_#1_clonetrone.40138C | NextLoop +004013B7 | 5A | pop edx | +004013B8 | 59 | pop ecx | +004013B9 | C9 | leave | +004013BA | C2 0800 | ret 8 | +``` + +```assembly +00401262 | 55 | push ebp | checkSerial +00401263 | 8BEC | mov ebp,esp | +00401265 | 60 | pushad | +00401266 | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +00401268 | 33D2 | xor edx,edx | +0040126A | B9 10000000 | mov ecx,10 | +0040126F | A0 54324000 | mov al,byte ptr ds:[] | +00401274 | F6F1 | div cl | name[0] / 0x10 +00401276 | 8AD4 | mov dl,ah | mod +00401278 | 8A82 35324000 | mov al,byte ptr ds:[edx+] | edx+403235:"1AG4T3CX8ZF7R95Q" +0040127E | 8A15 A4324000 | mov dl,byte ptr ds:[] | +00401284 | 38D0 | cmp al,dl | +00401286 | 0F85 E8000000 | jne | serial[0] !== Keydatabase[name[0] % 0x10] +0040128C | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +0040128E | A0 55324000 | mov al,byte ptr ds:[403255] | name[1] +00401293 | F6F1 | div cl | +00401295 | 8AD4 | mov dl,ah | +00401297 | 8A82 35324000 | mov al,byte ptr ds:[edx+] | edx+403235:"1AG4T3CX8ZF7R95Q" +0040129D | 8A15 A5324000 | mov dl,byte ptr ds:[4032A5] | +004012A3 | 38D0 | cmp al,dl | +004012A5 | 0F85 C9000000 | jne | serial[1] !== Keydatabase[name[1] % 0x10] +004012AB | A0 A6324000 | mov al,byte ptr ds:[4032A6] | +004012B0 | 2C 2D | sub al,2D | +004012B2 | 0F85 BC000000 | jne | serial[2] !== '-' +004012B8 | 33D2 | xor edx,edx | +004012BA | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +004012BC | 33C9 | xor ecx,ecx | Sum(name char ascii) +004012BE | 8A8A 54324000 | mov cl,byte ptr ds:[edx+] | +004012C4 | 0AC9 | or cl,cl | +004012C6 | 74 05 | je keygenme_#1_clonetrone.4012CD | +004012C8 | 03C1 | add eax,ecx | eax:_TppWorkerThread@4 +004012CA | 42 | inc edx | +004012CB | EB EF | jmp keygenme_#1_clonetrone.4012BC | +004012CD | 50 | push eax | Sum +004012CE | 68 46324000 | push keygenme_#1_clonetrone.403246 | 403246:"%.8X" +004012D3 | 68 C0324000 | push | +004012DD | 83C4 0C | add esp,C | +004012E0 | 33C9 | xor ecx,ecx | +004012E2 | EB 11 | jmp keygenme_#1_clonetrone.4012F5 | Check serial[3..] == NameAscSumFormatStr +004012E4 | 8A81 C0324000 | mov al,byte ptr ds:[ecx+ | +004012FF | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +00401301 | A0 AF324000 | mov al,byte ptr ds:[4032AF] | +00401306 | 2C 2D | sub al,2D | +00401308 | 75 6A | jne | serial[11] !== '-' +0040130A | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +0040130C | B9 10000000 | mov ecx,10 | +00401311 | 8B1D B8324000 | mov ebx,dword ptr ds:[] | +00401317 | 8A83 52324000 | mov al,byte ptr ds:[ebx+403252] | name[^2] +0040131D | F6F1 | div cl | +0040131F | 8AD4 | mov dl,ah | +00401321 | 8A82 35324000 | mov al,byte ptr ds:[edx+] | ??? BUG (forget xor edx,edx?) +00401327 | 8A15 B0324000 | mov dl,byte ptr ds:[4032B0] | +0040132D | 38D0 | cmp al,dl | +0040132F | 75 43 | jne | serial[12] !== Keydatabase[name[^2] % 0x10] +00401331 | 33C0 | xor eax,eax | eax:_TppWorkerThread@4 +00401333 | 8A83 53324000 | mov al,byte ptr ds:[ebx+403253] | name[^1] +00401339 | F6F1 | div cl | +0040133B | 8AD4 | mov dl,ah | +0040133D | 8A82 35324000 | mov al,byte ptr ds:[edx+] | edx+403235:"1AG4T3CX8ZF7R95Q" +00401343 | 8A15 B1324000 | mov dl,byte ptr ds:[4032B1] | +00401349 | 38D0 | cmp al,dl | +0040134B | 75 27 | jne | serial[13] !== Keydatabase[name[^1] % 0x10] +0040134D | 68 30100000 | push 1030 | Success +00401352 | 68 59304000 | push keygenme_#1_clonetrone.403059 | 403059:"WoW, Very Good Job." +00401357 | 68 2D304000 | push keygenme_#1_clonetrone.40302D | 40302D:"Well Done Cracker !!!. Now, Code a KeyGen.?" +0040135C | FF75 08 | push dword ptr ss:[ebp+8] | +0040135F | E8 72000000 | call | +00401364 | 66:C705 C9324000 | mov word ptr ds:[4032C9],FFFF | +0040136D | C605 CB324000 01 | mov byte ptr ds:[4032CB],1 | +00401374 | 61 | popad | +00401375 | C9 | leave | ^ if jump here +00401376 | C2 0400 | ret 4 | +``` + +修复的几处代码请自己比对,我懒得放了 \ No newline at end of file diff --git a/CM2/source/keygen1.sln b/CM2/source/keygen1.sln new file mode 100644 index 0000000..3f0a221 --- /dev/null +++ b/CM2/source/keygen1.sln @@ -0,0 +1,163 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35303.130 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen1", "keygen1\keygen1.csproj", "{D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen2", "keygen2\keygen2.csproj", "{2446CB50-1882-4219-9DB0-E7F5517E6E20}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "keygen3", "keygen3\keygen3.csproj", "{BC47A6DE-7F9D-4D65-A996-69FB778C95F3}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GiveMeSerial", "GiveMeSerial\GiveMeSerial.vcxproj", "{E3604156-7DF2-4B5F-AECA-64786B92F38C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DllInjector", "DllInjector\DllInjector.csproj", "{A5A24406-1296-457B-91A3-60E67511D807}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GetSerial", "GetSerial\GetSerial.vcxproj", "{85044A5C-C4A3-4C79-9AD5-6895F61F8515}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GuessSerial", "GuessSerial\GuessSerial.csproj", "{7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Validator", "Validator\Validator.csproj", "{6BE1ED72-6CA9-4442-B529-C867A9D6904C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FindKey", "FindKey\FindKey.csproj", "{D5E3C871-EA87-48E7-9287-E96B8410EB18}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sp_keygen", "sp_keygen\sp_keygen.csproj", "{D6614743-D01E-4899-A5E7-B4E45BD1B033}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.ActiveCfg = Debug|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x64.Build.0 = Debug|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.ActiveCfg = Debug|x86 + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Debug|x86.Build.0 = Debug|x86 + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|Any CPU.Build.0 = Release|Any CPU + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.ActiveCfg = Release|x64 + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x64.Build.0 = Release|x64 + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.ActiveCfg = Release|x86 + {D0E162E3-FC99-4405-BEE1-AB85D9D41DA9}.Release|x86.Build.0 = Release|x86 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.ActiveCfg = Debug|x64 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x64.Build.0 = Debug|x64 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.ActiveCfg = Debug|x86 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Debug|x86.Build.0 = Debug|x86 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|Any CPU.Build.0 = Release|Any CPU + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.ActiveCfg = Release|x64 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x64.Build.0 = Release|x64 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.ActiveCfg = Release|x86 + {2446CB50-1882-4219-9DB0-E7F5517E6E20}.Release|x86.Build.0 = Release|x86 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.ActiveCfg = Debug|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x64.Build.0 = Debug|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.ActiveCfg = Debug|x86 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Debug|x86.Build.0 = Debug|x86 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|Any CPU.Build.0 = Release|Any CPU + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.ActiveCfg = Release|x64 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x64.Build.0 = Release|x64 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.ActiveCfg = Release|x86 + {BC47A6DE-7F9D-4D65-A996-69FB778C95F3}.Release|x86.Build.0 = Release|x86 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|Any CPU.Build.0 = Debug|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.ActiveCfg = Debug|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x64.Build.0 = Debug|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.ActiveCfg = Debug|Win32 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Debug|x86.Build.0 = Debug|Win32 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|Any CPU.ActiveCfg = Release|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|Any CPU.Build.0 = Release|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.ActiveCfg = Release|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x64.Build.0 = Release|x64 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.ActiveCfg = Release|Win32 + {E3604156-7DF2-4B5F-AECA-64786B92F38C}.Release|x86.Build.0 = Release|Win32 + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.ActiveCfg = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|x64.Build.0 = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.ActiveCfg = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Debug|x86.Build.0 = Debug|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Release|Any CPU.Build.0 = Release|Any CPU + {A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.ActiveCfg = Release|x64 + {A5A24406-1296-457B-91A3-60E67511D807}.Release|x64.Build.0 = Release|x64 + {A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.ActiveCfg = Release|x86 + {A5A24406-1296-457B-91A3-60E67511D807}.Release|x86.Build.0 = Release|x86 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|Any CPU.ActiveCfg = Debug|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|Any CPU.Build.0 = Debug|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.ActiveCfg = Debug|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x64.Build.0 = Debug|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.ActiveCfg = Debug|Win32 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Debug|x86.Build.0 = Debug|Win32 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|Any CPU.ActiveCfg = Release|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|Any CPU.Build.0 = Release|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.ActiveCfg = Release|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x64.Build.0 = Release|x64 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.ActiveCfg = Release|Win32 + {85044A5C-C4A3-4C79-9AD5-6895F61F8515}.Release|x86.Build.0 = Release|Win32 + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x64.ActiveCfg = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x64.Build.0 = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x86.ActiveCfg = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Debug|x86.Build.0 = Debug|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|Any CPU.Build.0 = Release|Any CPU + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x64.ActiveCfg = Release|x64 + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x64.Build.0 = Release|x64 + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x86.ActiveCfg = Release|x86 + {7B2D3886-A213-4F99-89F7-D0D7DDAA97D9}.Release|x86.Build.0 = Release|x86 + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x64.ActiveCfg = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x64.Build.0 = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x86.ActiveCfg = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Debug|x86.Build.0 = Debug|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|Any CPU.Build.0 = Release|Any CPU + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x64.ActiveCfg = Release|x64 + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x64.Build.0 = Release|x64 + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x86.ActiveCfg = Release|x86 + {6BE1ED72-6CA9-4442-B529-C867A9D6904C}.Release|x86.Build.0 = Release|x86 + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x64.ActiveCfg = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x64.Build.0 = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x86.ActiveCfg = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Debug|x86.Build.0 = Debug|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|Any CPU.Build.0 = Release|Any CPU + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x64.ActiveCfg = Release|x64 + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x64.Build.0 = Release|x64 + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x86.ActiveCfg = Release|x86 + {D5E3C871-EA87-48E7-9287-E96B8410EB18}.Release|x86.Build.0 = Release|x86 + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x64.ActiveCfg = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x64.Build.0 = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x86.ActiveCfg = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Debug|x86.Build.0 = Debug|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|Any CPU.Build.0 = Release|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x64.ActiveCfg = Release|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x64.Build.0 = Release|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x86.ActiveCfg = Release|Any CPU + {D6614743-D01E-4899-A5E7-B4E45BD1B033}.Release|x86.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {01ED3EE8-E89A-4A27-AF68-EF2490CB6BD7} + EndGlobalSection +EndGlobal diff --git a/CM2/source/sp_keygen/Program.cs b/CM2/source/sp_keygen/Program.cs new file mode 100644 index 0000000..556874b --- /dev/null +++ b/CM2/source/sp_keygen/Program.cs @@ -0,0 +1,59 @@ +using System.Text; + +class Program +{ + static void Main() + { + Console.Write("Enter Name: "); + string? name = Console.ReadLine(); + //Check + if (string.IsNullOrEmpty(name) || name.Length <= 4 || name.Length >= 60 || !IsAscii(name)) + Console.Write("Invalid Name"); + else + { + CalcSerial(name); + } + Console.ReadKey(); + } + + public static void CalcSerial(string name) + { + const string keyDatabase = "1AG4T3CX8ZF7R95Q"; + StringBuilder sb = new(); + + sb.Append(keyDatabase[name[0] % 0x10]); + sb.Append(keyDatabase[name[1] % 0x10]); + sb.Append('-'); + sb.Append($"{GetAscii(name):X8}"); + sb.Append('-'); + sb.Append(keyDatabase[name[^2] % 0x10]); + sb.Append(keyDatabase[name[^1] % 0x10]); + + Console.WriteLine(sb.ToString()); + } + + //public static bool Check() + //{ + // return true; + //} + + public static bool IsAscii(string str) + { + foreach (char c in str) + { + if (c > 127) + return false; + } + return true; + } + + public static int GetAscii(string str) + { + int ascii = 0; + foreach (char c in str) + { + ascii += c; + } + return ascii; + } +} diff --git a/CM2/source/sp_keygen/Properties/Resources.Designer.cs b/CM2/source/sp_keygen/Properties/Resources.Designer.cs new file mode 100644 index 0000000..41461b5 --- /dev/null +++ b/CM2/source/sp_keygen/Properties/Resources.Designer.cs @@ -0,0 +1,63 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本:4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace sp_keygen.Properties { + using System; + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// 返回此类使用的缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("sp_keygen.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 重写当前线程的 CurrentUICulture 属性,对 + /// 使用此强类型资源类的所有资源查找执行重写。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + } +} diff --git a/CM2/source/sp_keygen/Properties/Resources.resx b/CM2/source/sp_keygen/Properties/Resources.resx new file mode 100644 index 0000000..4fdb1b6 --- /dev/null +++ b/CM2/source/sp_keygen/Properties/Resources.resx @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 1.3 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CM2/source/sp_keygen/Properties/launchSettings.json b/CM2/source/sp_keygen/Properties/launchSettings.json new file mode 100644 index 0000000..d32d884 --- /dev/null +++ b/CM2/source/sp_keygen/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "sp_keygen": { + "commandName": "Project", + "commandLineArgs": "chenx221\r\n123-456-789-X" + } + } +} \ No newline at end of file diff --git a/CM2/source/sp_keygen/sp_keygen.csproj b/CM2/source/sp_keygen/sp_keygen.csproj new file mode 100644 index 0000000..6ca6170 --- /dev/null +++ b/CM2/source/sp_keygen/sp_keygen.csproj @@ -0,0 +1,25 @@ + + + + Exe + net8.0 + enable + enable + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + +