Rebrand from nhterm to evolinx + alot more
* Refactor from com.offsec.nhterm -> com.evolinx.terminal * Re-enable First time setup activity which will downlaod + install bootstrap * Move all the app configs home dir below usr dir with its other assets * Rebrand all strings from nhterm/kali and etc to evolinx related strings * Removed 'System Shell' as default session will be basically system shell * Make sure to use R.string.something instead of hardcoded strings in NeoTermActivity for session names * This big commit has more small changes but these dont need to be mentioned here
This commit is contained in:
parent
595ad16434
commit
e1826b3641
19
.github/workflows/gradle-check.yml
vendored
19
.github/workflows/gradle-check.yml
vendored
@ -1,19 +0,0 @@
|
|||||||
name: Gralde check
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Clone repository
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
- name: Build
|
|
||||||
run: |
|
|
||||||
./gradlew :app:assembleDebug
|
|
@ -19,12 +19,12 @@ repositories {
|
|||||||
}
|
}
|
||||||
compileKotlin {
|
compileKotlin {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "1.8"
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileTestKotlin {
|
compileTestKotlin {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
jvmTarget = "1.8"
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package io.neolang.frontend
|
package com.evolinx.neolang.frontend
|
||||||
|
|
||||||
import io.neolang.runtime.NeoLangContext
|
import com.evolinx.neolang.runtime.NeoLangContext
|
||||||
import io.neolang.runtime.NeoLangValue
|
import com.evolinx.neolang.runtime.NeoLangValue
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,4 +1,4 @@
|
|||||||
package io.neolang.frontend
|
package com.evolinx.neolang.frontend
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
||||||
@ -36,14 +36,14 @@ class NeoLangLexer {
|
|||||||
private fun moveToNextChar(eofThrow: Boolean = false): Boolean {
|
private fun moveToNextChar(eofThrow: Boolean = false): Boolean {
|
||||||
val programCode = this.programCode ?: return false
|
val programCode = this.programCode ?: return false
|
||||||
currentPosition++
|
currentPosition++
|
||||||
if (currentPosition >= programCode.length) {
|
return if (currentPosition >= programCode.length) {
|
||||||
if (eofThrow) {
|
if (eofThrow) {
|
||||||
throw InvalidTokenException("Unexpected EOF near `$currentChar' in line $lineNumber")
|
throw InvalidTokenException("Unexpected EOF near `$currentChar' in line $lineNumber")
|
||||||
}
|
}
|
||||||
return false
|
false
|
||||||
} else {
|
} else {
|
||||||
currentChar = programCode[currentPosition]
|
currentChar = programCode[currentPosition]
|
||||||
return true
|
true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ class NeoLangLexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun getNextTokenAsNumber(): String {
|
private fun getNextTokenAsNumber(): String {
|
||||||
var numberValue: Double = (currentChar.toInt() - '0'.toInt()).toDouble()
|
var numberValue: Double = (currentChar.code - '0'.code).toDouble()
|
||||||
|
|
||||||
// Four types of numbers are supported:
|
// Four types of numbers are supported:
|
||||||
// Dec(123) Hex(0x123) Oct(017) Bin(0b11)
|
// Dec(123) Hex(0x123) Oct(017) Bin(0b11)
|
||||||
@ -151,12 +151,16 @@ class NeoLangLexer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Hex
|
// Hex
|
||||||
if (currentChar == 'x' || currentChar == 'X') {
|
numberValue = when (currentChar) {
|
||||||
numberValue = getNextHexNumber(numberValue)
|
'x', 'X' -> {
|
||||||
} else if (currentChar == 'b' || currentChar == 'B') {
|
getNextHexNumber(numberValue)
|
||||||
numberValue = getNextBinaryNumber(numberValue)
|
}
|
||||||
} else {
|
'b', 'B' -> {
|
||||||
numberValue = getNextOctalNumber(numberValue)
|
getNextBinaryNumber(numberValue)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
getNextOctalNumber(numberValue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -187,7 +191,7 @@ class NeoLangLexer {
|
|||||||
var value = numberValue
|
var value = numberValue
|
||||||
var loop = moveToNextChar() // skip 'x' or 'X'
|
var loop = moveToNextChar() // skip 'x' or 'X'
|
||||||
while (loop && (currentChar.isHexNumber())) {
|
while (loop && (currentChar.isHexNumber())) {
|
||||||
value *= 16 + (currentChar.toInt().and(15)) + if (currentChar >= 'A') 9 else 0
|
value *= 16 + (currentChar.code.and(15)) + if (currentChar >= 'A') 9 else 0
|
||||||
loop = moveToNextChar()
|
loop = moveToNextChar()
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
@ -240,7 +244,7 @@ class NeoLangLexer {
|
|||||||
|
|
||||||
private fun Char.toNumber(): Int {
|
private fun Char.toNumber(): Int {
|
||||||
return if (isNumber()) {
|
return if (isNumber()) {
|
||||||
this.toInt() - '0'.toInt()
|
this.code - '0'.code
|
||||||
} else 0
|
} else 0
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package io.neolang.frontend
|
package com.evolinx.neolang.frontend
|
||||||
|
|
||||||
import io.neolang.runtime.NeoLangValue
|
import com.evolinx.neolang.runtime.NeoLangValue
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,6 +1,6 @@
|
|||||||
package io.neolang.frontend
|
package com.evolinx.neolang.frontend
|
||||||
|
|
||||||
import io.neolang.runtime.NeoLangValue
|
import com.evolinx.neolang.runtime.NeoLangValue
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,8 +1,8 @@
|
|||||||
package io.neolang.frontend
|
package com.evolinx.neolang.frontend
|
||||||
|
|
||||||
import io.neolang.runtime.NeoLangArray
|
import com.evolinx.neolang.runtime.NeoLangArray
|
||||||
import io.neolang.runtime.NeoLangContext
|
import com.evolinx.neolang.runtime.NeoLangContext
|
||||||
import io.neolang.runtime.NeoLangValue
|
import com.evolinx.neolang.runtime.NeoLangValue
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class ConfigVisitor : IVisitorCallback {
|
class ConfigVisitor : IVisitorCallback {
|
@ -1,4 +1,4 @@
|
|||||||
package io.neolang.runtime
|
package com.evolinx.neolang.runtime
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,4 +1,4 @@
|
|||||||
package io.neolang.runtime
|
package com.evolinx.neolang.runtime
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,5 +1,5 @@
|
|||||||
// ISessionConnection.aidl
|
// ISessionConnection.aidl
|
||||||
package com.offsec.nhterm.bridge;
|
package com.evolinx.terminal.bridge;
|
||||||
|
|
||||||
// Declare any non-default types here with import statements
|
// Declare any non-default types here with import statements
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.bridge;
|
package com.evolinx.terminal.bridge;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
@ -16,8 +16,8 @@ public class Bridge {
|
|||||||
public static final String EXTRA_EXECUTABLE = "neoterm.extra.remote.execute.executable";
|
public static final String EXTRA_EXECUTABLE = "neoterm.extra.remote.execute.executable";
|
||||||
public static final String EXTRA_SESSION_ID = "neoterm.extra.remote.execute.session";
|
public static final String EXTRA_SESSION_ID = "neoterm.extra.remote.execute.session";
|
||||||
public static final String EXTRA_FOREGROUND = "neoterm.extra.remote.execute.foreground";
|
public static final String EXTRA_FOREGROUND = "neoterm.extra.remote.execute.foreground";
|
||||||
private static final String NEOTERM_PACKAGE = "com.offsec.nhterm";
|
private static final String NEOTERM_PACKAGE = "com.evolinx.terminal";
|
||||||
private static final String NEOTERM_REMOTE_INTERFACE = "com.offsec.nhterm.ui.term.NeoTermRemoteInterface";
|
private static final String NEOTERM_REMOTE_INTERFACE = "com.evolinx.terminal.ui.term.NeoTermRemoteInterface";
|
||||||
private static final ComponentName NEOTERM_COMPONENT = new ComponentName(NEOTERM_PACKAGE, NEOTERM_REMOTE_INTERFACE);
|
private static final ComponentName NEOTERM_COMPONENT = new ComponentName(NEOTERM_PACKAGE, NEOTERM_REMOTE_INTERFACE);
|
||||||
|
|
||||||
private Bridge() throws IllegalAccessException {
|
private Bridge() throws IllegalAccessException {
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.bridge;
|
package com.evolinx.terminal.bridge;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.bridge;
|
package com.evolinx.terminal.bridge;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -20,7 +20,7 @@ android {
|
|||||||
jniLibs.srcDirs = ['src/main/jniLibs']
|
jniLibs.srcDirs = ['src/main/jniLibs']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
namespace 'com.offsec.nhterm.xorg'
|
namespace 'com.evolinx.terminal.xorg'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.hardware.Sensor;
|
import android.hardware.Sensor;
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
|
|
||||||
import android.media.AudioFormat;
|
import android.media.AudioFormat;
|
||||||
@ -29,7 +29,7 @@ import android.media.AudioRecord;
|
|||||||
import android.media.AudioTrack;
|
import android.media.AudioTrack;
|
||||||
import android.media.MediaRecorder.AudioSource;
|
import android.media.MediaRecorder.AudioSource;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
|
|
||||||
import java.util.concurrent.Semaphore;
|
import java.util.concurrent.Semaphore;
|
||||||
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
import android.content.ClipboardManager.OnPrimaryClipChangedListener;
|
import android.content.ClipboardManager.OnPrimaryClipChangedListener;
|
@ -18,7 +18,7 @@
|
|||||||
/* This is GLSurfaceView class ripped out of Android 2.1 sources,
|
/* This is GLSurfaceView class ripped out of Android 2.1 sources,
|
||||||
fixed with a hammer to work with libSDL port */
|
fixed with a hammer to work with libSDL port */
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.app.KeyguardManager;
|
import android.app.KeyguardManager;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.view.KeyEvent;
|
import android.view.KeyEvent;
|
||||||
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
@ -48,8 +48,8 @@ import android.view.View.OnKeyListener;
|
|||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import androidx.appcompat.app.AppCompatActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
@ -28,8 +28,8 @@ import android.os.Environment;
|
|||||||
import android.os.StatFs;
|
import android.os.StatFs;
|
||||||
import android.util.DisplayMetrics;
|
import android.util.DisplayMetrics;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
@ -20,11 +20,11 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -35,7 +35,7 @@ import android.view.ViewGroup;
|
|||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -32,7 +32,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.*;
|
import android.widget.*;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.DialogInterface;
|
import android.content.DialogInterface;
|
||||||
import android.graphics.Bitmap;
|
import android.graphics.Bitmap;
|
||||||
@ -34,7 +34,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import androidx.appcompat.app.AlertDialog;
|
import androidx.appcompat.app.AlertDialog;
|
||||||
import com.offsec.nhterm.xorg.R;
|
import com.evolinx.terminal.xorg.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
@ -31,7 +31,7 @@ import android.util.DisplayMetrics;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
import com.offsec.nhterm.xorg.NeoXorgViewClient;
|
import com.evolinx.terminal.xorg.NeoXorgViewClient;
|
||||||
|
|
||||||
import javax.microedition.khronos.egl.*;
|
import javax.microedition.khronos.egl.*;
|
||||||
import javax.microedition.khronos.opengles.GL10;
|
import javax.microedition.khronos.opengles.GL10;
|
@ -20,7 +20,7 @@ freely, subject to the following restrictions:
|
|||||||
3. This notice may not be removed or altered from any source distribution.
|
3. This notice may not be removed or altered from any source distribution.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.offsec.nhterm;
|
package com.evolinx.terminal;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
@ -1,9 +1,9 @@
|
|||||||
package com.offsec.nhterm.xorg;
|
package com.evolinx.terminal.xorg;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.view.WindowManager;
|
import android.view.WindowManager;
|
||||||
import com.offsec.nhterm.NeoGLView;
|
import com.evolinx.terminal.NeoGLView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author kiva
|
* @author kiva
|
16
build.gradle
16
build.gradle
@ -1,21 +1,19 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
ext.kotlin_version = '1.6.10'
|
ext.kotlin_version = '1.8.10'
|
||||||
ext.android = [
|
ext.android = [
|
||||||
KOTLIN_VERSION : '1.6.10',
|
KOTLIN_VERSION : '1.8.10',
|
||||||
MIN_SDK_VERSION : 21,
|
MIN_SDK_VERSION : 21,
|
||||||
COMPILE_SDK_VERSION: 31,
|
COMPILE_SDK_VERSION: 34,
|
||||||
TARGET_SDK_VERSION : 28,
|
TARGET_SDK_VERSION : 30,
|
||||||
JUNIT_VERSION : "4.12"
|
JUNIT_VERSION : "4.12"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
ext {
|
ext {
|
||||||
//version=YYYYMMVVRR (Either "VV" for stable version OR "RR" for pre-release candidate (e.g. 0001 for rc1))
|
|
||||||
//noinspection HighAppVersionCode
|
//noinspection HighAppVersionCode
|
||||||
versionCode=2023040200
|
versionCode=10000
|
||||||
versionName="2024.1-rc2"
|
versionName="1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
ext.deps = [
|
ext.deps = [
|
||||||
@ -35,7 +33,7 @@ buildscript {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:8.1.0'
|
classpath 'com.android.tools.build:gradle:8.3.1'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath rootProject.ext.deps["kotlin-gradle-plugin"]
|
classpath rootProject.ext.deps["kotlin-gradle-plugin"]
|
||||||
|
|
||||||
|
@ -20,8 +20,10 @@ dependencies {
|
|||||||
implementation rootProject.ext.deps["annotations"]
|
implementation rootProject.ext.deps["annotations"]
|
||||||
testImplementation rootProject.ext.deps["junit"]
|
testImplementation rootProject.ext.deps["junit"]
|
||||||
|
|
||||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
implementation 'androidx.appcompat:appcompat:1.3.0'
|
||||||
implementation 'androidx.appcompat:appcompat-resources:1.2.0'
|
implementation 'androidx.appcompat:appcompat-resources:1.3.0'
|
||||||
|
implementation 'com.google.android.material:material:1.5.0'
|
||||||
|
implementation "androidx.compose.material:material:1.0.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
|
@ -28,8 +28,8 @@ import android.util.AttributeSet;
|
|||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
|
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
import android.widget.Toolbar;
|
||||||
import androidx.annotation.*;
|
import androidx.annotation.*;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
|
||||||
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
import androidx.appcompat.widget.Toolbar.OnMenuItemClickListener;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.core.util.Pair;
|
import androidx.core.util.Pair;
|
||||||
@ -55,6 +55,8 @@ import static de.mrapp.android.util.Condition.ensureNotNull;
|
|||||||
import static de.mrapp.android.util.DisplayUtil.getDeviceType;
|
import static de.mrapp.android.util.DisplayUtil.getDeviceType;
|
||||||
import static de.mrapp.android.util.DisplayUtil.getOrientation;
|
import static de.mrapp.android.util.DisplayUtil.getOrientation;
|
||||||
|
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A tab switcher, which allows to switch between multiple tabs. It it is designed similar to the
|
* A tab switcher, which allows to switch between multiple tabs. It it is designed similar to the
|
||||||
* tab switcher of the Google Chrome Android app.
|
* tab switcher of the Google Chrome Android app.
|
||||||
@ -1263,7 +1265,7 @@ public class TabSwitcher extends FrameLayout implements TabSwitcherLayout, Model
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public final CharSequence getToolbarTitle() {
|
public final CharSequence getToolbarTitle() {
|
||||||
Toolbar[] toolbars = getToolbars();
|
MaterialToolbar[] toolbars = getToolbars();
|
||||||
return toolbars != null ? toolbars[0].getTitle() : model.getToolbarTitle();
|
return toolbars != null ? toolbars[0].getTitle() : model.getToolbarTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1280,7 +1282,7 @@ public class TabSwitcher extends FrameLayout implements TabSwitcherLayout, Model
|
|||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public final Drawable getToolbarNavigationIcon() {
|
public final Drawable getToolbarNavigationIcon() {
|
||||||
Toolbar[] toolbars = getToolbars();
|
MaterialToolbar[] toolbars = getToolbars();
|
||||||
return toolbars != null ? toolbars[0].getNavigationIcon() :
|
return toolbars != null ? toolbars[0].getNavigationIcon() :
|
||||||
model.getToolbarNavigationIcon();
|
model.getToolbarNavigationIcon();
|
||||||
}
|
}
|
||||||
@ -1335,7 +1337,7 @@ public class TabSwitcher extends FrameLayout implements TabSwitcherLayout, Model
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final Toolbar[] getToolbars() {
|
public final MaterialToolbar[] getToolbars() {
|
||||||
return layout != null ? layout.getToolbars() : null;
|
return layout != null ? layout.getToolbars() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1397,4 +1399,4 @@ public class TabSwitcher extends FrameLayout implements TabSwitcherLayout, Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,7 @@ import android.view.Menu;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.appcompat.widget.Toolbar;
|
import androidx.appcompat.widget.Toolbar;
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar;
|
||||||
import de.mrapp.android.tabswitcher.TabSwitcher;
|
import de.mrapp.android.tabswitcher.TabSwitcher;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -54,7 +55,7 @@ public interface TabSwitcherLayout {
|
|||||||
* shown, as an array of the type Toolbar or null, if the view has not been laid out yet
|
* shown, as an array of the type Toolbar or null, if the view has not been laid out yet
|
||||||
*/
|
*/
|
||||||
@Nullable
|
@Nullable
|
||||||
Toolbar[] getToolbars();
|
MaterialToolbar[] getToolbars();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the menu of the toolbar, which is shown, when the tab switcher is shown. When using
|
* Returns the menu of the toolbar, which is shown, when the tab switcher is shown. When using
|
||||||
@ -66,4 +67,4 @@ public interface TabSwitcherLayout {
|
|||||||
@Nullable
|
@Nullable
|
||||||
Menu getToolbarMenu();
|
Menu getToolbarMenu();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,8 @@ import java.util.Collections;
|
|||||||
|
|
||||||
import static de.mrapp.android.util.Condition.*;
|
import static de.mrapp.android.util.Condition.*;
|
||||||
|
|
||||||
|
import com.google.android.material.appbar.MaterialToolbar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A layout, which implements the functionality of a {@link TabSwitcher} on smartphones.
|
* A layout, which implements the functionality of a {@link TabSwitcher} on smartphones.
|
||||||
*
|
*
|
||||||
@ -344,7 +346,7 @@ public class PhoneTabSwitcherLayout extends AbstractTabSwitcherLayout
|
|||||||
/**
|
/**
|
||||||
* The toolbar, which is shown, when the tab switcher is shown.
|
* The toolbar, which is shown, when the tab switcher is shown.
|
||||||
*/
|
*/
|
||||||
private Toolbar toolbar;
|
private MaterialToolbar toolbar;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The bottom margin of a view, which visualizes a tab.
|
* The bottom margin of a view, which visualizes a tab.
|
||||||
@ -3168,9 +3170,9 @@ public class PhoneTabSwitcherLayout extends AbstractTabSwitcherLayout
|
|||||||
LayoutInflater inflater = LayoutInflater.from(getContext());
|
LayoutInflater inflater = LayoutInflater.from(getContext());
|
||||||
|
|
||||||
if (tabsOnly) {
|
if (tabsOnly) {
|
||||||
toolbar = (Toolbar) getTabSwitcher().findViewById(R.id.primary_toolbar);
|
toolbar = (MaterialToolbar) getTabSwitcher().findViewById(R.id.primary_toolbar);
|
||||||
} else {
|
} else {
|
||||||
toolbar = (Toolbar) inflater.inflate(R.layout.phone_toolbar, getTabSwitcher(), false);
|
toolbar = (MaterialToolbar) inflater.inflate(R.layout.phone_toolbar, getTabSwitcher(), false);
|
||||||
toolbar.setVisibility(getModel().areToolbarsShown() ? View.VISIBLE : View.INVISIBLE);
|
toolbar.setVisibility(getModel().areToolbarsShown() ? View.VISIBLE : View.INVISIBLE);
|
||||||
getTabSwitcher().addView(toolbar);
|
getTabSwitcher().addView(toolbar);
|
||||||
}
|
}
|
||||||
@ -3235,8 +3237,8 @@ public class PhoneTabSwitcherLayout extends AbstractTabSwitcherLayout
|
|||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public final Toolbar[] getToolbars() {
|
public final MaterialToolbar[] getToolbars() {
|
||||||
return new Toolbar[]{toolbar};
|
return new MaterialToolbar[]{toolbar};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -3527,4 +3529,4 @@ public class PhoneTabSwitcherLayout extends AbstractTabSwitcherLayout
|
|||||||
(remove ? "" : "not ") + "be removed");
|
(remove ? "" : "not ") + "be removed");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, e
|
|||||||
implied. See the License for the specific language governing permissions and limitations under the
|
implied. See the License for the specific language governing permissions and limitations under the
|
||||||
License.
|
License.
|
||||||
-->
|
-->
|
||||||
<androidx.appcompat.widget.Toolbar
|
<com.google.android.material.appbar.MaterialToolbar
|
||||||
android:id="@+id/primary_toolbar"
|
android:id="@+id/primary_toolbar"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
@ -22,4 +22,4 @@ License.
|
|||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:theme="@style/ThemeOverlay.AppCompat.Dark"
|
android:theme="@style/ThemeOverlay.AppCompat.Dark"
|
||||||
android:visibility="invisible"
|
android:visibility="invisible"
|
||||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
||||||
|
@ -1,18 +1,17 @@
|
|||||||
# Project-wide Gradle settings.
|
## For more details on how to configure your build environment visit
|
||||||
# IDE (e.g. Android Studio) users:
|
|
||||||
# Gradle settings configured through the IDE *will override*
|
|
||||||
# any settings specified in this file.
|
|
||||||
# For more details on how to configure your build environment visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||||
|
#
|
||||||
# Specifies the JVM arguments used for the daemon process.
|
# Specifies the JVM arguments used for the daemon process.
|
||||||
# The setting is particularly useful for tweaking memory settings.
|
# The setting is particularly useful for tweaking memory settings.
|
||||||
|
# Default value: -Xmx1024m -XX:MaxPermSize=256m
|
||||||
|
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||||
|
#
|
||||||
|
# When configured, Gradle will run in incubating parallel mode.
|
||||||
|
# This option should only be used with decoupled projects. For more details, visit
|
||||||
|
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||||
|
# org.gradle.parallel=true
|
||||||
|
#Wed Apr 03 19:30:41 EEST 2024
|
||||||
android.enableJetifier=true
|
android.enableJetifier=true
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
org.gradle.jvmargs=-Xmx1536m
|
|
||||||
|
|
||||||
# When configured, Gradle will run in incubating parallel mode.
|
|
||||||
# This option should only be used with decoupled projects. More details, visit
|
|
||||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
|
||||||
# org.gradle.parallel=true
|
|
||||||
|
|
||||||
ndkVersion=25.1.8937393
|
ndkVersion=25.1.8937393
|
||||||
|
org.gradle.jvmargs=-Xmx1024M -Dkotlin.daemon.jvm.options\="-Xmx1024M"
|
||||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
#Tue Apr 20 22:03:06 EEST 2021
|
#Tue Apr 09 00:39:40 EEST 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
|
|
||||||
|
Binary file not shown.
@ -1,17 +0,0 @@
|
|||||||
#!/data/data/com.offsec.nhterm/files/usr/bin/bash
|
|
||||||
# Version: 1.0.3
|
|
||||||
|
|
||||||
# export path for android bins/tools
|
|
||||||
export PATH="/data/data/com.offsec.nethunter/files/scripts:/data/data/com.offsec.nethunter/files/scripts/bin:/data/data/com.offsec.nhterm/files/home/.nhterm/script:/data/data/com.offsec.nhterm/files/usr/bin:/data/data/com.offsec.nhterm/files/usr/sbin:/sbin:/system/bin:/system/xbin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/odm/bin:/vendor/bin:."
|
|
||||||
# Remove some exports that break default android binaries from running
|
|
||||||
unset LD_LIBRARY_PATH
|
|
||||||
unset LD_PRELOAD
|
|
||||||
export PS1="\\[\\e[1;32m\\]\\u [ \\[\\e[0m\\]\\w\\[\\e[1;32m\\] ]\$ \\[\\e[0m\\]"
|
|
||||||
# Find and remember su location
|
|
||||||
SU1=$(which su)
|
|
||||||
SU2="$SU1 -mm -s $@"
|
|
||||||
|
|
||||||
# clear out old view
|
|
||||||
clear
|
|
||||||
|
|
||||||
$SU2 /data/data/com.offsec.nhterm/files/usr/bin/bash
|
|
Binary file not shown.
@ -1,37 +0,0 @@
|
|||||||
#!/data/data/com.offsec.nhterm/files/usr/bin/bash
|
|
||||||
# Version: 1.0.2
|
|
||||||
|
|
||||||
# export path for android bins/tools
|
|
||||||
export PATH=/data/data/com.offsec.nhterm/files/home/.nhterm/script:/data/data/com.offsec.nhterm/files/usr/bin:/data/data/com.offsec.nhterm/files/usr/sbin:/sbin:/system/bin:/system/xbin:/apex/com.android.runtime/bin:/apex/com.android.art/bin:/odm/bin:/vendor/bin:.
|
|
||||||
|
|
||||||
SU1=$(which su)
|
|
||||||
SU2="$SU1 -c $@"
|
|
||||||
|
|
||||||
# clear out old view
|
|
||||||
clear
|
|
||||||
|
|
||||||
# unset things and readd chroot things
|
|
||||||
unset PATH
|
|
||||||
unset TMP
|
|
||||||
unset TMPDIR
|
|
||||||
unset HOME
|
|
||||||
unset LD_PRELOAD
|
|
||||||
unset LD_LIBRARY_PATH
|
|
||||||
|
|
||||||
## Combine android $PATH to kali chroot $PATH
|
|
||||||
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
|
||||||
export TERM=xterm-256color
|
|
||||||
export LANG=en_US.UTF-8
|
|
||||||
export HOME=/root
|
|
||||||
export TMP=/tmp
|
|
||||||
export TMPDIR=/tmp
|
|
||||||
export USER=root
|
|
||||||
export MAIL=/var/mail/root
|
|
||||||
export LOGNAME=root
|
|
||||||
export SHLVL=1
|
|
||||||
# Lets pass a binky export here too ;)
|
|
||||||
export YOU_KNOW_WHAT=THIS_IS_KALI_LINUX_NETHUNTER_FROM_JAVA_BINKY
|
|
||||||
|
|
||||||
$SU2 /system/bin/chroot /data/local/nhsystem/kalifs su
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
|||||||
color-scheme: {
|
|
||||||
name: "Default"
|
|
||||||
version: 1.1
|
|
||||||
|
|
||||||
colors: {
|
|
||||||
foreground: #ffffff
|
|
||||||
cursor: #a9aaa9
|
|
||||||
background: #14181c
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,116 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright (C) 2014 The Android Open Source Project
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
package com.offsec.nhterm.ui.settings
|
|
||||||
|
|
||||||
import android.content.res.Configuration
|
|
||||||
import android.content.res.Resources.Theme
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.preference.PreferenceActivity
|
|
||||||
import android.view.MenuInflater
|
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
|
||||||
import androidx.annotation.LayoutRes
|
|
||||||
import androidx.annotation.StyleRes
|
|
||||||
import androidx.appcompat.app.ActionBar
|
|
||||||
import androidx.appcompat.app.AppCompatDelegate
|
|
||||||
import androidx.core.content.res.ResourcesCompat.ThemeCompat
|
|
||||||
import androidx.preference.Preference
|
|
||||||
import androidx.preference.PreferenceScreen
|
|
||||||
import com.offsec.nhterm.R
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A [android.preference.PreferenceActivity] which implements and proxies the necessary calls
|
|
||||||
* to be used with AppCompat.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* This technique can be used with an [android.app.Activity] class, not just
|
|
||||||
* [android.preference.PreferenceActivity].
|
|
||||||
*/
|
|
||||||
abstract class BasePreferenceActivity : PreferenceActivity() {
|
|
||||||
private var mDelegate: AppCompatDelegate? = null
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
delegate.installViewFactory()
|
|
||||||
delegate.onCreate(savedInstanceState)
|
|
||||||
delegate.setTheme(R.style.AppTheme)
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPostCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onPostCreate(savedInstanceState)
|
|
||||||
delegate.onPostCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
|
|
||||||
val supportActionBar: ActionBar?
|
|
||||||
get() = delegate.supportActionBar
|
|
||||||
|
|
||||||
override fun getMenuInflater(): MenuInflater {
|
|
||||||
return delegate.menuInflater
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setContentView(@LayoutRes layoutResID: Int) {
|
|
||||||
delegate.setContentView(layoutResID)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setContentView(view: View) {
|
|
||||||
delegate.setContentView(view)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun setContentView(view: View, params: ViewGroup.LayoutParams) {
|
|
||||||
delegate.setContentView(view, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun addContentView(view: View, params: ViewGroup.LayoutParams) {
|
|
||||||
delegate.addContentView(view, params)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onPostResume() {
|
|
||||||
super.onPostResume()
|
|
||||||
delegate.onPostResume()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTitleChanged(title: CharSequence, color: Int) {
|
|
||||||
super.onTitleChanged(title, color)
|
|
||||||
delegate.setTitle(title)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onConfigurationChanged(newConfig: Configuration) {
|
|
||||||
super.onConfigurationChanged(newConfig)
|
|
||||||
delegate.onConfigurationChanged(newConfig)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onStop() {
|
|
||||||
super.onStop()
|
|
||||||
delegate.onStop()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onDestroy() {
|
|
||||||
super.onDestroy()
|
|
||||||
delegate.onDestroy()
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun invalidateOptionsMenu() {
|
|
||||||
delegate.invalidateOptionsMenu()
|
|
||||||
}
|
|
||||||
|
|
||||||
private val delegate: AppCompatDelegate
|
|
||||||
get() {
|
|
||||||
if (mDelegate == null) {
|
|
||||||
mDelegate = AppCompatDelegate.create(this, null)
|
|
||||||
}
|
|
||||||
return mDelegate!!
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package com.offsec.nhterm.ui.settings
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.preference.PreferenceActivity
|
|
||||||
import android.view.MenuItem
|
|
||||||
import androidx.preference.Preference
|
|
||||||
import com.offsec.nhterm.R
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author kiva
|
|
||||||
*/
|
|
||||||
class GeneralSettingsActivity : BasePreferenceActivity() {
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
supportActionBar?.title = getString(R.string.general_settings)
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
||||||
addPreferencesFromResource(R.xml.setting_general)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onBuildHeaders(target: MutableList<PreferenceActivity.Header>?) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item?.itemId) {
|
|
||||||
android.R.id.home -> finish()
|
|
||||||
}
|
|
||||||
return item?.let { super.onOptionsItemSelected(it) }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
package com.offsec.nhterm.ui.settings
|
|
||||||
|
|
||||||
import android.os.Build
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.MenuItem
|
|
||||||
import com.offsec.nhterm.R
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author Lody
|
|
||||||
*/
|
|
||||||
class SettingActivity : BasePreferenceActivity() {
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
supportActionBar?.title = getString(R.string.settings)
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
||||||
addPreferencesFromResource(R.xml.settings_main)
|
|
||||||
} else {
|
|
||||||
addPreferencesFromResource(R.xml.older_settings_main)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onBuildHeaders(target: MutableList<Header>?) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item?.itemId) {
|
|
||||||
android.R.id.home ->
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
return item?.let { super.onOptionsItemSelected(it) }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package com.offsec.nhterm.ui.settings
|
|
||||||
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.view.MenuItem
|
|
||||||
import com.offsec.nhterm.R
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author kiva
|
|
||||||
*/
|
|
||||||
class UISettingsActivity : BasePreferenceActivity() {
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
supportActionBar?.title = getString(R.string.ui_settings)
|
|
||||||
supportActionBar?.setDisplayHomeAsUpEnabled(true)
|
|
||||||
addPreferencesFromResource(R.xml.settings_ui)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onBuildHeaders(target: MutableList<Header>?) {
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
|
||||||
when (item?.itemId) {
|
|
||||||
android.R.id.home ->
|
|
||||||
finish()
|
|
||||||
}
|
|
||||||
return item?.let { super.onOptionsItemSelected(it) }
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +1 @@
|
|||||||
include ':nhterm', ':chrome-tabs', ':NeoLang', ':Xorg', ':NeoTermBridge'
|
include ':terminal', ':chrome-tabs', ':NeoLang', ':Xorg', ':NeoTermBridge'
|
||||||
|
0
nhterm/.gitignore → terminal/.gitignore
vendored
0
nhterm/.gitignore → terminal/.gitignore
vendored
@ -5,7 +5,7 @@ android {
|
|||||||
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION
|
compileSdkVersion rootProject.ext.android.COMPILE_SDK_VERSION
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
applicationId "com.offsec.nhterm"
|
applicationId "com.evolinx.terminal"
|
||||||
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
|
minSdkVersion rootProject.ext.android.MIN_SDK_VERSION
|
||||||
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
|
targetSdkVersion rootProject.ext.android.TARGET_SDK_VERSION
|
||||||
versionCode rootProject.ext.versionCode
|
versionCode rootProject.ext.versionCode
|
||||||
@ -18,14 +18,6 @@ android {
|
|||||||
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
|
abiFilters 'arm64-v8a', 'armeabi-v7a', 'x86_64'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signingConfigs {
|
|
||||||
debug {
|
|
||||||
storeFile file('nethunter-debug.jks')
|
|
||||||
keyAlias 'nethunter'
|
|
||||||
storePassword 'nethunter'
|
|
||||||
keyPassword 'nethunter'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
main {
|
main {
|
||||||
jniLibs.srcDirs = ['src/main/jniLibs']
|
jniLibs.srcDirs = ['src/main/jniLibs']
|
||||||
@ -35,6 +27,11 @@ android {
|
|||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
zipAlignEnabled true
|
zipAlignEnabled true
|
||||||
|
versionName + "-release"
|
||||||
|
}
|
||||||
|
debug {
|
||||||
|
zipAlignEnabled true
|
||||||
|
versionName + "-debug"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
externalNativeBuild {
|
externalNativeBuild {
|
||||||
@ -43,17 +40,18 @@ android {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
compileOptions {
|
compileOptions {
|
||||||
targetCompatibility 1.8
|
targetCompatibility 17
|
||||||
sourceCompatibility 1.8
|
sourceCompatibility 17
|
||||||
}
|
}
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
freeCompilerArgs = ["-Xallow-result-return-type"]
|
freeCompilerArgs = ["-Xallow-result-return-type"]
|
||||||
|
jvmTarget = "17"
|
||||||
}
|
}
|
||||||
lint {
|
lint {
|
||||||
abortOnError false
|
abortOnError false
|
||||||
checkReleaseBuilds false
|
checkReleaseBuilds false
|
||||||
}
|
}
|
||||||
namespace 'com.offsec.nhterm'
|
namespace 'com.evolinx.terminal'
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@ -61,7 +59,7 @@ dependencies {
|
|||||||
testImplementation rootProject.ext.deps["junit"]
|
testImplementation rootProject.ext.deps["junit"]
|
||||||
androidTestImplementation project(path: ':NeoLang')
|
androidTestImplementation project(path: ':NeoLang')
|
||||||
|
|
||||||
implementation rootProject.ext.deps["kotlin-stdlib"]
|
//implementation rootProject.ext.deps["kotlin-stdlib"]
|
||||||
|
|
||||||
implementation 'org.greenrobot:eventbus:3.3.1'
|
implementation 'org.greenrobot:eventbus:3.3.1'
|
||||||
implementation 'com.github.wrdlbrnft:modular-adapter:0.3.0.22'
|
implementation 'com.github.wrdlbrnft:modular-adapter:0.3.0.22'
|
||||||
@ -71,14 +69,18 @@ dependencies {
|
|||||||
implementation 'com.github.GrenderG:Color-O-Matic:1.1.5'
|
implementation 'com.github.GrenderG:Color-O-Matic:1.1.5'
|
||||||
implementation 'com.github.topjohnwu.libsu:core:5.2.1'
|
implementation 'com.github.topjohnwu.libsu:core:5.2.1'
|
||||||
|
|
||||||
implementation 'androidx.annotation:annotation:1.3.0'
|
// AndroidX
|
||||||
implementation "androidx.core:core:1.6.0"
|
implementation 'androidx.annotation:annotation:1.5.0'
|
||||||
|
implementation "androidx.core:core:1.8.0"
|
||||||
implementation 'androidx.cardview:cardview:1.0.0'
|
implementation 'androidx.cardview:cardview:1.0.0'
|
||||||
implementation 'androidx.appcompat:appcompat:1.3.0'
|
implementation 'androidx.preference:preference:1.2.1'
|
||||||
implementation 'androidx.appcompat:appcompat-resources:1.3.0'
|
//implementation 'androidx.preference:preference-ktx:1.2.1'
|
||||||
|
|
||||||
|
// Themes
|
||||||
implementation 'com.google.android.material:material:1.5.0'
|
implementation 'com.google.android.material:material:1.5.0'
|
||||||
implementation 'androidx.preference:preference:1.1.0'
|
implementation "androidx.compose.material3:material3:1.1.0"
|
||||||
implementation "androidx.compose.material:material:1.0.0"
|
implementation 'androidx.appcompat:appcompat:1.3.1'
|
||||||
|
implementation 'androidx.appcompat:appcompat-resources:1.3.1'
|
||||||
|
|
||||||
// Backports for lower api levels
|
// Backports for lower api levels
|
||||||
implementation 'com.llamalab.safs:safs-core:0.2.0'
|
implementation 'com.llamalab.safs:safs-core:0.2.0'
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
package="com.offsec.nhterm">
|
package="com.evolinx.terminal">
|
||||||
|
|
||||||
<uses-feature
|
<uses-feature
|
||||||
android:name="android.hardware.touchscreen"
|
android:name="android.hardware.touchscreen"
|
||||||
@ -143,6 +143,7 @@
|
|||||||
android:name=".ui.other.AboutActivity"
|
android:name=".ui.other.AboutActivity"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/about"
|
android:label="@string/about"
|
||||||
|
android:parentActivityName=".ui.settings.BasePreferenceActivity"
|
||||||
android:theme="@style/AppTheme.NoActionBar"/>
|
android:theme="@style/AppTheme.NoActionBar"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.other.CrashActivity"
|
android:name=".ui.other.CrashActivity"
|
||||||
@ -175,18 +176,17 @@
|
|||||||
android:label="@string/pref_customization_color_scheme"
|
android:label="@string/pref_customization_color_scheme"
|
||||||
android:theme="@style/AppTheme.NoActionBar"/>
|
android:theme="@style/AppTheme.NoActionBar"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.settings.SettingActivity"
|
android:name=".ui.settings.BasePreferenceActivity"
|
||||||
android:exported="false"
|
android:parentActivityName=".ui.term.NeoTermActivity"
|
||||||
android:theme="@style/AppTheme"/>
|
android:theme="@style/AppTheme"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.settings.GeneralSettingsActivity"
|
android:name=".ui.settings.BasePreferenceGeneralActivity"
|
||||||
android:exported="false"
|
android:parentActivityName=".ui.settings.BasePreferenceActivity"
|
||||||
android:theme="@style/AppTheme"/>
|
android:theme="@style/AppTheme"/>
|
||||||
<activity
|
<activity
|
||||||
android:name=".ui.settings.UISettingsActivity"
|
android:name=".ui.settings.BasePreferenceUIActivity"
|
||||||
android:exported="false"
|
android:parentActivityName=".ui.settings.BasePreferenceActivity"
|
||||||
android:theme="@style/AppTheme"/>
|
android:theme="@style/AppTheme"/>
|
||||||
|
|
||||||
<service
|
<service
|
||||||
android:name=".services.NeoTermService"
|
android:name=".services.NeoTermService"
|
||||||
android:enabled="true"/>
|
android:enabled="true"/>
|
@ -1,5 +1,5 @@
|
|||||||
color-scheme: {
|
color-scheme: {
|
||||||
name: "Kali"
|
name: "Default"
|
||||||
version: 1.0
|
version: 1.0
|
||||||
|
|
||||||
colors: {
|
colors: {
|
@ -7,7 +7,7 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
static const char *rewrite_executable(const char *filename, char *buffer, int buffer_len) {
|
static const char *rewrite_executable(const char *filename, char *buffer, int buffer_len) {
|
||||||
strcpy(buffer, "/data/data/com.offsec.nhterm/files/usr/bin/");
|
strcpy(buffer, "/data/data/com.evolinx.terminal/files/usr/bin/");
|
||||||
char *bin_match = strstr(filename, "/bin/");
|
char *bin_match = strstr(filename, "/bin/");
|
||||||
if (bin_match == filename || bin_match == (filename + 4)) {
|
if (bin_match == filename || bin_match == (filename + 4)) {
|
||||||
// We have either found "/bin/" at the start of the string or at
|
// We have either found "/bin/" at the start of the string or at
|
@ -10,7 +10,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define __nhterm_no_return __attribute__((__noreturn__))
|
#define __terminal_no_return __attribute__((__noreturn__))
|
||||||
|
|
||||||
#define TERMUX_UNUSED(x) x __attribute__((__unused__))
|
#define TERMUX_UNUSED(x) x __attribute__((__unused__))
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
@ -114,7 +114,7 @@ static int create_subprocess(JNIEnv *env,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT jint JNICALL Java_com_offsec_nhterm_backend_JNI_createSubprocess(
|
extern "C" JNIEXPORT jint JNICALL Java_com_evolinx_terminal_backend_JNI_createSubprocess(
|
||||||
JNIEnv *env,
|
JNIEnv *env,
|
||||||
jclass TERMUX_UNUSED(clazz),
|
jclass TERMUX_UNUSED(clazz),
|
||||||
jstring cmd,
|
jstring cmd,
|
||||||
@ -184,7 +184,7 @@ extern "C" JNIEXPORT jint JNICALL Java_com_offsec_nhterm_backend_JNI_createSubpr
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
Java_com_offsec_nhterm_backend_JNI_setPtyWindowSize(JNIEnv *TERMUX_UNUSED(env),
|
Java_com_evolinx_terminal_backend_JNI_setPtyWindowSize(JNIEnv *TERMUX_UNUSED(env),
|
||||||
jclass TERMUX_UNUSED(clazz),
|
jclass TERMUX_UNUSED(clazz),
|
||||||
jint fd, jint rows,
|
jint fd, jint rows,
|
||||||
jint cols) {
|
jint cols) {
|
||||||
@ -193,7 +193,7 @@ Java_com_offsec_nhterm_backend_JNI_setPtyWindowSize(JNIEnv *TERMUX_UNUSED(env),
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
Java_com_offsec_nhterm_backend_JNI_setPtyUTF8Mode(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
Java_com_evolinx_terminal_backend_JNI_setPtyUTF8Mode(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
||||||
jint fd) {
|
jint fd) {
|
||||||
struct termios tios;
|
struct termios tios;
|
||||||
tcgetattr(fd, &tios);
|
tcgetattr(fd, &tios);
|
||||||
@ -204,7 +204,7 @@ Java_com_offsec_nhterm_backend_JNI_setPtyUTF8Mode(JNIEnv *TERMUX_UNUSED(env), jc
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT int JNICALL
|
extern "C" JNIEXPORT int JNICALL
|
||||||
Java_com_offsec_nhterm_backend_JNI_waitFor(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
Java_com_evolinx_terminal_backend_JNI_waitFor(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
||||||
jint pid) {
|
jint pid) {
|
||||||
int status;
|
int status;
|
||||||
waitpid(pid, &status, 0);
|
waitpid(pid, &status, 0);
|
||||||
@ -219,7 +219,7 @@ Java_com_offsec_nhterm_backend_JNI_waitFor(JNIEnv *TERMUX_UNUSED(env), jclass TE
|
|||||||
}
|
}
|
||||||
|
|
||||||
extern "C" JNIEXPORT void JNICALL
|
extern "C" JNIEXPORT void JNICALL
|
||||||
Java_com_offsec_nhterm_backend_JNI_close(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
Java_com_evolinx_terminal_backend_JNI_close(JNIEnv *TERMUX_UNUSED(env), jclass TERMUX_UNUSED(clazz),
|
||||||
jint fileDescriptor) {
|
jint fileDescriptor) {
|
||||||
close(fileDescriptor);
|
close(fileDescriptor);
|
||||||
}
|
}
|
Before Width: | Height: | Size: 64 KiB After Width: | Height: | Size: 64 KiB |
@ -1,18 +1,19 @@
|
|||||||
package com.offsec.nhterm
|
package com.evolinx.terminal
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.Application
|
import android.app.Application
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.net.Uri
|
import android.net.Uri
|
||||||
|
import android.util.Log
|
||||||
import android.view.Gravity
|
import android.view.Gravity
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||||
import com.offsec.nhterm.component.NeoInitializer
|
import com.evolinx.terminal.component.NeoInitializer
|
||||||
import com.offsec.nhterm.component.config.NeoPreference
|
import com.evolinx.terminal.component.config.NeoPreference
|
||||||
import com.offsec.nhterm.ui.other.BonusActivity
|
import com.evolinx.terminal.component.config.NeoTermPath.BIN_PATH
|
||||||
import com.offsec.nhterm.utils.CrashHandler
|
import com.evolinx.terminal.ui.other.BonusActivity
|
||||||
import com.offsec.nhterm.utils.NeoPermission
|
import com.evolinx.terminal.utils.CrashHandler
|
||||||
import com.topjohnwu.superuser.Shell
|
import com.topjohnwu.superuser.Shell
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -23,8 +24,6 @@ class App : Application() {
|
|||||||
super.onCreate()
|
super.onCreate()
|
||||||
app = this
|
app = this
|
||||||
|
|
||||||
Shell.cmd("setenforce 0").exec()
|
|
||||||
|
|
||||||
NeoPreference.init(this)
|
NeoPreference.init(this)
|
||||||
CrashHandler.init()
|
CrashHandler.init()
|
||||||
NeoInitializer.init(this)
|
NeoInitializer.init(this)
|
||||||
@ -63,7 +62,7 @@ class App : Application() {
|
|||||||
if (happyCount == trigger / 2) {
|
if (happyCount == trigger / 2) {
|
||||||
@SuppressLint("ShowToast")
|
@SuppressLint("ShowToast")
|
||||||
val toast = Toast.makeText(this, message, Toast.LENGTH_LONG)
|
val toast = Toast.makeText(this, message, Toast.LENGTH_LONG)
|
||||||
toast.setGravity(Gravity.CENTER, 0, 0)
|
toast.setGravity(Gravity.BOTTOM, 0, 0)
|
||||||
toast.show()
|
toast.show()
|
||||||
} else if (happyCount > trigger) {
|
} else if (happyCount > trigger) {
|
||||||
NeoPreference.store(NeoPreference.KEY_HAPPY_EGG, 0)
|
NeoPreference.store(NeoPreference.KEY_HAPPY_EGG, 0)
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A circular byte buffer allowing one producer and one consumer thread.
|
* A circular byte buffer allowing one producer and one consumer thread.
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Native methods for creating and managing pseudoterminal subprocesses. C code is in jni/termux.c.
|
* Native methods for creating and managing pseudoterminal subprocesses. C code is in jni/termux.c.
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@ -399,9 +399,13 @@ public final class TerminalBuffer {
|
|||||||
throw new IllegalArgumentException(
|
throw new IllegalArgumentException(
|
||||||
"Illegal arguments! blockSet(" + sx + ", " + sy + ", " + w + ", " + h + ", " + val + ", " + mColumns + ", " + mScreenRows + ")");
|
"Illegal arguments! blockSet(" + sx + ", " + sy + ", " + w + ", " + h + ", " + val + ", " + mColumns + ", " + mScreenRows + ")");
|
||||||
}
|
}
|
||||||
for (int y = 0; y < h; y++)
|
for (int y = 0; y < h; y++) {
|
||||||
for (int x = 0; x < w; x++)
|
for (int x = 0; x < w; x++)
|
||||||
setChar(sx + x, sy + y, val, style);
|
setChar(sx + x, sy + y, val, style);
|
||||||
|
if (sx+w == mColumns && val == ' ') {
|
||||||
|
clearLineWrap(sy + y);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public TerminalRow allocateFullLineIfNecessary(int row) {
|
public TerminalRow allocateFullLineIfNecessary(int row) {
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Current terminal colors (if different from default).
|
* Current terminal colors (if different from default).
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
@ -10,6 +10,31 @@ import java.util.Arrays;
|
|||||||
public final class TerminalRow {
|
public final class TerminalRow {
|
||||||
|
|
||||||
private static final float SPARE_CAPACITY_FACTOR = 1.5f;
|
private static final float SPARE_CAPACITY_FACTOR = 1.5f;
|
||||||
|
/**
|
||||||
|
* Max combining characters that can exist in a column, that are separate from the base character
|
||||||
|
* itself. Any additional combining characters will be ignored and not added to the column.
|
||||||
|
*
|
||||||
|
* There does not seem to be limit in unicode standard for max number of combination characters
|
||||||
|
* that can be combined but such characters are primarily under 10.
|
||||||
|
*
|
||||||
|
* "Section 3.6 Combination" of unicode standard contains combining characters info.
|
||||||
|
* - https://www.unicode.org/versions/Unicode15.0.0/ch03.pdf
|
||||||
|
* - https://en.wikipedia.org/wiki/Combining_character#Unicode_ranges
|
||||||
|
* - https://stackoverflow.com/questions/71237212/what-is-the-maximum-number-of-unicode-combined-characters-that-may-be-needed-to
|
||||||
|
*
|
||||||
|
* UAX15-D3 Stream-Safe Text Format limits to max 30 combining characters.
|
||||||
|
* > The value of 30 is chosen to be significantly beyond what is required for any linguistic or technical usage.
|
||||||
|
* > While it would have been feasible to chose a smaller number, this value provides a very wide margin,
|
||||||
|
* > yet is well within the buffer size limits of practical implementations.
|
||||||
|
* - https://unicode.org/reports/tr15/#Stream_Safe_Text_Format
|
||||||
|
* - https://stackoverflow.com/a/11983435/14686958
|
||||||
|
*
|
||||||
|
* We choose the value 15 because it should be enough for terminal based applications and keep
|
||||||
|
* the memory usage low for a terminal row, won't affect performance or cause terminal to
|
||||||
|
* lag or hang, and will keep malicious applications from causing harm. The value can be
|
||||||
|
* increased if ever needed for legitimate applications.
|
||||||
|
*/
|
||||||
|
private static final int MAX_COMBINING_CHARACTERS_PER_COLUMN = 15;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The number of columns in this terminal row.
|
* The number of columns in this terminal row.
|
||||||
@ -178,18 +203,25 @@ public final class TerminalRow {
|
|||||||
// Get the number of elements in the mText array this column uses now
|
// Get the number of elements in the mText array this column uses now
|
||||||
int oldCharactersUsedForColumn;
|
int oldCharactersUsedForColumn;
|
||||||
if (columnToSet + oldCodePointDisplayWidth < mColumns) {
|
if (columnToSet + oldCodePointDisplayWidth < mColumns) {
|
||||||
oldCharactersUsedForColumn = findStartOfColumn(columnToSet + oldCodePointDisplayWidth) - oldStartOfColumnIndex;
|
int oldEndOfColumnIndex = findStartOfColumn(columnToSet + oldCodePointDisplayWidth);
|
||||||
|
oldCharactersUsedForColumn = oldEndOfColumnIndex - oldStartOfColumnIndex;
|
||||||
} else {
|
} else {
|
||||||
// Last character.
|
// Last character.
|
||||||
oldCharactersUsedForColumn = mSpaceUsed - oldStartOfColumnIndex;
|
oldCharactersUsedForColumn = mSpaceUsed - oldStartOfColumnIndex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If MAX_COMBINING_CHARACTERS_PER_COLUMN already exist in column, then ignore adding additional combining characters.
|
||||||
|
if (newIsCombining) {
|
||||||
|
int combiningCharsCount = WcWidth.zeroWidthCharsCount(mText, oldStartOfColumnIndex, oldStartOfColumnIndex + oldCharactersUsedForColumn);
|
||||||
|
if (combiningCharsCount >= MAX_COMBINING_CHARACTERS_PER_COLUMN)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Find how many chars this column will need
|
// Find how many chars this column will need
|
||||||
int newCharactersUsedForColumn = Character.charCount(codePoint);
|
int newCharactersUsedForColumn = Character.charCount(codePoint);
|
||||||
if (newIsCombining) {
|
if (newIsCombining) {
|
||||||
// Combining characters are added to the contents of the column instead of overwriting them, so that they
|
// Combining characters are added to the contents of the column instead of overwriting them, so that they
|
||||||
// modify the existing contents.
|
// modify the existing contents.
|
||||||
// FIXME: Put a limit of combining characters.
|
|
||||||
// FIXME: Unassigned characters also get width=0.
|
// FIXME: Unassigned characters also get width=0.
|
||||||
newCharactersUsedForColumn += oldCharactersUsedForColumn;
|
newCharactersUsedForColumn += oldCharactersUsedForColumn;
|
||||||
}
|
}
|
||||||
@ -204,7 +236,7 @@ public final class TerminalRow {
|
|||||||
if (mSpaceUsed + javaCharDifference > text.length) {
|
if (mSpaceUsed + javaCharDifference > text.length) {
|
||||||
// We need to grow the array
|
// We need to grow the array
|
||||||
char[] newText = new char[text.length + mColumns];
|
char[] newText = new char[text.length + mColumns];
|
||||||
System.arraycopy(text, 0, newText, 0, oldStartOfColumnIndex + oldCharactersUsedForColumn);
|
System.arraycopy(text, 0, newText, 0, oldNextColumnIndex);
|
||||||
System.arraycopy(text, oldNextColumnIndex, newText, newNextColumnIndex, oldCharactersAfterColumn);
|
System.arraycopy(text, oldNextColumnIndex, newText, newNextColumnIndex, oldCharactersAfterColumn);
|
||||||
mText = text = newText;
|
mText = text = newText;
|
||||||
} else {
|
} else {
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.backend;
|
package com.evolinx.terminal.backend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of wcwidth(3) for Unicode 15.
|
* Implementation of wcwidth(3) for Unicode 15.
|
||||||
@ -536,4 +536,29 @@ public final class WcWidth {
|
|||||||
return Character.isHighSurrogate(c) ? width(Character.toCodePoint(c, chars[index + 1])) : width(c);
|
return Character.isHighSurrogate(c) ? width(Character.toCodePoint(c, chars[index + 1])) : width(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The zero width characters count like combining characters in the `chars` array from start
|
||||||
|
* index to end index (exclusive).
|
||||||
|
*/
|
||||||
|
public static int zeroWidthCharsCount(char[] chars, int start, int end) {
|
||||||
|
if (start < 0 || start >= chars.length)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
for (int i = start; i < end && i < chars.length;) {
|
||||||
|
if (Character.isHighSurrogate(chars[i])) {
|
||||||
|
if (width(Character.toCodePoint(chars[i], chars[i + 1])) <= 0) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
i += 2;
|
||||||
|
} else {
|
||||||
|
if (width(chars[i]) <= 0) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm.component.codegen
|
package com.evolinx.terminal.component.codegen
|
||||||
|
|
||||||
import com.offsec.nhterm.component.NeoComponent
|
import com.evolinx.terminal.component.NeoComponent
|
||||||
|
|
||||||
|
|
||||||
class CodeGenComponent : NeoComponent {
|
class CodeGenComponent : NeoComponent {
|
@ -1,8 +1,8 @@
|
|||||||
package com.offsec.nhterm.component.codegen
|
package com.evolinx.terminal.component.codegen
|
||||||
|
|
||||||
import com.offsec.nhterm.component.ComponentManager
|
import com.evolinx.terminal.component.ComponentManager
|
||||||
import com.offsec.nhterm.component.colorscheme.NeoColorScheme
|
import com.evolinx.terminal.component.colorscheme.NeoColorScheme
|
||||||
import com.offsec.nhterm.component.config.ConfigureComponent
|
import com.evolinx.terminal.component.config.ConfigureComponent
|
||||||
|
|
||||||
class NeoColorGenerator(parameter: CodeGenParameter) : CodeGenerator(parameter) {
|
class NeoColorGenerator(parameter: CodeGenParameter) : CodeGenerator(parameter) {
|
||||||
override fun getGeneratorName(): String {
|
override fun getGeneratorName(): String {
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.codegen
|
package com.evolinx.terminal.component.codegen
|
||||||
|
|
||||||
abstract class CodeGenerator(parameter: CodeGenParameter) {
|
abstract class CodeGenerator(parameter: CodeGenParameter) {
|
||||||
abstract fun getGeneratorName(): String
|
abstract fun getGeneratorName(): String
|
@ -1,18 +1,18 @@
|
|||||||
package com.offsec.nhterm.component.colorscheme
|
package com.evolinx.terminal.component.colorscheme
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import io.neolang.frontend.ConfigVisitor
|
import com.evolinx.neolang.frontend.ConfigVisitor
|
||||||
import com.offsec.nhterm.App
|
import com.evolinx.terminal.App
|
||||||
import com.offsec.nhterm.R
|
import com.evolinx.terminal.R
|
||||||
import com.offsec.nhterm.component.ComponentManager
|
import com.evolinx.terminal.component.ComponentManager
|
||||||
import com.offsec.nhterm.component.ConfigFileBasedComponent
|
import com.evolinx.terminal.component.ConfigFileBasedComponent
|
||||||
import com.offsec.nhterm.component.codegen.CodeGenComponent
|
import com.evolinx.terminal.component.codegen.CodeGenComponent
|
||||||
import com.offsec.nhterm.component.config.NeoPreference
|
import com.evolinx.terminal.component.config.NeoPreference
|
||||||
import com.offsec.nhterm.component.config.NeoTermPath
|
import com.evolinx.terminal.component.config.NeoTermPath
|
||||||
import com.offsec.nhterm.frontend.session.view.TerminalView
|
import com.evolinx.terminal.frontend.session.view.TerminalView
|
||||||
import com.offsec.nhterm.frontend.session.view.extrakey.ExtraKeysView
|
import com.evolinx.terminal.frontend.session.view.extrakey.ExtraKeysView
|
||||||
import com.offsec.nhterm.utils.extractAssetsDir
|
import com.evolinx.terminal.utils.extractAssetsDir
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
@ -1,18 +1,18 @@
|
|||||||
package com.offsec.nhterm.component.colorscheme
|
package com.evolinx.terminal.component.colorscheme
|
||||||
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import com.offsec.nhterm.R
|
import com.evolinx.terminal.R
|
||||||
import io.neolang.frontend.ConfigVisitor
|
import com.evolinx.neolang.frontend.ConfigVisitor
|
||||||
import com.offsec.nhterm.backend.TerminalColorScheme
|
import com.evolinx.terminal.backend.TerminalColorScheme
|
||||||
import com.offsec.nhterm.backend.TerminalColors
|
import com.evolinx.terminal.backend.TerminalColors
|
||||||
import com.offsec.nhterm.component.ConfigFileBasedObject
|
import com.evolinx.terminal.component.ConfigFileBasedObject
|
||||||
import com.offsec.nhterm.component.codegen.CodeGenObject
|
import com.evolinx.terminal.component.codegen.CodeGenObject
|
||||||
import com.offsec.nhterm.component.codegen.CodeGenParameter
|
import com.evolinx.terminal.component.codegen.CodeGenParameter
|
||||||
import com.offsec.nhterm.component.codegen.CodeGenerator
|
import com.evolinx.terminal.component.codegen.CodeGenerator
|
||||||
import com.offsec.nhterm.component.codegen.NeoColorGenerator
|
import com.evolinx.terminal.component.codegen.NeoColorGenerator
|
||||||
import com.offsec.nhterm.frontend.session.view.TerminalView
|
import com.evolinx.terminal.frontend.session.view.TerminalView
|
||||||
import com.offsec.nhterm.frontend.session.view.extrakey.ExtraKeysView
|
import com.evolinx.terminal.frontend.session.view.extrakey.ExtraKeysView
|
||||||
import com.offsec.nhterm.utils.NLog
|
import com.evolinx.terminal.utils.NLog
|
||||||
|
|
||||||
open class NeoColorScheme : CodeGenObject, ConfigFileBasedObject {
|
open class NeoColorScheme : CodeGenObject, ConfigFileBasedObject {
|
||||||
companion object {
|
companion object {
|
||||||
@ -176,7 +176,7 @@ open class NeoColorScheme : CodeGenObject, ConfigFileBasedObject {
|
|||||||
object DefaultColorScheme : NeoColorScheme() {
|
object DefaultColorScheme : NeoColorScheme() {
|
||||||
init {
|
init {
|
||||||
/* NOTE: Keep in sync with assets/colors/Default.nl */
|
/* NOTE: Keep in sync with assets/colors/Default.nl */
|
||||||
colorName = "Kali"
|
colorName = "Default"
|
||||||
|
|
||||||
|
|
||||||
cursorColor = "#a9aaa9"
|
cursorColor = "#a9aaa9"
|
@ -1,18 +1,18 @@
|
|||||||
package com.offsec.nhterm.component
|
package com.evolinx.terminal.component
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import com.offsec.nhterm.component.codegen.CodeGenComponent
|
import com.evolinx.terminal.component.codegen.CodeGenComponent
|
||||||
import com.offsec.nhterm.component.colorscheme.ColorSchemeComponent
|
import com.evolinx.terminal.component.colorscheme.ColorSchemeComponent
|
||||||
import com.offsec.nhterm.component.completion.CompletionComponent
|
import com.evolinx.terminal.component.completion.CompletionComponent
|
||||||
import com.offsec.nhterm.component.config.ConfigureComponent
|
import com.evolinx.terminal.component.config.ConfigureComponent
|
||||||
import com.offsec.nhterm.component.extrakey.ExtraKeyComponent
|
import com.evolinx.terminal.component.extrakey.ExtraKeyComponent
|
||||||
import com.offsec.nhterm.component.font.FontComponent
|
import com.evolinx.terminal.component.font.FontComponent
|
||||||
import com.offsec.nhterm.component.pm.PackageComponent
|
import com.evolinx.terminal.component.pm.PackageComponent
|
||||||
import com.offsec.nhterm.component.profile.ProfileComponent
|
import com.evolinx.terminal.component.profile.ProfileComponent
|
||||||
import com.offsec.nhterm.component.session.SessionComponent
|
import com.evolinx.terminal.component.session.SessionComponent
|
||||||
import com.offsec.nhterm.component.session.ShellProfile
|
import com.evolinx.terminal.component.session.ShellProfile
|
||||||
import com.offsec.nhterm.component.userscript.UserScriptComponent
|
import com.evolinx.terminal.component.userscript.UserScriptComponent
|
||||||
import com.offsec.nhterm.utils.NLog
|
import com.evolinx.terminal.utils.NLog
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
|
|
||||||
interface NeoComponent {
|
interface NeoComponent {
|
@ -1,6 +1,6 @@
|
|||||||
package com.offsec.nhterm.component.completion
|
package com.evolinx.terminal.component.completion
|
||||||
|
|
||||||
import com.offsec.nhterm.component.NeoComponent
|
import com.evolinx.terminal.component.NeoComponent
|
||||||
|
|
||||||
class CompletionComponent : NeoComponent {
|
class CompletionComponent : NeoComponent {
|
||||||
override fun onServiceInit() {
|
override fun onServiceInit() {
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.completion
|
package com.evolinx.terminal.component.completion
|
||||||
|
|
||||||
class CompletionCandidate(val completeString: String) {
|
class CompletionCandidate(val completeString: String) {
|
||||||
var displayName: String = completeString
|
var displayName: String = completeString
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.completion
|
package com.evolinx.terminal.component.completion
|
||||||
|
|
||||||
interface MarkScoreListener {
|
interface MarkScoreListener {
|
||||||
fun onMarkScore(score: Int)
|
fun onMarkScore(score: Int)
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.completion
|
package com.evolinx.terminal.component.completion
|
||||||
|
|
||||||
import java.io.File
|
import java.io.File
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.config
|
package com.evolinx.terminal.component.config
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
@ -7,14 +7,14 @@ import android.preference.PreferenceManager
|
|||||||
import android.system.ErrnoException
|
import android.system.ErrnoException
|
||||||
import android.system.Os
|
import android.system.Os
|
||||||
import android.util.TypedValue
|
import android.util.TypedValue
|
||||||
import io.neolang.frontend.ConfigVisitor
|
import com.evolinx.neolang.frontend.ConfigVisitor
|
||||||
import io.neolang.frontend.NeoLangParser
|
import com.evolinx.neolang.frontend.NeoLangParser
|
||||||
import com.offsec.nhterm.App
|
import com.evolinx.terminal.App
|
||||||
import com.offsec.nhterm.R
|
import com.evolinx.terminal.R
|
||||||
import com.offsec.nhterm.backend.TerminalSession
|
import com.evolinx.terminal.backend.TerminalSession
|
||||||
import com.offsec.nhterm.component.NeoComponent
|
import com.evolinx.terminal.component.NeoComponent
|
||||||
import com.offsec.nhterm.services.NeoTermService
|
import com.evolinx.terminal.services.NeoTermService
|
||||||
import com.offsec.nhterm.utils.NLog
|
import com.evolinx.terminal.utils.NLog
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.nio.file.Files
|
import java.nio.file.Files
|
||||||
|
|
||||||
@ -225,6 +225,13 @@ object NeoPreference {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun isPrintFontSizeEnabled(): Boolean {
|
||||||
|
return loadBoolean(
|
||||||
|
R.string.key_general_print_font_size,
|
||||||
|
DefaultValues.enableprintFontSize
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fun isBellEnabled(): Boolean {
|
fun isBellEnabled(): Boolean {
|
||||||
return loadBoolean(
|
return loadBoolean(
|
||||||
R.string.key_general_bell,
|
R.string.key_general_bell,
|
@ -1,4 +1,4 @@
|
|||||||
package com.offsec.nhterm.component.config
|
package com.evolinx.terminal.component.config
|
||||||
|
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
|
|
||||||
@ -7,6 +7,7 @@ object DefaultValues {
|
|||||||
|
|
||||||
const val enableBell = false
|
const val enableBell = false
|
||||||
const val enableVibrate = false
|
const val enableVibrate = false
|
||||||
|
const val enableprintFontSize = true
|
||||||
const val enableExecveWrapper = true
|
const val enableExecveWrapper = true
|
||||||
const val enableAutoCompletion = false
|
const val enableAutoCompletion = false
|
||||||
const val enableFullScreen = false
|
const val enableFullScreen = false
|
||||||
@ -25,14 +26,16 @@ object DefaultValues {
|
|||||||
|
|
||||||
object NeoTermPath {
|
object NeoTermPath {
|
||||||
@SuppressLint("SdCardPath")
|
@SuppressLint("SdCardPath")
|
||||||
const val ROOT_PATH = "/data/data/com.offsec.nhterm/files"
|
const val ROOT_PATH = "/data/data/com.evolinx.terminal/files"
|
||||||
const val USR_PATH = "$ROOT_PATH/usr"
|
const val USR_PATH = "$ROOT_PATH/usr"
|
||||||
const val BIN_PATH = "$USR_PATH/bin"
|
const val BIN_PATH = "$USR_PATH/bin"
|
||||||
const val HOME_PATH = "/"
|
const val HOME_PATH = "$USR_PATH/home"
|
||||||
const val APT_BIN_PATH = "$USR_PATH/bin/apt"
|
const val APT_BIN_PATH = "$USR_PATH/bin/apt"
|
||||||
const val LIB_PATH = "$USR_PATH/lib"
|
const val LIB_PATH = "$USR_PATH/lib"
|
||||||
|
|
||||||
const val CUSTOM_PATH = "$ROOT_PATH/usr/home/.nhterm"
|
const val TERM_APP = "$ROOT_PATH/app"
|
||||||
|
const val CUSTOM_PATH = "$TERM_APP/.evolinx"
|
||||||
|
const val TERM_BIN = "$TERM_APP/bin"
|
||||||
const val NEOTERM_LOGIN_SHELL_PATH = "$CUSTOM_PATH/shell"
|
const val NEOTERM_LOGIN_SHELL_PATH = "$CUSTOM_PATH/shell"
|
||||||
const val EKS_PATH = "$CUSTOM_PATH/eks"
|
const val EKS_PATH = "$CUSTOM_PATH/eks"
|
||||||
const val EKS_DEFAULT_FILE = "$EKS_PATH/default.nl"
|
const val EKS_DEFAULT_FILE = "$EKS_PATH/default.nl"
|
||||||
@ -44,7 +47,7 @@ object NeoTermPath {
|
|||||||
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
|
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
|
||||||
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"
|
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"
|
||||||
|
|
||||||
private const val SOURCE = "http://http.kali.org/kali"
|
private const val SOURCE = "https://files.martinvlba.eu"
|
||||||
|
|
||||||
val DEFAULT_MAIN_PACKAGE_SOURCE: String
|
val DEFAULT_MAIN_PACKAGE_SOURCE: String
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user