├── README.md
├── RiseLauncher.sln
└── RiseLauncher
├── FodyWeavers.xml
├── FodyWeavers.xsd
├── FormMain.cs
├── FormMain.resx
├── Program.cs
├── Properties
├── AssemblyInfo.cs
├── Resources.Designer.cs
├── Resources.resx
├── Settings.Designer.cs
└── Settings.settings
├── Resources
├── icon.bmp
└── logo-215.bmp
├── RiseLauncher.csproj
├── UtilFile.cs
├── UtilJava.cs
├── UtilRAM.cs
├── app.config
├── icon.ico
└── packages.config
/README.md:
--------------------------------------------------------------------------------
1 | # zort
2 |
3 | + Eğer beni savciliga vereceksen
4 | + 1 - ozur dılerim
5 | + 2 - bida olmaz
6 |
7 | Bağırsaklarım dolu bok yok saol karnım tok.
8 |
9 |
10 |
11 | # [ Cracked Craft Rise Launcher (the exe one) ]
12 | + I made this buildable because i was bored and it was not obfuscated, so it just for fun. It is the launcher which opens the "launcher.jar" so actually it does nothing.
13 |
14 | # [ info ]
15 |
16 |
17 |
18 | + Dear Craftrise developers, zort. (If you dmca that means you cope, and it will just be reposted by others so no point.)
19 |
20 |
2 |
3 |
--------------------------------------------------------------------------------
/RiseLauncher/FodyWeavers.xsd:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
13 |
14 |
15 |
16 |
17 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
18 |
19 |
20 |
21 |
22 | A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks
23 |
24 |
25 |
26 |
27 | A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.
28 |
29 |
30 |
31 |
32 | A list of unmanaged 32 bit assembly names to include, delimited with line breaks.
33 |
34 |
35 |
36 |
37 | A list of unmanaged 64 bit assembly names to include, delimited with line breaks.
38 |
39 |
40 |
41 |
42 | The order of preloaded assemblies, delimited with line breaks.
43 |
44 |
45 |
46 |
47 |
48 | This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.
49 |
50 |
51 |
52 |
53 | Controls if .pdbs for reference assemblies are also embedded.
54 |
55 |
56 |
57 |
58 | Controls if runtime assemblies are also embedded.
59 |
60 |
61 |
62 |
63 | Controls whether the runtime assemblies are embedded with their full path or only with their assembly name.
64 |
65 |
66 |
67 |
68 | Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.
69 |
70 |
71 |
72 |
73 | As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.
74 |
75 |
76 |
77 |
78 | Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.
79 |
80 |
81 |
82 |
83 | Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.
84 |
85 |
86 |
87 |
88 | A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
89 |
90 |
91 |
92 |
93 | A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.
94 |
95 |
96 |
97 |
98 | A list of runtime assembly names to exclude from the default action of "embed all Copy Local references", delimited with |
99 |
100 |
101 |
102 |
103 | A list of runtime assembly names to include from the default action of "embed all Copy Local references", delimited with |.
104 |
105 |
106 |
107 |
108 | A list of unmanaged 32 bit assembly names to include, delimited with |.
109 |
110 |
111 |
112 |
113 | A list of unmanaged 64 bit assembly names to include, delimited with |.
114 |
115 |
116 |
117 |
118 | The order of preloaded assemblies, delimited with |.
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 | 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
127 |
128 |
129 |
130 |
131 | A comma-separated list of error codes that can be safely ignored in assembly verification.
132 |
133 |
134 |
135 |
136 | 'false' to turn off automatic generation of the XML Schema file.
137 |
138 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/RiseLauncher/FormMain.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using System.Diagnostics;
4 | using System.Drawing;
5 | using System.IO;
6 | using System.Net;
7 | using System.Runtime.CompilerServices;
8 | using System.Text;
9 | using System.Threading;
10 | using System.Windows.Forms;
11 | using Ionic.Zip;
12 | using Microsoft.CSharp.RuntimeBinder;
13 | using Newtonsoft.Json;
14 | using Newtonsoft.Json.Linq;
15 | using RiseLauncher.Properties;
16 |
17 | namespace RiseLauncher
18 | {
19 | public class FormMain : Form
20 | {
21 | public FormMain()
22 | {
23 | base.FormBorderStyle = FormBorderStyle.None;
24 | this.InitializeComponent();
25 | }
26 |
27 | public static string Base64Encode(string plainText)
28 | {
29 | byte[] bytes = Encoding.UTF8.GetBytes(plainText);
30 | return Convert.ToBase64String(bytes);
31 | }
32 |
33 | public void updateText(string text)
34 | {
35 | try
36 | {
37 | bool invokeRequired = this.statusText.InvokeRequired;
38 | if (invokeRequired)
39 | {
40 | this.statusText.Invoke(new Action(delegate ()
41 | {
42 | this.statusText.Text = text;
43 | }));
44 | }
45 | else
46 | {
47 | this.statusText.Text = text;
48 | }
49 | }
50 | catch (Exception ex)
51 | {
52 | Console.WriteLine(ex.ToString());
53 | }
54 | }
55 |
56 | public void start()
57 | {
58 | bool datasFromSite = this.getDatasFromSite();
59 | bool flag = !datasFromSite;
60 | if (flag)
61 | {
62 | bool flag2 = this.loadDatasFromCache();
63 | bool flag3 = !flag2;
64 | if (flag3)
65 | {
66 | this.updateText("CraftRise sunucularına bağlanılamıyor.");
67 | return;
68 | }
69 | }
70 | this.updateText("Java sürümü kontrol ediliyor...");
71 | bool flag4 = this.isJavaInstalled();
72 | bool flag5 = !flag4;
73 | if (flag5)
74 | {
75 | this.updateText("Java yükleniyor...");
76 | bool flag6 = !this.DownloadJava();
77 | if (flag6)
78 | {
79 | this.updateText("Java yükleme işlemi başarısız, antivirüs aktif ise kapatın.");
80 | }
81 | else
82 | {
83 | this.updateText("Java dosyaları çıkartılıyor...");
84 | string cacheLZMAFile = this.getCacheLZMAFile();
85 | string cacheLZMAFileZip = this.getCacheLZMAFileZip();
86 | bool flag7 = UtilFile.DecompressLZMA(cacheLZMAFile, cacheLZMAFileZip);
87 | bool flag8 = !flag7;
88 | if (flag8)
89 | {
90 | this.updateText("Java kurulum işlemi başarısız, antivirüs aktif ise kapatın.");
91 | }
92 | else
93 | {
94 | try
95 | {
96 | ZipFile zipFile = new ZipFile(cacheLZMAFileZip);
97 | zipFile.ExtractAll(UtilJava.getJavaFolderPath());
98 | zipFile.Dispose();
99 | }
100 | catch (Exception ex)
101 | {
102 | Console.WriteLine(ex.ToString());
103 | this.updateText("Java kurulum işlemi başarısız, antivirüs aktif ise kapatın.");
104 | return;
105 | }
106 | bool flag9 = File.Exists(this.getCacheLZMAFile());
107 | if (flag9)
108 | {
109 | File.Delete(this.getCacheLZMAFile());
110 | }
111 | bool flag10 = File.Exists(this.getCacheLZMAFileZip());
112 | if (flag10)
113 | {
114 | File.Delete(this.getCacheLZMAFileZip());
115 | }
116 | this.updateText("Java kuruldu, sürüm kontrolü yapılıyor...");
117 | string currentJavaVersion = UtilJava.getCurrentJavaVersion();
118 | string mojangJavaVersion = this.getMojangJavaVersion();
119 | bool flag11 = currentJavaVersion == null || !currentJavaVersion.Equals(mojangJavaVersion);
120 | if (flag11)
121 | {
122 | this.updateText("Sürüm kontrolü başarısız, sürüm geçersiz. (007)");
123 | }
124 | this.checkLauncherFile();
125 | }
126 | }
127 | }
128 | else
129 | {
130 | this.checkLauncherFile();
131 | }
132 | }
133 |
134 | private bool getDatasFromSite()
135 | {
136 | bool flag = true;
137 | int num = 3;
138 | int num2 = 0;
139 | string content = this.getContent(FormMain.API_URL);
140 | while (content == null || string.IsNullOrEmpty(content))
141 | {
142 | content = this.getContent(FormMain.API_URL);
143 | bool flag2 = content == null || string.IsNullOrEmpty(content);
144 | if (!flag2)
145 | {
146 | flag = true;
147 | break;
148 | }
149 | try
150 | {
151 | Thread.Sleep(3000);
152 | }
153 | catch (Exception ex)
154 | {
155 | Console.WriteLine(ex.ToString());
156 | }
157 | flag = false;
158 | bool flag3 = num2++ >= num;
159 | if (flag3)
160 | {
161 | break;
162 | }
163 | }
164 | bool flag4 = !flag;
165 | bool result;
166 | if (flag4)
167 | {
168 | result = flag;
169 | }
170 | else
171 | {
172 | try
173 | {
174 | JObject api_JSON = JObject.Parse(content);
175 | FormMain.API_JSON = api_JSON;
176 | }
177 | catch (Exception ex2)
178 | {
179 | Console.WriteLine(ex2.ToString());
180 | return false;
181 | }
182 | string content2 = this.getContent(this.getSelectedJavaURL());
183 | bool flag5 = content2 == null || string.IsNullOrEmpty(content2);
184 | if (flag5)
185 | {
186 | result = false;
187 | }
188 | else
189 | {
190 | try
191 | {
192 | JObject mojang_JSON = JObject.Parse(content2);
193 | FormMain.MOJANG_JSON = mojang_JSON;
194 | }
195 | catch (Exception ex3)
196 | {
197 | Console.WriteLine(ex3.ToString());
198 | return false;
199 | }
200 | this.updateJSONCache(content, content2);
201 | result = true;
202 | }
203 | }
204 | return result;
205 | }
206 |
207 | private bool loadDatasFromCache()
208 | {
209 | bool result;
210 | try
211 | {
212 | string text = File.ReadAllText(this.getHashFileCache());
213 | string text2 = File.ReadAllText(this.getJavaFileCache());
214 | try
215 | {
216 | JObject api_JSON = JObject.Parse(text);
217 | FormMain.API_JSON = api_JSON;
218 | }
219 | catch (Exception ex)
220 | {
221 | Console.WriteLine(ex.ToString());
222 | return false;
223 | }
224 | try
225 | {
226 | JObject mojang_JSON = JObject.Parse(text2);
227 | FormMain.MOJANG_JSON = mojang_JSON;
228 | }
229 | catch (Exception ex2)
230 | {
231 | Console.WriteLine(ex2.ToString());
232 | return false;
233 | }
234 | result = (FormMain.API_JSON != null && FormMain.MOJANG_JSON != null && FormMain.API_JSON.Count > 0 && FormMain.MOJANG_JSON.Count > 0);
235 | }
236 | catch (Exception ex3)
237 | {
238 | result = false;
239 | }
240 | return result;
241 | }
242 |
243 | private void updateJSONCache(string hashs, string java)
244 | {
245 | try
246 | {
247 | try
248 | {
249 | File.Delete(this.getHashFileCache());
250 | File.Delete(this.getJavaFileCache());
251 | }
252 | catch (Exception ex)
253 | {
254 | }
255 | File.WriteAllText(this.getHashFileCache(), hashs);
256 | File.WriteAllText(this.getJavaFileCache(), java);
257 | }
258 | catch (Exception ex2)
259 | {
260 | }
261 | }
262 |
263 | private void checkLauncherFile()
264 | {
265 | this.updateText("Launcher için güncelleme kontrolü yapılıyor...");
266 | string webLauncherHash = this.getWebLauncherHash();
267 | string hashFile = UtilFile.getHashFile(this.getLauncherFile());
268 | bool flag = !hashFile.Equals(webLauncherHash);
269 | if (flag)
270 | {
271 | bool flag2 = this.DownloadLauncherJAR();
272 | bool flag3 = !flag2;
273 | if (flag3)
274 | {
275 | this.updateText("Launcher indirilemedi, tekrar deneyin.");
276 | return;
277 | }
278 | }
279 | this.startLauncher();
280 | }
281 |
282 | private void startLauncher()
283 | {
284 | this.updateText("Launcher başlatılıyor...");
285 | int num = 512;
286 | try
287 | {
288 | int ram = UtilRAM.getRam();
289 | bool flag = ram > 2;
290 | if (flag)
291 | {
292 | num = ram * 256;
293 | bool flag2 = num > 4096;
294 | if (flag2)
295 | {
296 | num = 4096;
297 | }
298 | }
299 | }
300 | catch (Exception ex)
301 | {
302 | Console.WriteLine(ex.ToString());
303 | }
304 | string text = this.getStartArguments();
305 | try
306 | {
307 | text = text.Replace("%selectedRAM%", num.ToString());
308 | }
309 | catch (Exception ex2)
310 | {
311 | Console.WriteLine(ex2.ToString());
312 | this.updateText("RAM değerleri güncellenemedi, bir hata mevcut.");
313 | }
314 |
315 | try
316 | {
317 | Process.Start(new ProcessStartInfo
318 | {
319 | FileName = UtilJava.getJavaWExePath(),
320 | Arguments = text + " -jar launcher.jar launcherStartup",
321 | WorkingDirectory = UtilJava.getLauncherFolderPath(),
322 | UseShellExecute = false,
323 | CreateNoWindow = true
324 | });
325 | }
326 | catch (Exception ex3)
327 | {
328 | Console.WriteLine(ex3.ToString());
329 | this.updateText("Launcher başlatılamadı, tekrar deneyin.");
330 | return;
331 | }
332 | Thread.Sleep(1000);
333 | Environment.Exit(0);
334 | }
335 |
336 | private string getWebLauncherHash()
337 | {
338 | JObject jobject = (JObject)FormMain.API_JSON.GetValue("MAIN");
339 | return (string)jobject.GetValue("launcher.jar");
340 | }
341 |
342 | private string getWebLauncherURL()
343 | {
344 | JObject jobject = (JObject)FormMain.API_JSON.GetValue("WINDOWS_BS");
345 | return (string)jobject.GetValue("launcherURL");
346 | }
347 |
348 | public static string getSelectedJavaType()
349 | {
350 | JObject jobject = (JObject)FormMain.API_JSON.GetValue("WINDOWS_BS");
351 | return (string)jobject.GetValue("javaType");
352 | }
353 |
354 | private string getSelectedJavaURL()
355 | {
356 | JObject jobject = (JObject)FormMain.API_JSON.GetValue("WINDOWS_BS");
357 | return (string)jobject.GetValue("javaURL");
358 | }
359 |
360 | private string getStartArguments()
361 | {
362 | JObject jobject = (JObject)FormMain.API_JSON.GetValue("WINDOWS_BS");
363 | return (string)jobject.GetValue("startArguments");
364 | }
365 |
366 | private string getContent(string URL)
367 | {
368 | string result;
369 | try
370 | {
371 | WebClient webClient = new WebClient();
372 | result = webClient.DownloadString(URL);
373 | }
374 | catch (Exception ex)
375 | {
376 | Console.WriteLine(ex.ToString());
377 | result = null;
378 | }
379 | return result;
380 | }
381 |
382 | private string getMojangJavaURL()
383 | {
384 | JObject jobject = (JObject)FormMain.MOJANG_JSON.GetValue("windows");
385 | JObject jobject2 = (JObject)jobject.GetValue(Environment.Is64BitOperatingSystem ? "64" : "32");
386 | JObject jobject3 = (JObject)jobject2.GetValue(FormMain.getSelectedJavaType());
387 | return (string)jobject3.GetValue("url");
388 | }
389 |
390 | private string getMojangJavaKey()
391 | {
392 | JObject jobject = (JObject)FormMain.MOJANG_JSON.GetValue("windows");
393 | JObject jobject2 = (JObject)jobject.GetValue(Environment.Is64BitOperatingSystem ? "64" : "32");
394 | JObject jobject3 = (JObject)jobject2.GetValue(FormMain.getSelectedJavaType());
395 | return (string)jobject3.GetValue("sha1");
396 | }
397 |
398 | private string getMojangJavaVersion()
399 | {
400 | JObject jobject = (JObject)FormMain.MOJANG_JSON.GetValue("windows");
401 | JObject jobject2 = (JObject)jobject.GetValue(Environment.Is64BitOperatingSystem ? "64" : "32");
402 | JObject jobject3 = (JObject)jobject2.GetValue(FormMain.getSelectedJavaType());
403 | return (string)jobject3.GetValue("version");
404 | }
405 |
406 | private bool isJavaInstalled()
407 | {
408 | string mojangJavaVersion = this.getMojangJavaVersion();
409 | string currentJavaVersion = UtilJava.getCurrentJavaVersion();
410 | bool flag = currentJavaVersion == null || !currentJavaVersion.Equals(mojangJavaVersion);
411 | return !flag;
412 | }
413 |
414 | private string getLauncherFile()
415 | {
416 | return UtilJava.getLauncherFolderPath() + "launcher.jar";
417 | }
418 |
419 | private string getHashFileCache()
420 | {
421 | return UtilJava.getLauncherFolderPath() + "launcher_hashs.json";
422 | }
423 |
424 | private string getJavaFileCache()
425 | {
426 | return UtilJava.getLauncherFolderPath() + "launcher_java.json";
427 | }
428 |
429 | private string getCacheLZMAFile()
430 | {
431 | return UtilJava.getLauncherFolderPath() + "java.lzma";
432 | }
433 |
434 | private string getCacheLZMAFileZip()
435 | {
436 | return UtilJava.getLauncherFolderPath() + "java.zip";
437 | }
438 |
439 | private bool DownloadJava()
440 | {
441 | bool result;
442 | try
443 | {
444 | string cacheLZMAFile = this.getCacheLZMAFile();
445 | try
446 | {
447 | bool flag = File.Exists(cacheLZMAFile);
448 | if (flag)
449 | {
450 | File.Delete(cacheLZMAFile);
451 | }
452 | bool flag2 = File.Exists(this.getCacheLZMAFileZip());
453 | if (flag2)
454 | {
455 | File.Delete(this.getCacheLZMAFileZip());
456 | }
457 | DirectoryInfo directory = new DirectoryInfo(UtilJava.getJavaMainFolderPath());
458 | directory.ClearFolder();
459 | bool flag3 = !Directory.Exists(UtilJava.getJavaMainFolderPath());
460 | if (flag3)
461 | {
462 | Directory.CreateDirectory(UtilJava.getJavaMainFolderPath());
463 | }
464 | bool flag4 = !Directory.Exists(UtilJava.getJavaFolderPath());
465 | if (flag4)
466 | {
467 | Directory.CreateDirectory(UtilJava.getJavaFolderPath());
468 | }
469 | }
470 | catch (Exception ex)
471 | {
472 | Console.WriteLine(ex.ToString());
473 | }
474 | this.updateText("Java indiriliyor...");
475 | using (WebClient webClient = new WebClient())
476 | {
477 | Uri address = new Uri(this.getMojangJavaURL());
478 | webClient.DownloadProgressChanged += this.javaDownload;
479 | webClient.DownloadFileCompleted += this.WebClientDownloadCompleted;
480 | webClient.DownloadFile(address, cacheLZMAFile);
481 | bool flag5 = File.Exists(cacheLZMAFile);
482 | if (flag5)
483 | {
484 | this.updateText("Java indirildi, dosya kontrol ediliyor...");
485 | string hashFile = UtilFile.getHashFile(this.getCacheLZMAFile());
486 | string mojangJavaKey = this.getMojangJavaKey();
487 | bool flag6 = !hashFile.Equals(mojangJavaKey);
488 | if (flag6)
489 | {
490 | this.updateText("Java indirilemedi, lütfen tekrar deneyin.");
491 | result = false;
492 | }
493 | else
494 | {
495 | result = true;
496 | }
497 | }
498 | else
499 | {
500 | result = false;
501 | }
502 | }
503 | }
504 | catch (Exception ex2)
505 | {
506 | Console.WriteLine(ex2.ToString());
507 | result = false;
508 | }
509 | return result;
510 | }
511 |
512 | private bool DownloadLauncherJAR()
513 | {
514 | bool result;
515 | try
516 | {
517 | string launcherFile = this.getLauncherFile();
518 | bool flag = File.Exists(launcherFile);
519 | if (flag)
520 | {
521 | File.Delete(launcherFile);
522 | }
523 | this.updateText("Launcher indiriliyor...");
524 | using (WebClient webClient = new WebClient())
525 | {
526 | Uri address = new Uri(this.getWebLauncherURL());
527 | webClient.DownloadProgressChanged += this.LauncherDownload;
528 | webClient.DownloadFileCompleted += this.WebClientDownloadCompleted;
529 | webClient.DownloadFile(address, launcherFile);
530 | bool flag2 = File.Exists(launcherFile);
531 | if (flag2)
532 | {
533 | this.updateText("Launcher indirildi, dosya kontrol ediliyor...");
534 | string hashFile = UtilFile.getHashFile(this.getLauncherFile());
535 | string webLauncherHash = this.getWebLauncherHash();
536 | bool flag3 = !hashFile.Equals(webLauncherHash);
537 | if (flag3)
538 | {
539 | this.updateText("Launcher indirilemedi, lütfen tekrar deneyin.");
540 | result = false;
541 | }
542 | else
543 | {
544 | result = true;
545 | }
546 | }
547 | else
548 | {
549 | result = false;
550 | }
551 | }
552 | }
553 | catch (Exception ex)
554 | {
555 | Console.WriteLine(ex.ToString());
556 | result = false;
557 | }
558 | return result;
559 | }
560 |
561 | private void javaDownload(object sender, DownloadProgressChangedEventArgs e)
562 | {
563 | this.updateText("Java indiriliyor... (%" + e.ProgressPercentage.ToString() + ")");
564 | }
565 |
566 | private void LauncherDownload(object sender, DownloadProgressChangedEventArgs e)
567 | {
568 | this.updateText("Launcher indiriliyor... (%" + e.ProgressPercentage.ToString() + ")");
569 | }
570 |
571 | private void WebClientDownloadCompleted(object sender, AsyncCompletedEventArgs args)
572 | {
573 | }
574 |
575 | private void pictureBox1_Click(object sender, EventArgs e)
576 | {
577 | }
578 |
579 | protected override void Dispose(bool disposing)
580 | {
581 | bool flag = disposing && this.components != null;
582 | if (flag)
583 | {
584 | this.components.Dispose();
585 | }
586 | base.Dispose(disposing);
587 | }
588 |
589 | private void InitializeComponent()
590 | {
591 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormMain));
592 | this.statusText = new System.Windows.Forms.Label();
593 | this.pictureBox1 = new System.Windows.Forms.PictureBox();
594 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
595 | this.SuspendLayout();
596 | //
597 | // statusText
598 | //
599 | this.statusText.Font = new System.Drawing.Font("Arial", 12F);
600 | this.statusText.ForeColor = System.Drawing.SystemColors.ButtonHighlight;
601 | this.statusText.Location = new System.Drawing.Point(12, 277);
602 | this.statusText.Name = "statusText";
603 | this.statusText.Size = new System.Drawing.Size(360, 28);
604 | this.statusText.TabIndex = 0;
605 | this.statusText.Text = "Java sürümü kontrol ediliyor...";
606 | this.statusText.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
607 | this.statusText.UseCompatibleTextRendering = true;
608 | //
609 | // pictureBox1
610 | //
611 | this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
612 | this.pictureBox1.Location = new System.Drawing.Point(112, 61);
613 | this.pictureBox1.Margin = new System.Windows.Forms.Padding(0);
614 | this.pictureBox1.Name = "pictureBox1";
615 | this.pictureBox1.Size = new System.Drawing.Size(158, 170);
616 | this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
617 | this.pictureBox1.TabIndex = 1;
618 | this.pictureBox1.TabStop = false;
619 | //
620 | // FormMain
621 | //
622 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
623 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
624 | this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(38)))), ((int)(((byte)(38)))), ((int)(((byte)(38)))));
625 | this.ClientSize = new System.Drawing.Size(384, 361);
626 | this.ControlBox = false;
627 | this.Controls.Add(this.pictureBox1);
628 | this.Controls.Add(this.statusText);
629 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
630 | this.Name = "FormMain";
631 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
632 | this.Text = "CrackedRise Launcher";
633 | this.TopMost = true;
634 | ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
635 | this.ResumeLayout(false);
636 |
637 | }
638 |
639 | public static string API_URL = "https://client.craftrise.network/api/launcher/hashs.php";
640 |
641 | public static JObject API_JSON;
642 |
643 | public static JObject MOJANG_JSON;
644 |
645 | private IContainer components = null;
646 |
647 | private Label statusText;
648 |
649 | private PictureBox pictureBox1;
650 |
651 | }
652 | }
653 |
--------------------------------------------------------------------------------
/RiseLauncher/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Threading;
3 | using System.Windows.Forms;
4 |
5 | namespace RiseLauncher
6 | {
7 | internal static class Program
8 | {
9 | [STAThread]
10 | private static void Main()
11 | {
12 | Application.EnableVisualStyles();
13 | Application.SetCompatibleTextRenderingDefault(false);
14 | FormMain form = new FormMain();
15 | new Thread(delegate()
16 | {
17 | form.start();
18 | })
19 | {
20 | IsBackground = false
21 | }.Start();
22 | Application.Run(form);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/RiseLauncher/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | [assembly: AssemblyVersion("1.0.0.0")]
6 | [assembly: CompilationRelaxations(8)]
7 | [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
8 |
9 | [assembly: AssemblyTitle("CrackedRise Launcher")]
10 | [assembly: AssemblyDescription("CrackedRise Launcher")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany(":)")]
13 | [assembly: AssemblyProduct("CrackedRise Launcher")]
14 | [assembly: AssemblyCopyright(":) - Copyright © 2021")]
15 | [assembly: AssemblyTrademark("CrackedRise")]
16 | [assembly: ComVisible(false)]
17 | [assembly: Guid("87b519b0-9e5c-4946-9424-fe62b364e0fc")]
18 | [assembly: AssemblyFileVersion("1.0.0.1")]
19 |
20 |
--------------------------------------------------------------------------------
/RiseLauncher/Properties/Resources.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace RiseLauncher.Properties {
12 | using System;
13 |
14 |
15 | ///
16 | /// A strongly-typed resource class, for looking up localized strings, etc.
17 | ///
18 | // This class was auto-generated by the StronglyTypedResourceBuilder
19 | // class via a tool like ResGen or Visual Studio.
20 | // To add or remove a member, edit your .ResX file then rerun ResGen
21 | // with the /str option, or rebuild your VS project.
22 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
23 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
24 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
25 | internal class Resources {
26 |
27 | private static global::System.Resources.ResourceManager resourceMan;
28 |
29 | private static global::System.Globalization.CultureInfo resourceCulture;
30 |
31 | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
32 | internal Resources() {
33 | }
34 |
35 | ///
36 | /// Returns the cached ResourceManager instance used by this class.
37 | ///
38 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
39 | internal static global::System.Resources.ResourceManager ResourceManager {
40 | get {
41 | if (object.ReferenceEquals(resourceMan, null)) {
42 | global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("RiseLauncher.Properties.Resources", typeof(Resources).Assembly);
43 | resourceMan = temp;
44 | }
45 | return resourceMan;
46 | }
47 | }
48 |
49 | ///
50 | /// Overrides the current thread's CurrentUICulture property for all
51 | /// resource lookups using this strongly typed resource class.
52 | ///
53 | [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
54 | internal static global::System.Globalization.CultureInfo Culture {
55 | get {
56 | return resourceCulture;
57 | }
58 | set {
59 | resourceCulture = value;
60 | }
61 | }
62 |
63 | ///
64 | /// Looks up a localized resource of type System.Drawing.Bitmap.
65 | ///
66 | internal static System.Drawing.Bitmap icon {
67 | get {
68 | object obj = ResourceManager.GetObject("icon", resourceCulture);
69 | return ((System.Drawing.Bitmap)(obj));
70 | }
71 | }
72 |
73 | ///
74 | /// Looks up a localized resource of type System.Drawing.Bitmap.
75 | ///
76 | internal static System.Drawing.Bitmap logo_215 {
77 | get {
78 | object obj = ResourceManager.GetObject("logo_215", resourceCulture);
79 | return ((System.Drawing.Bitmap)(obj));
80 | }
81 | }
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/RiseLauncher/Properties/Resources.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
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 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 |
122 | ..\Resources\icon.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
123 |
124 |
125 | ..\Resources\logo-215.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
126 |
127 |
--------------------------------------------------------------------------------
/RiseLauncher/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace RiseLauncher.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/RiseLauncher/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/RiseLauncher/Resources/icon.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgalarCrack/CrackedRiseExeLauncher-Buildable-SRC/408cae151200d7419d62193374d1e68d36820504/RiseLauncher/Resources/icon.bmp
--------------------------------------------------------------------------------
/RiseLauncher/Resources/logo-215.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgalarCrack/CrackedRiseExeLauncher-Buildable-SRC/408cae151200d7419d62193374d1e68d36820504/RiseLauncher/Resources/logo-215.bmp
--------------------------------------------------------------------------------
/RiseLauncher/RiseLauncher.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Debug
7 | AnyCPU
8 | {7417C7E1-337F-4617-A48A-8EA725238737}
9 | WinExe
10 | RiseLauncher
11 | RiseLauncher
12 | v4.0
13 | 512
14 | true
15 |
16 |
17 |
18 |
19 |
20 |
21 | AnyCPU
22 | true
23 | full
24 | false
25 | bin\Debug\
26 | DEBUG;TRACE
27 | prompt
28 | 4
29 | false
30 |
31 |
32 | AnyCPU
33 | pdbonly
34 | true
35 | bin\Release\
36 | TRACE
37 | prompt
38 | 4
39 | false
40 |
41 |
42 | RiseLauncher.Program
43 |
44 |
45 | icon.ico
46 |
47 |
48 |
49 | ..\packages\DotNetZip.1.15.0\lib\net40\DotNetZip.dll
50 |
51 |
52 |
53 | ..\packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll
54 |
55 |
56 | ..\packages\SevenZip.19.0.0\lib\net20\SevenZip.dll
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | Form
74 |
75 |
76 | True
77 | True
78 | Resources.resx
79 |
80 |
81 |
82 |
83 |
84 |
85 | FormMain.cs
86 |
87 |
88 | ResXFileCodeGenerator
89 | Designer
90 | Resources.Designer.cs
91 |
92 |
93 |
94 |
95 | SettingsSingleFileGenerator
96 | Settings.Designer.cs
97 |
98 |
99 | True
100 | Settings.settings
101 | True
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 | This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.
116 |
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/RiseLauncher/UtilFile.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Security.Cryptography;
4 | using SevenZip.Compression.LZMA;
5 |
6 | namespace RiseLauncher
7 | {
8 | public static class UtilFile
9 | {
10 | public static string getHashFile(string pathName)
11 | {
12 | string result;
13 | try
14 | {
15 | SHA1CryptoServiceProvider sha1CryptoServiceProvider = new SHA1CryptoServiceProvider();
16 | FileStream fileStream = UtilFile.GetFileStream(pathName);
17 | byte[] value = sha1CryptoServiceProvider.ComputeHash(fileStream);
18 | fileStream.Close();
19 | string text = BitConverter.ToString(value);
20 | text = text.Replace("-", "");
21 | result = text.ToLower();
22 | }
23 | catch (Exception ex)
24 | {
25 | Console.WriteLine(ex.ToString());
26 | result = "";
27 | }
28 | return result;
29 | }
30 |
31 | private static FileStream GetFileStream(string pathName)
32 | {
33 | return new FileStream(pathName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
34 | }
35 |
36 | public static void ClearFolder(this DirectoryInfo directory)
37 | {
38 | try
39 | {
40 | foreach (FileInfo fileInfo in directory.GetFiles())
41 | {
42 | fileInfo.Delete();
43 | }
44 | foreach (DirectoryInfo directoryInfo in directory.GetDirectories())
45 | {
46 | directoryInfo.Delete(true);
47 | }
48 | }
49 | catch (Exception ex)
50 | {
51 | }
52 | }
53 |
54 | public static bool DecompressLZMA(string inFile, string outFile)
55 | {
56 | bool result;
57 | try
58 | {
59 | Decoder decoder = new Decoder();
60 | FileStream fileStream = new FileStream(inFile, FileMode.Open);
61 | FileStream fileStream2 = new FileStream(outFile, FileMode.Create);
62 | byte[] array = new byte[5];
63 | fileStream.Read(array, 0, 5);
64 | byte[] array2 = new byte[8];
65 | fileStream.Read(array2, 0, 8);
66 | long num = BitConverter.ToInt64(array2, 0);
67 | decoder.SetDecoderProperties(array);
68 | decoder.Code(fileStream, fileStream2, fileStream.Length, num, null);
69 | fileStream2.Flush();
70 | fileStream2.Close();
71 | result = true;
72 | }
73 | catch (Exception ex)
74 | {
75 | Console.WriteLine(ex.ToString());
76 | result = false;
77 | }
78 | return result;
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/RiseLauncher/UtilJava.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using System.IO;
4 |
5 | namespace RiseLauncher
6 | {
7 | internal class UtilJava
8 | {
9 | public static string getJavaMainFolderPath()
10 | {
11 | string launcherFolderPath = UtilJava.getLauncherFolderPath();
12 | string str = launcherFolderPath + Path.DirectorySeparatorChar.ToString() + "java";
13 | return str + Path.DirectorySeparatorChar.ToString();
14 | }
15 |
16 | public static string getJavaFolderPath()
17 | {
18 | string launcherFolderPath = UtilJava.getLauncherFolderPath();
19 | string str = launcherFolderPath + Path.DirectorySeparatorChar.ToString() + "java";
20 | bool is64BitOperatingSystem = Environment.Is64BitOperatingSystem;
21 | bool flag = is64BitOperatingSystem;
22 | if (flag)
23 | {
24 | str = str + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x64";
25 | }
26 | else
27 | {
28 | str = str + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x32";
29 | }
30 | return str + Path.DirectorySeparatorChar.ToString();
31 | }
32 |
33 | public static string getJavaExePath()
34 | {
35 | string launcherFolderPath = UtilJava.getLauncherFolderPath();
36 | string text = launcherFolderPath + Path.DirectorySeparatorChar.ToString() + "java";
37 | bool is64BitOperatingSystem = Environment.Is64BitOperatingSystem;
38 | bool flag = is64BitOperatingSystem;
39 | if (flag)
40 | {
41 | text = text + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x64";
42 | }
43 | else
44 | {
45 | text = text + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x32";
46 | }
47 | return string.Concat(new string[]
48 | {
49 | text,
50 | Path.DirectorySeparatorChar.ToString(),
51 | "bin",
52 | Path.DirectorySeparatorChar.ToString(),
53 | "java.exe"
54 | });
55 | }
56 |
57 | public static string getJavaWExePath()
58 | {
59 | string launcherFolderPath = UtilJava.getLauncherFolderPath();
60 | string text = launcherFolderPath + Path.DirectorySeparatorChar.ToString() + "java";
61 | bool is64BitOperatingSystem = Environment.Is64BitOperatingSystem;
62 | bool flag = is64BitOperatingSystem;
63 | if (flag)
64 | {
65 | text = text + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x64";
66 | }
67 | else
68 | {
69 | text = text + Path.DirectorySeparatorChar.ToString() + FormMain.getSelectedJavaType() + "-x32";
70 | }
71 | return string.Concat(new string[]
72 | {
73 | text,
74 | Path.DirectorySeparatorChar.ToString(),
75 | "bin",
76 | Path.DirectorySeparatorChar.ToString(),
77 | "java.exe"
78 | });
79 | }
80 |
81 | public static string getLauncherFolderPath()
82 | {
83 | string str = ".craftrise";
84 | string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
85 | string str2 = folderPath + Path.DirectorySeparatorChar.ToString() + str;
86 | return str2 + Path.DirectorySeparatorChar.ToString();
87 | }
88 |
89 | public static string getCurrentJavaVersion()
90 | {
91 | string result;
92 | try
93 | {
94 | string text = null;
95 | Process process = Process.Start(new ProcessStartInfo
96 | {
97 | FileName = UtilJava.getJavaExePath(),
98 | Arguments = " -version",
99 | CreateNoWindow = true,
100 | RedirectStandardError = true,
101 | UseShellExecute = false
102 | });
103 | while (!process.StandardError.EndOfStream)
104 | {
105 | string text2 = process.StandardError.ReadLine().ToLower();
106 | bool flag = text2.StartsWith("java version \"");
107 | if (flag)
108 | {
109 | text = text2.Split(new char[]
110 | {
111 | ' '
112 | })[2].Replace("\"", "");
113 | break;
114 | }
115 | }
116 | process.WaitForExit();
117 | result = text;
118 | }
119 | catch (Exception ex)
120 | {
121 | result = null;
122 | }
123 | return result;
124 | }
125 | }
126 | }
127 |
--------------------------------------------------------------------------------
/RiseLauncher/UtilRAM.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.VisualBasic.Devices;
3 |
4 | namespace RiseLauncher
5 | {
6 | internal class UtilRAM
7 | {
8 | private static ulong GetTotalMemoryInBytes()
9 | {
10 | return new ComputerInfo().TotalPhysicalMemory;
11 | }
12 |
13 | public static int getRam()
14 | {
15 | return Convert.ToInt32(UtilRAM.GetTotalMemoryInBytes() / 1073741824UL);
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/RiseLauncher/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/RiseLauncher/icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AgalarCrack/CrackedRiseExeLauncher-Buildable-SRC/408cae151200d7419d62193374d1e68d36820504/RiseLauncher/icon.ico
--------------------------------------------------------------------------------
/RiseLauncher/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------