update
This commit is contained in:
parent
b9e2cee838
commit
3430daf931
@ -291,7 +291,7 @@ public class SmaliUtils {
|
||||
System.setSecurityManager(new NoExitSecurityManager());
|
||||
|
||||
//Main.main(args);
|
||||
apktool_234.loadClass("brut.apktool.Main").getMethod("main",String[].class).invoke(null,new Object[]{args});
|
||||
apktool_241.loadClass("brut.apktool.Main").getMethod("main",String[].class).invoke(null,new Object[]{args});
|
||||
if (inter != null) {
|
||||
inter.smaliPath(path);
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.qy.utils;
|
||||
|
||||
import java.io.*;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.rmi.server.ExportException;
|
||||
import java.util.Random;
|
||||
@ -10,6 +12,7 @@ import java.util.zip.CheckedInputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
|
||||
import static java.util.zip.ZipEntry.STORED;
|
||||
@ -382,4 +385,32 @@ public class Tools {
|
||||
}
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String url="http://192.168.137.1:8000/nas/music/favorite/add.do";
|
||||
String body="{\"md5s\":[\"4fec7b325eb3795ef8241dabcbc14a5f\",\"febbf27e0d558a2ab69ee814a6bdebfb\",\"86a2fa76cc0e6919f9869324c3b61ba3\"],\"fid\":-1,\"token\":\"PlVodzYhvxRQbOHKakpKs2dvnoc43Cnk\"}";
|
||||
JSONObject json=new JSONObject();
|
||||
json.put("fileName","C:\\\\Users\\\\admin\\\\Music\\\\英雄联盟 - 涅槃 (Phoenix).flac");
|
||||
String tmp;
|
||||
StringBuilder str=new StringBuilder();
|
||||
HttpURLConnection connection = (HttpURLConnection) new URL(url).openConnection();
|
||||
connection.setRequestMethod("POST");
|
||||
connection.addRequestProperty("content-type","application/json");
|
||||
connection.addRequestProperty("charset","UTF-8");
|
||||
connection.setDoOutput(true);
|
||||
connection.setDoInput(true);
|
||||
connection.setConnectTimeout(5 * 1000);
|
||||
connection.setReadTimeout(10 * 1000);
|
||||
OutputStream outputStream = connection.getOutputStream();
|
||||
|
||||
outputStream.write(json.toString().getBytes());
|
||||
outputStream.flush();
|
||||
outputStream.close();
|
||||
System.out.println(connection.getResponseCode());
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||
while ((tmp = reader.readLine()) != null) {
|
||||
str.append(tmp);
|
||||
}
|
||||
System.out.println("[域名]" + url + " = [body]" + body.toString() + " -> [接收] " + str);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user