From d1612b316d6efbb5dd347cc8f94b0328b42025a4 Mon Sep 17 00:00:00 2001 From: BobTheBuilder Date: Thu, 19 Nov 2020 17:59:44 +0200 Subject: [PATCH] Updater modifications and under the hood changes --- AndroidManifest.xml | 1 + README.md | 2 - .../library/WVersionManager.java | 9 +- .../src/main/res/values/strings.xml | 2 +- build.gradle | 4 +- demo.txt | 2 +- res/drawable-mdpi/activated_color.xml | 2 +- res/layout/chroot_manager.xml | 10 ++ res/layout/kaliservices.xml | 23 +-- res/layout/mana_hostapd.xml | 134 ++++++++---------- res/layout/mitmf_inject.xml | 71 ++-------- res/layout/mitmf_spoof.xml | 30 +--- res/layout/nethunter.xml | 9 +- res/values/strings.xml | 2 +- res/values/styles.xml | 6 + .../offsec/nethunter/AppNavHomeActivity.java | 56 +++++--- src/com/offsec/nethunter/HidFragment.java | 17 +-- version.txt | 4 +- 18 files changed, 168 insertions(+), 216 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 30da74b..b5828d1 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -8,6 +8,7 @@ + diff --git a/README.md b/README.md index b70aed2..8843a45 100644 --- a/README.md +++ b/README.md @@ -68,5 +68,3 @@ nethunter-app modules <-- Mainly used by duckhunter. Contains keyseed.py which does all the HID work. scripts <-- This is what launches chroot (bootkali) and checks services ``` -# 3party sources i used here (Including upstreamed sources!) -* WVersionManager: https://github.com/revanmj/Android-WVersionManager diff --git a/androidwversionmanager/src/main/java/com/winsontan520/wversionmanager/library/WVersionManager.java b/androidwversionmanager/src/main/java/com/winsontan520/wversionmanager/library/WVersionManager.java index d9c4e83..644de18 100644 --- a/androidwversionmanager/src/main/java/com/winsontan520/wversionmanager/library/WVersionManager.java +++ b/androidwversionmanager/src/main/java/com/winsontan520/wversionmanager/library/WVersionManager.java @@ -310,7 +310,7 @@ public void setVersionContentUrl(@NonNull String versionContentUrl) { */ @Override public int getReminderTimer() { - return mReminderTimer > 0 ? mReminderTimer : 60; // default value: 60 minutes + return mReminderTimer > 0 ? mReminderTimer : 1; // default value: 60 minutes } /* @@ -429,10 +429,8 @@ private void showDialog() { switch (mMode) { case MODE_CHECK_VERSION: builder.setPositiveButton(R.string.wvm_button_update, mDialogListener); - if (!mIsBlocking) { - builder.setNeutralButton(R.string.wvm_button_remind_later, mDialogListener); - builder.setNegativeButton(R.string.wvm_button_ignore, mDialogListener); - } + builder.setNeutralButton(R.string.wvm_button_remind_later, mDialogListener); + //builder.setNegativeButton(R.string.wvm_button_close, mDialogListener); break; case MODE_ASK_FOR_RATE: builder.setPositiveButton(R.string.wvm_button_ok, mDialogListener); @@ -578,7 +576,6 @@ public void onClick(DialogInterface dialog, int which) { remindMeLater(getReminderTimer()); break; case AlertDialog.BUTTON_NEGATIVE: - ignoreThisVersion(); break; } } diff --git a/androidwversionmanager/src/main/res/values/strings.xml b/androidwversionmanager/src/main/res/values/strings.xml index d1b0343..ff4165b 100644 --- a/androidwversionmanager/src/main/res/values/strings.xml +++ b/androidwversionmanager/src/main/res/values/strings.xml @@ -7,7 +7,7 @@ Rate this app What\'s new in this version: Please rate us! - Ignore + close Later Update OK diff --git a/build.gradle b/build.gradle index 68754bf..4c4ea35 100644 --- a/build.gradle +++ b/build.gradle @@ -53,8 +53,8 @@ android { minSdkVersion 17 targetSdkVersion 29 //noinspection HighAppVersionCode - versionCode 003 - versionName "0.0.3" + versionCode 004 + versionName "0.0.4" multiDexEnabled true } diff --git a/demo.txt b/demo.txt index a3a6e39..45da1e9 100644 --- a/demo.txt +++ b/demo.txt @@ -1,4 +1,4 @@ { "version_code": 99, - "content": "Version 9.9.9

First time KekHunter InApp updater, yass.

Fixes/Addons

  • This is the demo version of the updater
  • Some under the hood fixes/modifications :)
  • " + "content": "Version 9.9.9

    DEMO

    Fixes/Addons

  • This is the demo version of the updater
  • Some under the hood fixes/modifications :)
  • " } \ No newline at end of file diff --git a/res/drawable-mdpi/activated_color.xml b/res/drawable-mdpi/activated_color.xml index fab2d50..d3ec734 100644 --- a/res/drawable-mdpi/activated_color.xml +++ b/res/drawable-mdpi/activated_color.xml @@ -1,6 +1,6 @@ - + diff --git a/res/layout/chroot_manager.xml b/res/layout/chroot_manager.xml index a5b6f53..4c3dce6 100644 --- a/res/layout/chroot_manager.xml +++ b/res/layout/chroot_manager.xml @@ -129,6 +129,8 @@ android:layout_height="wrap_content" app:layout_constraintStart_toStartOf="parent" app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" android:text="Start Kali Chroot" android:visibility="gone"/> @@ -138,6 +140,8 @@ android:layout_height="wrap_content" app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_mount_btn" app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" android:text="Stop Kali Chroot" android:visibility="gone"/> @@ -147,6 +151,8 @@ android:layout_height="wrap_content" app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_unmount_btn" app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" android:text="Install Kali Chroot" android:visibility="gone"/> @@ -156,6 +162,8 @@ android:layout_height="wrap_content" app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_install_btn" app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" android:text="Add Metapackge" android:visibility="gone"/> @@ -174,6 +182,8 @@ android:layout_height="wrap_content" app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_backupchroot_btn" app:layout_constraintBottom_toBottomOf="parent" + android:layout_marginStart="4dp" + android:layout_marginEnd="4dp" android:text="Remove Kali Chroot" android:visibility="gone"/> diff --git a/res/layout/kaliservices.xml b/res/layout/kaliservices.xml index 2613828..d317c69 100644 --- a/res/layout/kaliservices.xml +++ b/res/layout/kaliservices.xml @@ -22,7 +22,7 @@ android:layout_height="0dp" android:layout_marginTop="4dp" app:layout_constraintTop_toBottomOf="@+id/f_kaliservices_banner" - app:layout_constraintBottom_toTopOf="@+id/f_kaliservices_btn_scrollView"> + app:layout_constraintBottom_toTopOf="@+id/f_nethunter_btn_scrollView">