Spaces:
Sleeping
Sleeping
htr
commited on
Commit
·
e71345c
1
Parent(s):
4491550
src/main/java/tqtk/Utils/GetTextFromGit.java
CHANGED
@@ -24,18 +24,28 @@ public class GetTextFromGit {
|
|
24 |
URL crunchifyUrl = new URL(path);
|
25 |
HttpURLConnection crunchifyHttp = (HttpURLConnection) crunchifyUrl.openConnection();
|
26 |
crunchifyHttp.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
|
27 |
-
crunchifyHttp.setRequestProperty("Sec-Fetch-
|
28 |
-
crunchifyHttp.setRequestProperty("
|
|
|
|
|
|
|
|
|
|
|
|
|
29 |
Map<String, List<String>> crunchifyHeader = crunchifyHttp.getHeaderFields();
|
30 |
for (final String header : crunchifyHeader.get(null)) {
|
31 |
if (header.contains(" 302 ") || header.contains(" 301 ")) {
|
32 |
path = crunchifyHeader.get("Location").get(0);
|
33 |
crunchifyUrl = new URL(path);
|
34 |
crunchifyHttp = (HttpURLConnection) crunchifyUrl.openConnection();
|
35 |
-
//
|
36 |
-
crunchifyHttp.setRequestProperty("
|
37 |
-
crunchifyHttp.setRequestProperty("Sec-Fetch-
|
38 |
-
crunchifyHttp.setRequestProperty("
|
|
|
|
|
|
|
|
|
39 |
crunchifyHeader = crunchifyHttp.getHeaderFields();
|
40 |
}
|
41 |
}
|
|
|
24 |
URL crunchifyUrl = new URL(path);
|
25 |
HttpURLConnection crunchifyHttp = (HttpURLConnection) crunchifyUrl.openConnection();
|
26 |
crunchifyHttp.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
|
27 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Dest", "document");
|
28 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-User", "?1");
|
29 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Mode", "navigate");
|
30 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Site", "none");
|
31 |
+
crunchifyHttp.setRequestProperty("Upgrade-Insecure-Requests", "1");
|
32 |
+
crunchifyHttp.setRequestProperty("Upgrade-Insecure-Requests", "1");
|
33 |
+
crunchifyHttp.setRequestProperty("host", "raw.githubusercontent.com");
|
34 |
+
// crunchifyHttp.setRequestProperty("Authorization", "Token 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");
|
35 |
Map<String, List<String>> crunchifyHeader = crunchifyHttp.getHeaderFields();
|
36 |
for (final String header : crunchifyHeader.get(null)) {
|
37 |
if (header.contains(" 302 ") || header.contains(" 301 ")) {
|
38 |
path = crunchifyHeader.get("Location").get(0);
|
39 |
crunchifyUrl = new URL(path);
|
40 |
crunchifyHttp = (HttpURLConnection) crunchifyUrl.openConnection();
|
41 |
+
// crunchifyHttp.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36");
|
42 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Dest", "document");
|
43 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-User", "?1");
|
44 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Mode", "navigate");
|
45 |
+
crunchifyHttp.setRequestProperty("Sec-Fetch-Site", "none");
|
46 |
+
crunchifyHttp.setRequestProperty("Upgrade-Insecure-Requests", "1");
|
47 |
+
crunchifyHttp.setRequestProperty("Upgrade-Insecure-Requests", "1");
|
48 |
+
crunchifyHttp.setRequestProperty("host", "raw.githubusercontent.com");
|
49 |
crunchifyHeader = crunchifyHttp.getHeaderFields();
|
50 |
}
|
51 |
}
|
src/main/java/tqtk/XuLy/Worker.java
CHANGED
@@ -640,7 +640,7 @@ public class Worker extends Thread {
|
|
640 |
|
641 |
// chien tich > uydanh
|
642 |
//Thread.sleep(5000);
|
643 |
-
|
644 |
|
645 |
// thuong uy danh
|
646 |
Thread.sleep(5000);
|
@@ -1395,16 +1395,19 @@ public class Worker extends Thread {
|
|
1395 |
new Thread() {
|
1396 |
@Override
|
1397 |
public void run() {
|
|
|
1398 |
try {
|
1399 |
-
|
1400 |
TruyNa2();
|
1401 |
-
|
1402 |
} catch (Exception e) {
|
1403 |
System.out.println("TruyNa .run() " + e.getMessage() + " " + ss.getStringName());
|
1404 |
}
|
|
|
1405 |
}
|
1406 |
}.start();
|
1407 |
while (true) {
|
|
|
1408 |
|
1409 |
MuaLinh();
|
1410 |
// DanhQuanDoan1();
|
@@ -1424,6 +1427,9 @@ public class Worker extends Thread {
|
|
1424 |
MuaRuong();
|
1425 |
CapNhatThongTin();
|
1426 |
Thread.sleep(55 * 1000);
|
|
|
|
|
|
|
1427 |
}
|
1428 |
} catch (Exception ex) {
|
1429 |
System.out.println("all " + ss.getStringName() + ex.getMessage());
|
|
|
640 |
|
641 |
// chien tich > uydanh
|
642 |
//Thread.sleep(5000);
|
643 |
+
GuiPacket(ss, "12303", null);
|
644 |
|
645 |
// thuong uy danh
|
646 |
Thread.sleep(5000);
|
|
|
1395 |
new Thread() {
|
1396 |
@Override
|
1397 |
public void run() {
|
1398 |
+
while (true) {
|
1399 |
try {
|
1400 |
+
|
1401 |
TruyNa2();
|
1402 |
+
|
1403 |
} catch (Exception e) {
|
1404 |
System.out.println("TruyNa .run() " + e.getMessage() + " " + ss.getStringName());
|
1405 |
}
|
1406 |
+
}
|
1407 |
}
|
1408 |
}.start();
|
1409 |
while (true) {
|
1410 |
+
try {
|
1411 |
|
1412 |
MuaLinh();
|
1413 |
// DanhQuanDoan1();
|
|
|
1427 |
MuaRuong();
|
1428 |
CapNhatThongTin();
|
1429 |
Thread.sleep(55 * 1000);
|
1430 |
+
} catch (Exception ex) {
|
1431 |
+
System.out.println("all " + ss.getStringName() + ex.getMessage());
|
1432 |
+
}
|
1433 |
}
|
1434 |
} catch (Exception ex) {
|
1435 |
System.out.println("all " + ss.getStringName() + ex.getMessage());
|