Skip to content

Commit d1612b3

Browse files
committed
Updater modifications and under the hood changes
1 parent 520b5a1 commit d1612b3

File tree

18 files changed

+168
-216
lines changed

18 files changed

+168
-216
lines changed

AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
99
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
1010
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
11+
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
1112
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT" />
1213
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT_SU" />
1314
<uses-permission android:name="com.offsec.nhterm.permission.RUN_SCRIPT_NH" />

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,3 @@ nethunter-app
6868
modules <-- Mainly used by duckhunter. Contains keyseed.py which does all the HID work.
6969
scripts <-- This is what launches chroot (bootkali) and checks services
7070
```
71-
# 3party sources i used here (Including upstreamed sources!)
72-
* WVersionManager: https://github.com/revanmj/Android-WVersionManager

androidwversionmanager/src/main/java/com/winsontan520/wversionmanager/library/WVersionManager.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ public void setVersionContentUrl(@NonNull String versionContentUrl) {
310310
*/
311311
@Override
312312
public int getReminderTimer() {
313-
return mReminderTimer > 0 ? mReminderTimer : 60; // default value: 60 minutes
313+
return mReminderTimer > 0 ? mReminderTimer : 1; // default value: 60 minutes
314314
}
315315

316316
/*
@@ -429,10 +429,8 @@ private void showDialog() {
429429
switch (mMode) {
430430
case MODE_CHECK_VERSION:
431431
builder.setPositiveButton(R.string.wvm_button_update, mDialogListener);
432-
if (!mIsBlocking) {
433-
builder.setNeutralButton(R.string.wvm_button_remind_later, mDialogListener);
434-
builder.setNegativeButton(R.string.wvm_button_ignore, mDialogListener);
435-
}
432+
builder.setNeutralButton(R.string.wvm_button_remind_later, mDialogListener);
433+
//builder.setNegativeButton(R.string.wvm_button_close, mDialogListener);
436434
break;
437435
case MODE_ASK_FOR_RATE:
438436
builder.setPositiveButton(R.string.wvm_button_ok, mDialogListener);
@@ -578,7 +576,6 @@ public void onClick(DialogInterface dialog, int which) {
578576
remindMeLater(getReminderTimer());
579577
break;
580578
case AlertDialog.BUTTON_NEGATIVE:
581-
ignoreThisVersion();
582579
break;
583580
}
584581
}

androidwversionmanager/src/main/res/values/strings.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<string name="wvm_dialog_title_rate_us">Rate this app</string>
88
<string name="wvm_dialog_message_update">What\'s new in this version:</string>
99
<string name="wvm_dialog_message_rate_us">Please rate us!</string>
10-
<string name="wvm_button_ignore">Ignore</string>
10+
<string name="wvm_button_close">close</string>
1111
<string name="wvm_button_remind_later">Later</string>
1212
<string name="wvm_button_update">Update</string>
1313
<string name="wvm_button_ok">OK</string>

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ android {
5353
minSdkVersion 17
5454
targetSdkVersion 29
5555
//noinspection HighAppVersionCode
56-
versionCode 003
57-
versionName "0.0.3"
56+
versionCode 004
57+
versionName "0.0.4"
5858
multiDexEnabled true
5959
}
6060

demo.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"version_code": 99,
3-
"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>"
3+
"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>"
44
}

res/drawable-mdpi/activated_color.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<selector xmlns:android="http://schemas.android.com/apk/res/android">
22
<!-- This is used when the Navigation Item is checked -->
3-
<item android:color="@color/blue" android:state_checked="true" />
3+
<item android:color="#A7FFCA" android:state_checked="true" />
44
<item android:color="@color/material_blue_grey_800" android:state_enabled="false" />
55
<!-- This is the default text color -->
66
<item android:color="#FCFCFC" />

res/layout/chroot_manager.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
android:layout_height="wrap_content"
130130
app:layout_constraintStart_toStartOf="parent"
131131
app:layout_constraintBottom_toBottomOf="parent"
132+
android:layout_marginStart="4dp"
133+
android:layout_marginEnd="4dp"
132134
android:text="Start Kali Chroot"
133135
android:visibility="gone"/>
134136

@@ -138,6 +140,8 @@
138140
android:layout_height="wrap_content"
139141
app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_mount_btn"
140142
app:layout_constraintBottom_toBottomOf="parent"
143+
android:layout_marginStart="4dp"
144+
android:layout_marginEnd="4dp"
141145
android:text="Stop Kali Chroot"
142146
android:visibility="gone"/>
143147

@@ -147,6 +151,8 @@
147151
android:layout_height="wrap_content"
148152
app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_unmount_btn"
149153
app:layout_constraintBottom_toBottomOf="parent"
154+
android:layout_marginStart="4dp"
155+
android:layout_marginEnd="4dp"
150156
android:text="Install Kali Chroot"
151157
android:visibility="gone"/>
152158

@@ -156,6 +162,8 @@
156162
android:layout_height="wrap_content"
157163
app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_install_btn"
158164
app:layout_constraintBottom_toBottomOf="parent"
165+
android:layout_marginStart="4dp"
166+
android:layout_marginEnd="4dp"
159167
android:text="Add Metapackge"
160168
android:visibility="gone"/>
161169

@@ -174,6 +182,8 @@
174182
android:layout_height="wrap_content"
175183
app:layout_constraintStart_toEndOf="@+id/f_chrootmanager_backupchroot_btn"
176184
app:layout_constraintBottom_toBottomOf="parent"
185+
android:layout_marginStart="4dp"
186+
android:layout_marginEnd="4dp"
177187
android:text="Remove Kali Chroot"
178188
android:visibility="gone"/>
179189
</LinearLayout>

res/layout/kaliservices.xml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
android:layout_height="0dp"
2323
android:layout_marginTop="4dp"
2424
app:layout_constraintTop_toBottomOf="@+id/f_kaliservices_banner"
25-
app:layout_constraintBottom_toTopOf="@+id/f_kaliservices_btn_scrollView">
25+
app:layout_constraintBottom_toTopOf="@+id/f_nethunter_btn_scrollView">
2626
<LinearLayout
2727
android:layout_width="match_parent"
2828
android:layout_height="match_parent"
@@ -36,47 +36,50 @@
3636
</androidx.core.widget.NestedScrollView>
3737

3838
<HorizontalScrollView
39-
android:id="@+id/f_kaliservices_btn_scrollView"
39+
android:id="@+id/f_nethunter_btn_scrollView"
4040
android:layout_width="wrap_content"
4141
android:layout_height="wrap_content"
42-
android:animateLayoutChanges="true"
43-
android:scrollbars="none"
44-
app:layout_constraintTop_toBottomOf="@+id/f_kaliservices_scrollView"
42+
app:layout_constraintTop_toBottomOf="@+id/f_nethunter_scrollView"
4543
app:layout_constraintStart_toStartOf="parent"
44+
app:layout_constraintEnd_toEndOf="parent"
4645
app:layout_constraintBottom_toBottomOf="parent">
4746

4847
<LinearLayout
49-
android:id="@+id/f_kaliservices_linearlayoutBtn"
48+
android:id="@+id/f_nethunter_linearlayoutBtn"
5049
android:layout_width="wrap_content"
5150
android:layout_height="wrap_content"
5251
android:orientation="horizontal">
5352

5453
<Button
5554
android:id="@+id/f_kaliservices_refreshButton"
55+
android:layout_marginStart="4dp"
56+
android:layout_marginEnd="4dp"
5657
android:layout_width="wrap_content"
5758
android:layout_height="wrap_content"
58-
style="@android:style/Holo.Light.ButtonBar"
5959
android:text="Refresh" />
6060

6161
<Button
6262
android:id="@+id/f_kaliservices_addItemButton"
63+
android:layout_marginStart="4dp"
64+
android:layout_marginEnd="4dp"
6365
android:layout_width="wrap_content"
6466
android:layout_height="wrap_content"
65-
style="@android:style/Holo.Light.ButtonBar"
6667
android:text="Add" />
6768

6869
<Button
6970
android:id="@+id/f_kaliservices_deleteItemButton"
71+
android:layout_marginStart="4dp"
72+
android:layout_marginEnd="4dp"
7073
android:layout_width="wrap_content"
7174
android:layout_height="wrap_content"
72-
style="@android:style/Holo.Light.ButtonBar"
7375
android:text="Delete" />
7476

7577
<Button
7678
android:id="@+id/f_kaliservices_moveItemButton"
79+
android:layout_marginStart="4dp"
80+
android:layout_marginEnd="4dp"
7781
android:layout_width="wrap_content"
7882
android:layout_height="wrap_content"
79-
style="@android:style/Holo.Light.ButtonBar"
8083
android:text="Move" />
8184

8285
</LinearLayout>

res/layout/mana_hostapd.xml

Lines changed: 62 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -17,87 +17,77 @@
1717
android:padding="4dp"
1818
android:text="@string/mana_hostapd" />
1919

20-
<com.google.android.material.textfield.TextInputLayout
20+
<TextView
21+
android:layout_width="match_parent"
22+
android:layout_height="wrap_content"
23+
android:text="@string/iface"
24+
android:padding="4dp" />
25+
26+
<EditText
27+
android:id="@+id/ifc"
28+
android:layout_width="match_parent"
29+
android:layout_height="wrap_content"
30+
android:ems="10"/>
31+
32+
<TextView
2133
android:layout_width="match_parent"
22-
android:layout_height="72dp"
23-
android:padding="4dp">
34+
android:layout_height="wrap_content"
35+
android:text="@string/bssid"
36+
android:padding="4dp" />
37+
38+
<EditText
39+
android:id="@+id/bssid"
40+
android:layout_width="match_parent"
41+
android:layout_height="wrap_content"
42+
android:ems="10"/>
43+
44+
<TextView
45+
android:layout_width="match_parent"
46+
android:layout_height="wrap_content"
47+
android:text="@string/ssid"
48+
android:padding="4dp" />
2449

25-
<com.google.android.material.textfield.TextInputEditText
26-
android:id="@+id/ifc"
27-
android:layout_width="match_parent"
28-
android:layout_height="match_parent"
29-
android:ems="10"
30-
android:hint="@string/iface"
31-
style="@style/DesignTextInput"/>
32-
</com.google.android.material.textfield.TextInputLayout>
50+
<EditText
51+
android:id="@+id/ssid"
52+
android:layout_width="match_parent"
53+
android:layout_height="wrap_content"
54+
android:ems="10"/>
3355

56+
<TextView
57+
android:layout_width="match_parent"
58+
android:layout_height="wrap_content"
59+
android:text="@string/chanel"
60+
android:padding="4dp" />
3461

35-
<com.google.android.material.textfield.TextInputLayout
62+
<EditText
63+
android:id="@+id/channel"
3664
android:layout_width="match_parent"
37-
android:layout_height="72dp"
38-
android:padding="4dp">
39-
40-
<com.google.android.material.textfield.TextInputEditText
41-
android:id="@+id/bssid"
42-
android:layout_width="match_parent"
43-
android:layout_height="match_parent"
44-
android:ems="10"
45-
android:hint="@string/bssid" />
46-
</com.google.android.material.textfield.TextInputLayout>
47-
48-
<com.google.android.material.textfield.TextInputLayout
65+
android:layout_height="wrap_content"
66+
android:ems="10"/>
67+
68+
<TextView
4969
android:layout_width="match_parent"
50-
android:layout_height="72dp"
51-
android:padding="4dp">
52-
53-
<com.google.android.material.textfield.TextInputEditText
54-
android:id="@+id/ssid"
55-
android:layout_width="match_parent"
56-
android:layout_height="match_parent"
57-
android:ems="10"
58-
android:hint="@string/ssid" />
59-
</com.google.android.material.textfield.TextInputLayout>
60-
61-
<com.google.android.material.textfield.TextInputLayout
70+
android:layout_height="wrap_content"
71+
android:text="@string/enable_karma"
72+
android:padding="4dp" />
73+
74+
<EditText
75+
android:id="@+id/enable_karma"
6276
android:layout_width="match_parent"
63-
android:layout_height="72dp"
64-
android:padding="4dp">
65-
66-
<com.google.android.material.textfield.TextInputEditText
67-
android:id="@+id/channel"
68-
android:layout_width="match_parent"
69-
android:layout_height="match_parent"
70-
android:ems="10"
71-
android:hint="@string/chanel" />
72-
</com.google.android.material.textfield.TextInputLayout>
73-
74-
<com.google.android.material.textfield.TextInputLayout
77+
android:layout_height="wrap_content"
78+
android:ems="10"/>
79+
80+
<TextView
7581
android:layout_width="match_parent"
76-
android:layout_height="72dp"
77-
android:padding="4dp">
78-
79-
<com.google.android.material.textfield.TextInputEditText
80-
android:id="@+id/enable_karma"
81-
android:layout_width="match_parent"
82-
android:layout_height="match_parent"
83-
android:ems="10"
84-
android:hint="@string/enable_karma"
85-
style="@style/DesignTextInput"/>
86-
</com.google.android.material.textfield.TextInputLayout>
87-
88-
<com.google.android.material.textfield.TextInputLayout
82+
android:layout_height="wrap_content"
83+
android:text="@string/karma_loud"
84+
android:padding="4dp" />
85+
86+
<EditText
87+
android:id="@+id/karma_loud"
8988
android:layout_width="match_parent"
90-
android:layout_height="72dp"
91-
android:padding="4dp">
92-
93-
<com.google.android.material.textfield.TextInputEditText
94-
android:id="@+id/karma_loud"
95-
android:layout_width="match_parent"
96-
android:layout_height="match_parent"
97-
android:ems="10"
98-
android:hint="@string/karma_loud"
99-
style="@style/DesignTextInput"/>
100-
</com.google.android.material.textfield.TextInputLayout>
89+
android:layout_height="wrap_content"
90+
android:ems="10"/>
10191

10292

10393
<Button

0 commit comments

Comments
 (0)