-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5c2df73
Showing
43 changed files
with
2,656 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.iml | ||
.gradle | ||
.idea | ||
/local.properties | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild | ||
.cxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Описание | ||
Программа для мониторинга входящих sms и пропущенных звонков и отправка информации в телеграмм и/или на удалённый сервер. | ||
Плюс некоторые плюшки, как обнаружение и копирование pin кода, фильтрация текста итп | ||
|
||
## Примеры regexp filter | ||
``` | ||
^MTC|^Balance | ||
\/\/ .* | ||
.* | ||
^Этот абонент звонил вам.*(\/\/.*) | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/build | ||
/release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
compileSdkVersion 29 | ||
defaultConfig { | ||
applicationId "com.pasm.smscast" | ||
minSdk 21 | ||
targetSdk 29 | ||
versionCode 1 | ||
versionName '1.1.0' | ||
resConfigs "nodpi" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled true | ||
shrinkResources true | ||
zipAlignEnabled true | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' | ||
android.applicationVariants.all { variant -> | ||
variant.outputs.all { | ||
outputFileName = "${rootProject.name}_${versionName}.apk" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
implementation 'com.android.volley:volley:1.2.1' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# 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 | ||
|
||
-dontobfuscate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.pasm.smscast"> | ||
|
||
<uses-permission android:name="android.permission.RECEIVE_SMS" /> | ||
<uses-permission android:name="android.permission.INTERNET" /> | ||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> | ||
<uses-permission android:name="android.permission.READ_CONTACTS" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE"/> | ||
<uses-permission android:name="android.permission.READ_CALL_LOG" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:label="@string/app_name" | ||
android:icon="@drawable/ic_large" | ||
android:roundIcon="@drawable/ic_large" | ||
android:supportsRtl="true" | ||
android:usesCleartextTraffic="true"> | ||
<receiver | ||
android:name=".SMSMonitor" | ||
android:enabled="true" | ||
android:exported="true" | ||
android:permission="android.permission.BROADCAST_SMS"> | ||
<intent-filter android:priority="500"> | ||
<action android:name="android.provider.Telephony.SMS_RECEIVED" /> | ||
<action android:name="android.intent.action.BOOT_COMPLETED" /> | ||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" /> | ||
<action android:name="com.intent.action.MY_PACKAGE_REPLACED" /> | ||
</intent-filter> | ||
</receiver> | ||
<receiver | ||
android:name=".PhoneMonitor" | ||
android:enabled="true" | ||
android:exported="true"> | ||
<intent-filter android:priority="500"> | ||
<action android:name="android.intent.action.PHONE_STATE"/> | ||
</intent-filter> | ||
</receiver> | ||
<receiver | ||
android:name=".CopyBroadcastReceiver" | ||
android:enabled="true" | ||
android:exported="false" /> | ||
|
||
<service | ||
android:name=".MyAccessibilityService" | ||
android:label="@string/app_name" | ||
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE" | ||
android:exported="false"> | ||
<intent-filter> | ||
<action android:name="android.accessibilityservice.AccessibilityService" /> | ||
</intent-filter> | ||
|
||
<meta-data | ||
android:name="android.accessibilityservice" | ||
android:resource="@xml/my_accessibility_service" /> | ||
</service> | ||
<service | ||
android:name=".NotifyService" | ||
android:enabled="true" | ||
android:exported="false" /> | ||
|
||
<activity | ||
android:name=".MainActivity" | ||
android:label="@string/app_name" | ||
android:windowSoftInputMode="stateHidden|adjustResize" | ||
android:exported="true"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
</application> | ||
|
||
</manifest> |
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/pasm/smscast/CopyBroadcastReceiver.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.pasm.smscast; | ||
|
||
import static android.content.Context.CLIPBOARD_SERVICE; | ||
|
||
import android.content.BroadcastReceiver; | ||
import android.content.ClipData; | ||
import android.content.ClipboardManager; | ||
import android.content.Context; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import android.text.Html; | ||
import android.widget.Toast; | ||
|
||
|
||
public class CopyBroadcastReceiver extends BroadcastReceiver { | ||
|
||
@Override | ||
public void onReceive(Context context, Intent intent) { | ||
|
||
if (context == null || intent == null) | ||
return; | ||
|
||
Bundle extras = intent.getExtras(); | ||
if (extras != null) { | ||
String text = extras.getString("extra"); | ||
if (text != null) { | ||
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(CLIPBOARD_SERVICE); | ||
ClipData clip = ClipData.newPlainText("pin", text); | ||
clipboard.setPrimaryClip(clip); | ||
|
||
// Закрыть шторку уведомления. т.к. автоматом не закрывается при нажатии на Action Button | ||
context.sendBroadcast(new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS)); | ||
|
||
Toast.makeText(context, Html.fromHtml(String.format(context.getString(R.string.copied), text)), Toast.LENGTH_SHORT).show(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.