-
Notifications
You must be signed in to change notification settings - Fork 0
/
CLDSDRMAIN.cs
433 lines (423 loc) · 18.9 KB
/
CLDSDRMAIN.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
using System;
using System.Windows.Forms;
using System.Net;
using System.Diagnostics;
using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Net.NetworkInformation;
using System.Collections;
using System.Drawing;
namespace downloadmanager
{
public partial class downloadmanager : Form
{
public downloadmanager()
{
InitializeComponent();
}
int count = 7;
private void timer1_Tick(object sender, EventArgs e)
{
re:
if (count > 0)
{
pictureBox1.Image = imageList1.Images[count];
count--;
}
else
{
count = 7;
goto re;
}
}
WebClient mainWebClient1 = new WebClient();
WebClient mainWebClient2 = new WebClient();
WebClient mainWebClient3 = new WebClient();
WebClient mainWebClient4 = new WebClient();
string reallink1 = "https://onedrive.live.com/download?cid=3DD03CC92A52BF65&resid=3DD03CC92A52BF65%2153131&authkey=AO_2UM3oAOsuvjg";
string reallink2 = "https://onedrive.live.com/download?cid=3DD03CC92A52BF65&resid=3DD03CC92A52BF65%2153132&authkey=AFDqxAyDxcRHY7Q";
string reallink3 = "https://onedrive.live.com/download?cid=3DD03CC92A52BF65&resid=3DD03CC92A52BF65%2153134&authkey=AHM73LRu0pN2qYk";
string reallink4 = "https://onedrive.live.com/download?cid=3DD03CC92A52BF65&resid=3DD03CC92A52BF65%2153135&authkey=ALCP9tvN9D2OeX4";
string infofile = "https://drive.google.com/uc?export=download&id=1OIdAD7PdpgyY1bE22nRaaY9fQETx4ImW";
string cracklink = "https://drive.google.com/uc?export=download&id=1wa91bIy1BqBk7LB3YVbgq6Qf3OhtLPAB";
private void downloadmanager_Load(object sender, EventArgs e)
{
timer1.Enabled = true;
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach (var nic in nics)
{
if (nic.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
{
macList = nic.GetPhysicalAddress().ToString();
}
}
//
try
{
FileStream checkfile = new FileStream("APPMANIFEST.DLL", FileMode.CreateNew);
checkfile.Close();
}
catch (Exception) { }
try
{
FileInfo a = new FileInfo(@"Resources\cracker.bat");
a.Delete();
}
catch (Exception) { }
try
{
FileInfo b1 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part1.exe");
b1.Delete();
FileInfo b2 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part2.rar");
b2.Delete();
FileInfo b3 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part3.rar");
b3.Delete();
FileInfo b4 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part4.rar");
b4.Delete();
}
catch (Exception) { }
try
{
WebClient infofilesync = new WebClient();
infofilesync.DownloadFileCompleted += new AsyncCompletedEventHandler(infosynced);
infofilesync.DownloadFileAsync(new Uri(infofile), "local.tmmp");
}
catch (Exception)
{
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x2.png";
label1.Text = "無法檢查資訊";
label2.Text = "請確認網路連接是否中斷。";
Btn_http.Text = "請重新開啟本程式";
MessageBox.Show("檢查資訊發生錯誤,請重新啟動本程式。", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
label3.Text= string.Format("版本{0}R-[Cyberlink_Productions]",Assembly.GetExecutingAssembly().GetName().Version.ToString());
label1.Text = "正在檢查資訊";
}
string code = "";//電腦識別碼2(除了mac address 之外的)
public static bool a;
private void infosynced (object sender, AsyncCompletedEventArgs e)
{
ArrayList list = new ArrayList();
string[] urls= { "" };
try
{
StreamReader urlread = new StreamReader("local.tmmp");
string temp1 = "";
while (temp1 != "<6A3C556A-9F4E-487C-AE78-B584C605ED1D>")
{
temp1 = urlread.ReadLine();
}
string temp2 = "";
while (temp2 != "</6A3C556A-9F4E-487C-AE78-B584C605ED1D>")
{
temp2 = urlread.ReadLine();
if (temp2 != "</6A3C556A-9F4E-487C-AE78-B584C605ED1D>")
{
list.Add(temp2);
}
}
urls = new string[list.Count];
list.CopyTo(urls);
urlread.Close();
FileInfo k = new FileInfo("local.tmmp");
k.Delete();
}
catch (Exception)
{
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x2.png";
label1.Text = "無法檢查資訊";
label2.Text = "請確認網路連接是否中斷。";
MessageBox.Show("檢查資訊發生錯誤,請重新啟動本程式。若問題持續發生,請回報給我們,謝謝。", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
try
{
for (int i = 0; i <= ((list.Count) - 1); i++)
{
if (macList == urls[i])
{
code = urls[i + 1];
string chkinfotmp = "";
recheck:
StreamReader checkfile = new StreamReader("APPMANIFEST.DLL");
chkinfotmp = checkfile.ReadLine();
checkfile.Close();
if (chkinfotmp == code)
{
label1.Text = " 已獲得授權";
label2.Text = " 您可以安裝正版軟體";
Btn_http.Enabled = true;
groupBox1.Visible = true;
groupBox1.Enabled = true;
button4.Visible = false;
timer1.Enabled = false;
textBox1.BackColor = Color.Green;
label3.ForeColor = Color.White;
label3.BackColor = Color.Green;
pictureBox1.ImageLocation = @"Resources\x3.png";
break;
}
else
{
MessageBox.Show("您的電腦已成功被註冊,但您可能尚未輸入認證碼或是有輸入錯誤,請嘗試正確輸入您收到的認證碼,以完成驗證。若有問題請聯絡我們。", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
codeinput fs = new codeinput();
fs.ShowDialog();
if (a == true)
{
goto recheck;
}
button4.Visible = true;
button3.Visible = true;
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x1.png";
label1.Text = " 未獲得授權";
label2.Text = " 您已可以使用試用版";
MessageBox.Show("您的電腦尚未註冊使用正版,若要安裝這個應用程式的正版,請按下「顯示MCode」按鈕,並將此碼以郵寄或其他方式傳送給 trusaidlin@gmail.com 開發人員。若申請成功,我們將會通知您。", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
break;
}
}
else if (i == ((list.Count) - 1))
{
button4.Visible = true;
button3.Visible = true;
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x1.png";
label1.Text = " 未獲得授權";
label2.Text = " 您已可以使用試用版";
MessageBox.Show("您的電腦尚未註冊使用正版,若要安裝這個應用程式的正版,請按下「顯示MCode」按鈕,並將此碼以郵寄或其他方式傳送給 trusaidlin@gmail.com 開發人員。若申請成功,我們將會通知您。", "", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
}
}
catch (Exception)
{
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x2.png";
label1.Text = "無法檢查資訊";
label2.Text = "無法正確的辨識您的身分。";
MessageBox.Show("檢查資訊發生錯誤,請重新啟動本程式。若問題持續發生,請回報給我們,謝謝。代碼(K)", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void Btn_http_Click(object sender, EventArgs e)
{
Btn_http.Enabled = false;
groupBox1.Enabled = false;
Btn_http.Text = "請稍候...";
label1.Text = "正在下載檔案";
label2.Text = " 您可以繼續使用電腦";
timer1.Enabled = true;
try
{
label5.Text = "進度 0/4";
mainWebClient1.DownloadFileCompleted += new AsyncCompletedEventHandler(Http_Completed1);
mainWebClient1.DownloadFileAsync(new Uri(reallink1), @"Resources\PACK-CLDS\CLDS6_pack.part1.exe");
}
catch (Exception)
{
timer1.Enabled = false;
label1.Text = "安裝遭到終止";
label2.Text = " 發生A錯誤導致安裝中斷。";
Btn_http.Text = "請重新開啟本程式";
pictureBox1.ImageLocation = @"Resources\x2.png";
}
}
private void Http_Completed1(object sender, AsyncCompletedEventArgs e)
{
try
{
label5.Text = "進度 1/4";
mainWebClient2.DownloadFileCompleted += new AsyncCompletedEventHandler(Http_Completed2);
mainWebClient2.DownloadFileAsync(new Uri(reallink2), @"Resources\PACK-CLDS\CLDS6_pack.part2.rar");
}
catch (Exception)
{
timer1.Enabled = false;
label1.Text = "安裝遭到終止";
label2.Text = " 發生A錯誤導致安裝中斷。";
Btn_http.Text = "請重新開啟本程式";
pictureBox1.ImageLocation = @"Resources\x2.png";
}
}
private void Http_Completed2(object sender, AsyncCompletedEventArgs e)
{
try
{
label5.Text = "進度 2/4";
mainWebClient3.DownloadFileCompleted += new AsyncCompletedEventHandler(Http_Completed3);
mainWebClient3.DownloadFileAsync(new Uri(reallink3), @"Resources\PACK-CLDS\CLDS6_pack.part3.rar");
}
catch (Exception)
{
timer1.Enabled = false;
label1.Text = "安裝遭到終止";
label2.Text = " 發生A錯誤導致安裝中斷。";
Btn_http.Text = "請重新開啟本程式";
pictureBox1.ImageLocation = @"Resources\x2.png";
}
}
private void Http_Completed3(object sender, AsyncCompletedEventArgs e)
{
try
{
label5.Text = "進度 3/4";
mainWebClient4.DownloadFileCompleted += new AsyncCompletedEventHandler(Http_Completed4);
mainWebClient4.DownloadFileAsync(new Uri(reallink4), @"Resources\PACK-CLDS\CLDS6_pack.part4.rar");
}
catch (Exception)
{
timer1.Enabled = false;
label1.Text = "安裝遭到終止";
label2.Text = " 發生A錯誤導致安裝中斷。";
Btn_http.Text = "請重新開啟本程式";
pictureBox1.ImageLocation = @"Resources\x2.png";
}
}
private void Http_ProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
}
private void Http_Completed4(object sender, AsyncCompletedEventArgs e)
{
timer1.Enabled = false;
Btn_http.Enabled = false;
groupBox1.Enabled = false;
try
{
label5.Text = "";
Process p = new Process();
p.StartInfo.FileName = (@"Resources\PACK-CLDS\CLDS6_pack.part1.exe");
p.StartInfo.CreateNoWindow = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
p.Start();
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x3.png";
p.Close();
label1.Text = " 已獲得授權";
label2.Text = " 您可以安裝正版軟體";
//Btn_http.Enabled = true;
groupBox1.Enabled = true;
Btn_http.Text = "已下載完成";
}
catch (Exception)
{
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x2.png";
Btn_http.Text = "請重新開啟本程式";
label1.Text = "安裝遭到終止";
label2.Text = " 發生F錯誤導致安裝中斷。";
MessageBox.Show("執行套件時發生錯誤,請再試一次。若問題持續發生,請回報給我們,謝謝。", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
string macList = "";
private void button4_Click(object sender, EventArgs e)
{
NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
foreach (var nic in nics)
{
if (nic.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
{
macList = nic.GetPhysicalAddress().ToString();
}
}
MessageBox.Show("您的MCode是: "+ "CLDS6DR-"+macList + "MCSDD-G"+" ,請將此碼傳送至trusaidlin@gmail.com以獲得認證,謝謝。","MCode");
}
WebClient crackdl = new WebClient();
private void crackdl_Completed(object sender, AsyncCompletedEventArgs e)
{
timer1.Enabled = false;
button1.Enabled = false;
try
{
ProcessStartInfo Info2 = new ProcessStartInfo();
Info2.FileName = "cracker.bat";//執行的檔案名稱
Info2.WorkingDirectory = @"Resources\";//檔案所在的目錄
Process.Start(Info2);//
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x3.png";
label1.Text = " 已獲得授權";
label2.Text = " 您可以安裝正版軟體";
button1.Enabled = true;
Btn_http.Enabled = true;
button1.Text = "破解";
}
catch (Exception)
{
timer1.Enabled = false;
pictureBox1.ImageLocation = @"Resources\x2.png";
Btn_http.Text = "請重新開啟本程式";
label1.Text = "破解遭到終止";
label2.Text = " 發生H錯誤導致破解中斷。";
MessageBox.Show("執行套件時發生錯誤,請再試一次。若問題持續發生,請回報給我們,謝謝。", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
Btn_http.Enabled = false;
button1.Text = "請稍候...";
label1.Text = "正在啟動破解";
label2.Text = " 正在連結到破解程序";
timer1.Enabled = true;
try
{
crackdl.DownloadFileCompleted += new AsyncCompletedEventHandler(crackdl_Completed);
crackdl.DownloadFileAsync(new Uri(cracklink), @"Resources\cracker.bat");
}
catch (Exception)
{
timer1.Enabled = false;
label1.Text = "破解遭到終止";
label2.Text = " 發生G錯誤導致破解中斷。";
Btn_http.Text = "請重新開啟本程式";
pictureBox1.ImageLocation = @"Resources\x2.png";
}
}
private void downloadmanager_FormClosed(object sender, FormClosedEventArgs e)
{
try
{
FileInfo a = new FileInfo(@"Resources\cracker.bat");
a.Delete();
}
catch (Exception) { }
try
{
FileInfo b1 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part1.exe");
b1.Delete();
FileInfo b2 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part2.rar");
b2.Delete();
FileInfo b3 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part3.rar");
b3.Delete();
FileInfo b4 = new FileInfo(@"Resources\PACK-CLDS\CLDS6_pack.part4.rar");
b4.Delete();
}
catch (Exception) { }
try
{
FileInfo c = new FileInfo("local.tmmp");
c.Delete();
}
catch (Exception) { }
}
private void button3_Click(object sender, EventArgs e)
{
try
{
ProcessStartInfo Info2 = new ProcessStartInfo();
Info2.FileName = "CLDS6TRail.exe";//執行的檔案名稱
Info2.WorkingDirectory = @"Resources\";//檔案所在的目錄
Process.Start(Info2);
}
catch (Exception)
{
MessageBox.Show("安裝封包損毀,請重新安裝本程式。", "錯誤", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void button2_Click(object sender, EventArgs e)
{
activationkey a = new activationkey();
a.ShowDialog();
}
}
}