Skip to content

Commit

Permalink
Updater modifications and under the hood changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Martinvlba committed Nov 19, 2020
1 parent 520b5a1 commit d1612b3
Show file tree
Hide file tree
Showing 18 changed files with 168 additions and 216 deletions.
1 change: 1 addition & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT" />
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT_SU" />
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT_NH" />
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

/*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -578,7 +576,6 @@ public void onClick(DialogInterface dialog, int which) {
remindMeLater(getReminderTimer());
break;
case AlertDialog.BUTTON_NEGATIVE:
ignoreThisVersion();
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion androidwversionmanager/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<string name="wvm_dialog_title_rate_us">Rate this app</string>
<string name="wvm_dialog_message_update">What\'s new in this version:</string>
<string name="wvm_dialog_message_rate_us">Please rate us!</string>
<string name="wvm_button_ignore">Ignore</string>
<string name="wvm_button_close">close</string>
<string name="wvm_button_remind_later">Later</string>
<string name="wvm_button_update">Update</string>
<string name="wvm_button_ok">OK</string>
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion demo.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version_code": 99,
"content": "Version 9.9.9 <p> First time KekHunter InApp updater, yass. </P><p>Fixes/Addons</P><li>This is the demo version of the updater</li><li>Some under the hood fixes/modifications :)</li>"
"content": "Version 9.9.9 <p> DEMO </P><p>Fixes/Addons</P><li>This is the demo version of the updater</li><li>Some under the hood fixes/modifications :)</li>"
}
2 changes: 1 addition & 1 deletion res/drawable-mdpi/activated_color.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- This is used when the Navigation Item is checked -->
<item android:color="@color/blue" android:state_checked="true" />
<item android:color="#A7FFCA" android:state_checked="true" />
<item android:color="@color/material_blue_grey_800" android:state_enabled="false" />
<!-- This is the default text color -->
<item android:color="#FCFCFC" />
Expand Down
10 changes: 10 additions & 0 deletions res/layout/chroot_manager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>

Expand All @@ -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"/>

Expand All @@ -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"/>

Expand All @@ -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"/>

Expand All @@ -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"/>
</LinearLayout>
Expand Down
23 changes: 13 additions & 10 deletions res/layout/kaliservices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -36,47 +36,50 @@
</androidx.core.widget.NestedScrollView>

<HorizontalScrollView
android:id="@+id/f_kaliservices_btn_scrollView"
android:id="@+id/f_nethunter_btn_scrollView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:scrollbars="none"
app:layout_constraintTop_toBottomOf="@+id/f_kaliservices_scrollView"
app:layout_constraintTop_toBottomOf="@+id/f_nethunter_scrollView"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="parent">

<LinearLayout
android:id="@+id/f_kaliservices_linearlayoutBtn"
android:id="@+id/f_nethunter_linearlayoutBtn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">

<Button
android:id="@+id/f_kaliservices_refreshButton"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Holo.Light.ButtonBar"
android:text="Refresh" />

<Button
android:id="@+id/f_kaliservices_addItemButton"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Holo.Light.ButtonBar"
android:text="Add" />

<Button
android:id="@+id/f_kaliservices_deleteItemButton"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Holo.Light.ButtonBar"
android:text="Delete" />

<Button
android:id="@+id/f_kaliservices_moveItemButton"
android:layout_marginStart="4dp"
android:layout_marginEnd="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@android:style/Holo.Light.ButtonBar"
android:text="Move" />

</LinearLayout>
Expand Down
134 changes: 62 additions & 72 deletions res/layout/mana_hostapd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,87 +17,77 @@
android:padding="4dp"
android:text="@string/mana_hostapd" />

<com.google.android.material.textfield.TextInputLayout
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/iface"
android:padding="4dp" />

<EditText
android:id="@+id/ifc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"/>

<TextView
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">
android:layout_height="wrap_content"
android:text="@string/bssid"
android:padding="4dp" />

<EditText
android:id="@+id/bssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/ssid"
android:padding="4dp" />

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ifc"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/iface"
style="@style/DesignTextInput"/>
</com.google.android.material.textfield.TextInputLayout>
<EditText
android:id="@+id/ssid"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"/>

<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/chanel"
android:padding="4dp" />

<com.google.android.material.textfield.TextInputLayout
<EditText
android:id="@+id/channel"
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/bssid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/bssid" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:ems="10"/>

<TextView
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/ssid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/ssid" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:text="@string/enable_karma"
android:padding="4dp" />

<EditText
android:id="@+id/enable_karma"
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/channel"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/chanel" />
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:ems="10"/>

<TextView
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/enable_karma"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/enable_karma"
style="@style/DesignTextInput"/>
</com.google.android.material.textfield.TextInputLayout>

<com.google.android.material.textfield.TextInputLayout
android:layout_height="wrap_content"
android:text="@string/karma_loud"
android:padding="4dp" />

<EditText
android:id="@+id/karma_loud"
android:layout_width="match_parent"
android:layout_height="72dp"
android:padding="4dp">

<com.google.android.material.textfield.TextInputEditText
android:id="@+id/karma_loud"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:ems="10"
android:hint="@string/karma_loud"
style="@style/DesignTextInput"/>
</com.google.android.material.textfield.TextInputLayout>
android:layout_height="wrap_content"
android:ems="10"/>


<Button
Expand Down
Loading

0 comments on commit d1612b3

Please sign in to comment.