mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-06-16 21:10:57 +08:00
parent
ebfcea7217
commit
b10096bfbe
@ -97,8 +97,9 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||
|
||||
public static final String TELEGRAM_GROUP_NAME = "PCAPdroid";
|
||||
public static final String GITHUB_PROJECT_URL = "https://github.com/emanuele-f/PCAPdroid";
|
||||
public static final String GITHUB_DOCS_URL = "https://emanuele-f.github.io/PCAPdroid";
|
||||
public static final String DOCS_URL = "https://emanuele-f.github.io/PCAPdroid";
|
||||
public static final String DONATE_URL = "https://emanuele-f.github.io/PCAPdroid/donate";
|
||||
public static final String MALWARE_DETECTION_DOCS_URL = DOCS_URL + "/paid_features#51-malware-detection";
|
||||
|
||||
private final ActivityResultLauncher<Intent> pcapFileLauncher =
|
||||
registerForActivityResult(new StartActivityForResult(), this::pcapFileResult);
|
||||
@ -352,7 +353,7 @@ public class MainActivity extends BaseActivity implements NavigationView.OnNavig
|
||||
} else if (id == R.id.action_open_telegram) {
|
||||
openTelegram();
|
||||
} else if (id == R.id.action_open_user_guide) {
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(GITHUB_DOCS_URL));
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(DOCS_URL));
|
||||
startActivity(browserIntent);
|
||||
} else if (id == R.id.action_stats) {
|
||||
if(mState == AppState.running) {
|
||||
|
||||
@ -21,10 +21,14 @@ package com.emanuelef.remote_capture.fragments;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Button;
|
||||
@ -42,6 +46,8 @@ import com.emanuelef.remote_capture.PCAPdroid;
|
||||
import com.emanuelef.remote_capture.R;
|
||||
import com.emanuelef.remote_capture.Utils;
|
||||
import com.emanuelef.remote_capture.activities.ConnectionsActivity;
|
||||
import com.emanuelef.remote_capture.activities.MainActivity;
|
||||
import com.emanuelef.remote_capture.adapters.ListEditAdapter;
|
||||
import com.emanuelef.remote_capture.model.Blacklists;
|
||||
import com.emanuelef.remote_capture.model.FilterDescriptor;
|
||||
|
||||
@ -63,6 +69,7 @@ public class MalwareStatusFragment extends Fragment {
|
||||
@Override
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
ViewGroup container, Bundle savedInstanceState) {
|
||||
setHasOptionsMenu(true);
|
||||
return inflater.inflate(R.layout.malware_detection_status, container, false);
|
||||
}
|
||||
|
||||
@ -108,6 +115,24 @@ public class MalwareStatusFragment extends Fragment {
|
||||
mHandler.removeCallbacksAndMessages(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(@NonNull Menu menu, MenuInflater inflater) {
|
||||
inflater.inflate(R.menu.docs_menu, menu);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
|
||||
int id = item.getItemId();
|
||||
|
||||
if(id == R.id.user_guide) {
|
||||
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(MainActivity.MALWARE_DETECTION_DOCS_URL));
|
||||
startActivity(browserIntent);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void updateStatus() {
|
||||
Context ctx = requireContext();
|
||||
ConnectionsRegister reg = CaptureService.getConnsRegister();
|
||||
|
||||
12
app/src/main/res/menu/docs_menu.xml
Normal file
12
app/src/main/res/menu/docs_menu.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/user_guide"
|
||||
android:title="@string/user_guide"
|
||||
android:orderInCategory="10"
|
||||
android:icon="@drawable/ic_book"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|
||||
@ -156,7 +156,7 @@
|
||||
<string name="show_only_malicious">Connessioni malevole</string>
|
||||
<string name="security">Sicurezza</string>
|
||||
<string name="malware_detection">Rilevamento Malware</string>
|
||||
<string name="malware_detection_summary">Rileva le connessioni a host malevoli tramite blacklist di terze parti. Il rilevamento potrebbe genare falsi positivi e non sostituisce un antivirus.</string>
|
||||
<string name="malware_detection_summary">Rileva le connessioni a host malevoli tramite blacklist di terze parti.</string>
|
||||
<string name="reset">Reimposta</string>
|
||||
<string name="malware_whitelist">Whitelist Malware</string>
|
||||
<string name="malware_whitelist_rules">Regole della Whitelist Malware</string>
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
<string name="show_only_malicious">Вредоносные соединения</string>
|
||||
<string name="security">Безопасность</string>
|
||||
<string name="malware_detection">Обнаружение вредоносных соединений</string>
|
||||
<string name="malware_detection_summary">Обнаружение соединений с известными вредоносными хостами на основе использования сторонних черных списков. Данная опция может давать ложные срабатывания и не является альтернативой антивирусам.</string>
|
||||
<string name="malware_detection_summary">Обнаружение соединений с известными вредоносными хостами на основе использования сторонних черных списков.</string>
|
||||
<string name="reset">Сбросить</string>
|
||||
<string name="malware_whitelist">Белый список вредоносов</string>
|
||||
<string name="malware_whitelist_rules">Правила игнорирования вредоносов</string>
|
||||
|
||||
@ -167,7 +167,7 @@
|
||||
<string name="show_only_malicious">恶意连接</string>
|
||||
<string name="security">安全</string>
|
||||
<string name="malware_detection">恶意软件检测</string>
|
||||
<string name="malware_detection_summary">通过第三方黑名单检测到已知恶意主机的连接。这种检测可能产生误报,并不是反病毒软件的有效替代方案。</string>
|
||||
<string name="malware_detection_summary">通过第三方黑名单检测到已知恶意主机的连接。</string>
|
||||
<string name="reset">重置</string>
|
||||
<string name="malware_whitelist">恶意软件白名单</string>
|
||||
<string name="malware_whitelist_rules">恶意软件白名单规则</string>
|
||||
|
||||
@ -182,7 +182,7 @@
|
||||
<string name="show_only_malicious">Malicious connections</string>
|
||||
<string name="security">Security</string>
|
||||
<string name="malware_detection">Malware Detection</string>
|
||||
<string name="malware_detection_summary">Detect connections to known malicious hosts via third-party blacklists. The detection can produce false positives and is not a valid alternative to an antivirus.</string>
|
||||
<string name="malware_detection_summary">Detect connections to known malicious hosts via third-party blacklists.</string>
|
||||
<string name="reset">Reset</string>
|
||||
<string name="malware_whitelist">Malware Whitelist</string>
|
||||
<string name="malware_whitelist_rules">Malware Whitelist Rules</string>
|
||||
@ -233,5 +233,5 @@
|
||||
<string name="malware_status_update_failed">Some blacklists are outdated</string>
|
||||
<string name="update_now">Update now</string>
|
||||
<string name="status_updating">Updating…</string>
|
||||
</resources>
|
||||
|
||||
<string name="malware_detection_learn_more">Learn more about the malware detection feature</string>
|
||||
</resources>
|
||||
@ -120,6 +120,14 @@
|
||||
app:iconSpaceReserved="false"
|
||||
app:summary="@string/malware_detection_summary"
|
||||
app:defaultValue="false" />
|
||||
|
||||
<Preference
|
||||
app:key="malware_detection_docs"
|
||||
app:title="@string/malware_detection_learn_more"
|
||||
app:iconSpaceReserved="false">
|
||||
<intent android:action="android.intent.action.VIEW"
|
||||
android:data="https://emanuele-f.github.io/PCAPdroid/paid_features#51-malware-detection" />
|
||||
</Preference>
|
||||
</PreferenceCategory>
|
||||
|
||||
<PreferenceCategory app:title="@string/other_prefs" app:iconSpaceReserved="false" >
|
||||
|
||||
Loading…
Reference in New Issue
Block a user