-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathindex.html
384 lines (366 loc) · 13.4 KB
/
index.html
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
<!DOCTYPE HTML>
<script src='jszip.js'></script>
<script src='filesaver.js'></script>
<div id="started">
<div class="cont">
<h2>KillSecurly Foundation - ONC</h2>
<b style="font-size:20px">Providing freedom for students spied on by Securly.<br/></b>
<b style="font-size:15px">The download button will not do anything unless you type in the correct Wi-Fi properties.<br/><br/></b>
<!--Update the Instructions Permalink Every README change-->
<b style="font-size:15px">User assumes all liablity. Instructions are <a href=https://github.com/killsecurly/ONC/blob/d1a97c9a80e90cf1b3f288c8744ff37431dcfef5/README.md style="color:blue">here.</a><br/></b>
<b style="font-size:15px">Version 3.0.1 (meter hotfix)<br/></b>
</div>
</div>
<input type="text" id="input" placeholder="Type network properties...">
<div style="position:absolute;bottom:5px;z-index:99999;" id="credits">
</div>
<button id="button" onclick="load();">Download Network ZIP</button>
<div id="finished">
</div>
<div id="advancedbutton" onclick="adv();">Advanced Network Options +</div>
<div id="advanced" data-pos="down" style="border-top:3px solid black;animation-fill-mode: both;display:block;text-align:center;flex-direction: column;align-items:center;">
<div class="switchtext">
<b style="display:flex;font-size:20px;padding-right:10px;">Metered</b>
<label class="switch" style="display:flex;">
<input type="checkbox" id="metered" checked>
<span class="slider round"></span>
</label>
</div>
<div class="switchtext" style="flex-direction: column;">
<input class="smallinput" style="margin-bottom:5px;" id="ip1" placeholder="Enter DNS IP 1" type="text">
<input class="smallinput" style="margin-bottom:5px;" id="ip2" placeholder="Enter DNS IP 2" type="text">
<input class="smallinput" style="margin-bottom:5px;" id="ip3" placeholder="Enter DNS IP 3" type="text">
<input class="smallinput" style="margin-bottom:5px;" id="ip4" placeholder="Enter DNS IP 4" type="text">
</div>
<!--
<div class="switchtext">
<b style="display:flex;font-size:20px;padding-right:10px;">proxy - </b>
<select name="proxy" id="proxy">
<option value="direct">Direct</option>
<option value="ftp">ftp</option>
<option value="http">http</option>
<option value="https">https</option>
</select>
</div>
<div id="proxysettings" class="switchtext" style="display:none;">
<input class="smallinput" id="hostinput" placeholder="localhost" type="text">
<input id="portinput" placeholder="port" type="text">
</div>
-->
</div>
<style>
@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);
.smallinput{
width:25%;
font-size:15px;
text-align:left;
background:transparent;
color:black;
padding:5px;
border:3px solid black;
border-radius:10px;
}
#portinput{
width:10%;
font-size:15px;
text-align:left;
background:transparent;
color:black;
padding:5px;
border:3px solid black;
border-radius:25px;
font-family:Open Sans;
}
#proxy{
display: flex;
color: black;
background-color: white;
border: 3px solid black;
border-radius: 25px;
outline: none;
font-family:Open Sans;
}
.switchtext{
display:flex;
flex-direction: row;
align-items:center;
color:black;
justify-content:center;
margin:50px;
font-family:Open Sans;
}
a{
color:inherit;
text-decoration:inherit;
font-family:Open Sans;
}
#started{
display:block;
}
#finished{
background:white;
display:none;
}
.cont{
position:absolute;
top:5px;
font-size:20px;
width:70%;
left:15%;
}
body{
color:black;
text-align:center;
background:white;
overflow:hidden;
font-family:Open Sans;
}
.switch {
position: relative;
display: inline-block;
width: 53px;
height: 28px;
border: 5px solid black;
border-radius:25px;
}
.switch input {
opacity: 0;
width: 0;
height: 0;
}
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: transparent;
-webkit-transition: .4s;
transition: .4s;
}
.slider:before {
position: absolute;
content: "";
height: 20px;
width: 20px;
left: 4px;
bottom: 4px;
background-color: black;
-webkit-transition: .4s;
transition: .4s;
}
input:checked + .slider {
background:transparent;
}
input:focus + .slider {
box-shadow: 0 0 1px #2196F3;
}
input:checked + .slider:before {
-webkit-transform: translateX(26px);
-ms-transform: translateX(26px);
transform: translateX(26px);
}
.slider.round {
border-radius: 34px;
outline: none;
}
.slider.round:before {
border-radius: 50%;
}
#input{
display:block;
width:50%;
position:absolute;
left:25%;
bottom:43%;
font-size:20px;
text-align:left;
background:transparent;
color:black;
padding:10px;
border:3px solid black;
border-radius:10px;
}
::placeholder{
color:black;
}
button{
position:absolute;
bottom:27%;
display:block;
text-align:center;
background:transparent;
color:black;
border:3px solid black;
border-radius:25px;
font-size:20px;
padding:10px;
font-family:Open Sans;
}
#advancedbutton{
position:absolute;
top:5px;
left:5px;
display:block;
text-align:center;
background:white;
color:black;
font-size:15px;
cursor:pointer;
z-index:15;
font-family:Open Sans;
}
#advanced{
width:100%;
height:100%;
position:absolute;
background-color:white;
top:100%;
left:0px;
z-index:10;
}
@keyframes slideup{
0%{
top:100%;
}
100%{
top:0%;
}
}
@keyframes slidedown{
0%{
top:0%;
}
100%{
top:100%;
}
}
</style>
<script>
alert("By using ONC you agree to the KillSecurly Foundation Policy.");
var dns_one="38.175.197.10";
var dns_two="66.94.105.229";
var dns_three="213.109.163.210";
var dns_four="92.60.37.102";
document.getElementById("ip1").value=dns_one;
document.getElementById("ip2").value=dns_two;
document.getElementById("ip3").value=dns_three;
document.getElementById("ip4").value=dns_four;
/*ryan
var proxysettings=document.getElementById("proxysettings");
var proxy=document.getElementById("proxy");
proxy.onchange=function (){
if (proxy.value!="direct"){
proxysettings.style.display="flex";
} else {
proxysettings.style.display="none";
}
}
*/
var advanced=document.getElementById("advanced");
advanced.addEventListener("animationend",()=>{
advanced.style.animation="none";
inprogress=false;
if (advanced.dataset.pos=="up"){
advanced.style.top="0%";
document.getElementById("advancedbutton").innerText="Advanced DNS Options -";
} else if (advanced.dataset.pos=="down"){
document.getElementById("advancedbutton").innerText="Advanced DNS Options +";
advanced.style.top="100%";
} else {
alert("error");
}
});
var inprogress=false;
function adv(){
if (inprogress==false){
inprogress=true;
if (advanced.dataset.pos=="down"){
advanced.style.animation="0.5s linear slideup";
advanced.dataset.pos="up";
} else if (advanced.dataset.pos=="up"){
advanced.style.animation="0.5s linear slidedown";
advanced.dataset.pos="down";
} else {
alert("error");
}
}
}
document.getElementById("button").style.left=window.innerWidth/2-document.getElementById("button").offsetWidth/2+"px";
document.getElementById("credits").style.left=window.innerWidth/2-document.getElementById("credits").offsetWidth/2+"px";
async function load(){
var zip = new JSZip();
var onc={ Type: "UnencryptedConfiguration", NetworkConfigurations: [] };
var nameservers=[document.getElementById("ip1").value,document.getElementById("ip2").value,document.getElementById("ip3").value,document.getElementById("ip4").value];
for (var i=0;i<4;i++){
if (i==0){
if (nameservers[i]==""){
nameservers[i]=dns;
}
}
if (nameservers[i]==""){
nameservers[i]="0.0.0.0";
}
}
var input=document.getElementById("input");
var network = JSON.parse(input.value);
let configuration = {
GUID: network.GUID,
Metered: document.getElementById("metered").checked,
Name: network.Name,
Type: "WiFi",
WiFi: {
AutoConnect: true,
SSID: network.Name,
Security: "None",
},
NameServersConfigType:"Static",
StaticIPConfig:{
NameServers:nameservers
},
ProxySettings:{
Type:"Direct"
}
}
onc.NetworkConfigurations.push(configuration);
zip.file("kill.onc",JSON.stringify(onc));
var onc2={ Type: "UnencryptedConfiguration", NetworkConfigurations: [] };
let configuration2 = {
GUID: network.GUID,
Metered: false,
Name: network.Name,
Type: "WiFi",
WiFi: {
AutoConnect: true,
SSID: network.Name,
Security: "None",
},
NameServersConfigType:"DHCP",
IPAddressConfigType: "DHCP",
StaticIPConfig:{
NameServers:[]
},
ProxySettings:{
Type:"Direct"
}
}
onc2.NetworkConfigurations.push(configuration2);
zip.file("revive.onc",JSON.stringify(onc2));
zip.generateAsync({type:"blob"}).then(function (content) {
saveAs(content, "network.zip");
});
document.getElementById("started").style.display="none";
document.getElementById("input").style.display="none";
document.getElementById("button").style.display="none";
document.getElementById("finished").style.display="inline-block";
document.getElementById("advanced").style.display="none";
document.getElementById("advancedbutton").style.display="none";
}
function download(object, fileName) {
let link = document.createElement("a");
link.href = URL.createObjectURL(new Blob([JSON.stringify(object)]));
link.download = fileName;s
link.click().remove();
}
</script>