-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.cs
More file actions
181 lines (172 loc) · 6.66 KB
/
Form1.cs
File metadata and controls
181 lines (172 loc) · 6.66 KB
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
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Net;
namespace Vysor_Pro_Patcher
{
public partial class Principal : Form
{
string baseFolder;
string chromeExtensionsFolder;
string vysorFolder;
public static bool CheckInternet()
{
try
{
using (var client = new WebClient())
{
using (var stream = client.OpenRead("http://www.google.com"))
{
return true;
}
}
}
catch
{
return false;
}
}
public static bool TryVersion(string version)
{
try
{
using (var client = new WebClient())
{
using (var stream = client.OpenRead("http://www.leparadoxhd.com/crack/vysor/" + version + "/uglify.js"))
{
return true;
}
}
}
catch
{
return false;
}
}
public Principal()
{
InitializeComponent();
}
private void Principal_Load(object sender, EventArgs e)
{
source.SelectedIndex = 0;
// ToolTip
ToolTip toolTipOffline = new ToolTip();
toolTipOffline.AutoPopDelay = 500000;
toolTipOffline.InitialDelay = 500;
toolTipOffline.ReshowDelay = 500;
toolTipOffline.ShowAlways = true;
toolTipOffline.SetToolTip(this.offline, "Si se activa, no se usará el archivo parcheado desde internet, se intentará parchear manualmente.");
status.Text = "Verifying Vysor...";
baseFolder = Environment.GetEnvironmentVariable("LocalAppData");
switch (source.Text)
{
case "Default":
chromeExtensionsFolder = baseFolder + "\\Google\\Chrome\\User Data\\Default\\Extensions";
break;
case "ChromeDefaultData":
chromeExtensionsFolder = baseFolder + "\\Google\\Chrome\\User Data\\ChromeDefaultData\\Extensions";
break;
}
vysorFolder = chromeExtensionsFolder + "\\gidgenkbbabolejbgbpnhbimgjbffefm";
if (!Directory.Exists(vysorFolder))
{
status.Text = "Vysor App Not Found :(";
} else
{
status.Text = "Verifying Vysor Version...";
var directory = new DirectoryInfo(vysorFolder);
var vysorVersion = directory.GetDirectories()
.OrderByDescending(f => f.LastWriteTime)
.First();
var version = vysorVersion.ToString().Substring(0, vysorVersion.ToString().Length - 2);
status.Text = "Vysor: " + version;
}
}
private void Paso1()
{
status.Text = "Verifying Vysor Version...";
var directory = new DirectoryInfo(vysorFolder);
var vysorVersion = directory.GetDirectories()
.OrderByDescending(f => f.LastWriteTime)
.First();
var version = vysorVersion.ToString().Substring(0, vysorVersion.ToString().Length - 2);
status.Text = "Vysor: " + version;
while (!CheckInternet())
{
DialogResult internet = MessageBox.Show("Network Connection not found :(", "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
if (internet == DialogResult.Cancel)
{
System.Environment.Exit(1);
}
if (CheckInternet())
{
break;
}
}
if (TryVersion(version))
{
if (!offline.Checked)
{
if (File.Exists(vysorFolder + "\\" + version + "_0" + "\\uglify.js"))
{
File.Delete(vysorFolder + "\\" + version + "_0" + "\\uglify.js");
}
}
Directory.SetCurrentDirectory(vysorFolder + "\\" + version + "_0");
if ( offline.Checked )
{
string text = File.ReadAllText("uglify.js");
text = text.Replace("this.licensed=false", "this.licensed=true");
text = text.Replace("this.licenseCached=false", "this.licenseCached=true");
File.WriteAllText("uglify.js", text);
} else
{
WebClient uglify = new WebClient();
uglify.DownloadFile("http://www.leparadoxhd.com/crack/vysor/" + version + "/uglify.js", "uglify.js");
}
status.Text = "¡Patched!";
Process vysor = Process.Start("chrome.exe", "--app-id=gidgenkbbabolejbgbpnhbimgjbffefm");
Thread.Sleep(2000);
if ( vysor != null )
{
Process[] vysorPid = Process.GetProcessesByName("chrome");
foreach ( Process pid in vysorPid )
{
pid.Kill();
}
}
Process.Start("chrome.exe", "--app-id=gidgenkbbabolejbgbpnhbimgjbffefm");
} else
{
MessageBox.Show("I still have not done a crack :(", "Almost There", MessageBoxButtons.OK, MessageBoxIcon.Information);
DialogResult abrirWeb = MessageBox.Show("Do you want to alert me a new version has been released?",
"Leave me a comment", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if ( abrirWeb == DialogResult.Yes )
{
Process.Start("https://www.youtube.com/watch?v=G36c-_BdoME#comment-section-renderer");
}
}
}
private void begin_Click(object sender, EventArgs e)
{
if (!Directory.Exists(vysorFolder))
{
status.Text = "Vysor App Not Found.";
}
else
{
Paso1();
}
}
}
}