From e0ec63839ef246b7729fe42771740743176d5454 Mon Sep 17 00:00:00 2001 From: yvain Date: Thu, 30 Apr 2020 22:13:37 +0200 Subject: [PATCH] purged google analytics --- app/app/build.gradle | 3 - app/app/src/main/Makefile | 6 +- .../external/src/libandroidlogger/Android.mk | 3 - .../external/src/libmyaircrackwep/Makefile | 2 +- .../seemoo/nexmon/MyApplication.java | 30 +----- .../seemoo/nexmon/gui/APfragment.java | 8 +- .../seemoo/nexmon/gui/AboutUsFragment.java | 10 +- .../nexmon/gui/AircrackWepFragment.java | 8 +- .../seemoo/nexmon/gui/AirdecapFragment.java | 9 +- .../seemoo/nexmon/gui/AttackInfoFragment.java | 7 +- .../nexmon/gui/ChannelSelectDialog.java | 9 -- .../seemoo/nexmon/gui/FirmwareFragment.java | 27 +----- .../seemoo/nexmon/gui/IvsMergeFragment.java | 8 +- .../seemoo/nexmon/gui/PcapConcatFragment.java | 12 +-- .../seemoo/nexmon/gui/PcapToIvsFragment.java | 8 +- .../seemoo/nexmon/gui/SettingsFragment.java | 10 -- .../seemoo/nexmon/gui/SharkFragment.java | 9 +- .../seemoo/nexmon/gui/StartFragment.java | 8 +- .../seemoo/nexmon/gui/ToolsFragment.java | 93 +------------------ .../seemoo/nexmon/gui/TrackingFragment.java | 36 ------- .../seemoo/nexmon/gui/WpaDictFragment.java | 23 +---- .../nexmon/sharky/WiresharkService.java | 22 ----- .../nexmon/stations/APfinderService.java | 24 ----- .../seemoo/nexmon/stations/Attack.java | 22 +---- .../seemoo/nexmon/stations/AttackService.java | 15 --- app/build.gradle | 1 - 26 files changed, 29 insertions(+), 384 deletions(-) delete mode 100644 app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/TrackingFragment.java diff --git a/app/app/build.gradle b/app/app/build.gradle index e4b7a8519..8ec964b46 100644 --- a/app/app/build.gradle +++ b/app/app/build.gradle @@ -79,7 +79,4 @@ dependencies { compile 'com.github.johnkil.print:print:1.3.1' compile 'com.nononsenseapps:filepicker:3.1.0' compile 'com.android.support:recyclerview-v7:23.4.0' - compile 'com.google.android.gms:play-services-analytics:9.2.0' } - -apply plugin: 'com.google.gms.google-services' diff --git a/app/app/src/main/Makefile b/app/app/src/main/Makefile index 4c414a2a7..a184a362a 100644 --- a/app/app/src/main/Makefile +++ b/app/app/src/main/Makefile @@ -2,7 +2,7 @@ UTILITIES_PATH = ../../../../utilities PATCHES_PATH = ../../../../patches all: assets/nexmon assets libs/armeabi - + assets: \ assets/nexmon/fw_bcm4330_5_90_100_41_sta.bin \ assets/nexmon/fw_bcm4339_6_37_34_43.bin \ @@ -20,7 +20,7 @@ assets: \ assets/nexmon/mdk3 \ assets/nexmon/socat \ assets/nexmon/libfakeioctl.so \ - FORCE + FORCE assets/nexmon: FORCE mkdir -p assets/nexmon/ @@ -99,4 +99,4 @@ clean: FORCE FORCE: -.PHONY: all clean \ No newline at end of file +.PHONY: all clean diff --git a/app/app/src/main/external/src/libandroidlogger/Android.mk b/app/app/src/main/external/src/libandroidlogger/Android.mk index 4293eff3f..f71dd3332 100644 --- a/app/app/src/main/external/src/libandroidlogger/Android.mk +++ b/app/app/src/main/external/src/libandroidlogger/Android.mk @@ -1,8 +1,5 @@ - - LOCAL_PATH:=$(call my-dir) - include $(CLEAR_VARS) LOCAL_SRC_FILES:=android-logger.c LOCAL_MODULE:=libandroidlogger diff --git a/app/app/src/main/external/src/libmyaircrackwep/Makefile b/app/app/src/main/external/src/libmyaircrackwep/Makefile index 5bad41bdc..adb1a4271 100644 --- a/app/app/src/main/external/src/libmyaircrackwep/Makefile +++ b/app/app/src/main/external/src/libmyaircrackwep/Makefile @@ -17,7 +17,7 @@ $(UTILITIES_PATH)/libssl/local/armeabi/libssl.a: FORCE $(UTILITIES_PATH)/libcrypto/local/armeabi/libcrypto.a: FORCE cd $(UTILITIES_PATH)/libcrypto && make - + FORCE: clean: diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/MyApplication.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/MyApplication.java index 2cf297070..78d092061 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/MyApplication.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/MyApplication.java @@ -51,10 +51,6 @@ import android.view.WindowManager; import android.widget.Toast; -import com.google.android.gms.analytics.GoogleAnalytics; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - import java.io.BufferedReader; import java.io.File; import java.io.IOException; @@ -78,30 +74,6 @@ public class MyApplication extends Application { public static boolean isAppVisible = false; - private static Tracker mTracker; - - public static final int SURVEY_NOTIFICATION_ID = 99999; - private static SpannableStringBuilder installInfo; - - /** - * Gets the default {@link Tracker} for this {@link Application}. - * @return tracker - */ - synchronized public static Tracker getDefaultTracker() { - if (mTracker == null) { - GoogleAnalytics analytics = GoogleAnalytics.getInstance(getAppContext()); - // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG - mTracker = analytics.newTracker(R.xml.global_tracker); - mTracker.set("&uid", nexmonUID); - mTracker.send(new HitBuilders.EventBuilder() - .setCategory("Device to Client-ID") - .setLabel("Device: " + Build.MODEL + " Client-ID: " + nexmonUID) - .setAction("Tracking started") - .build()); - } - return mTracker; - } - private static final String TAG = "PenTestSuite"; private static final String APP_PACKAGE = "de.tu_darmstadt.seemoo.nexmon"; @@ -584,4 +556,4 @@ public static void toast(String msg) { Toast.makeText(MyApplication.getAppContext(), msg, Toast.LENGTH_SHORT).show(); } catch(Exception e) {e.printStackTrace();} } -} \ No newline at end of file +} diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/APfragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/APfragment.java index ec49ca9a4..49dbb55b9 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/APfragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/APfragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; @@ -55,7 +56,7 @@ import de.tu_darmstadt.seemoo.nexmon.stations.Station; -public class APfragment extends TrackingFragment implements CurrentChannelListener { +public class APfragment extends Fragment implements CurrentChannelListener { public static final int UPDATE_LIST = 30; public static final int UPDATE_LIST_COMPLETE = 31; @@ -272,11 +273,6 @@ public void onReceive(Context context, Intent intent) { contUpdate(); } - @Override - public String getTrackingName() { - return "Screen: Airodump"; - } - private void toggleApFinder() { if (!aPfinderService.isRunning()) { guiHandler.sendEmptyMessage(CLEAR_LIST); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AboutUsFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AboutUsFragment.java index f9e29c895..f839eddf1 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AboutUsFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AboutUsFragment.java @@ -18,7 +18,6 @@ package de.tu_darmstadt.seemoo.nexmon.gui; - import android.app.Fragment; import android.content.Intent; import android.net.Uri; @@ -34,7 +33,7 @@ /** * A simple {@link Fragment} subclass. */ -public class AboutUsFragment extends TrackingFragment { +public class AboutUsFragment extends Fragment { private ImageView imgTudLogo; private ImageView imgSeemooLogo; @@ -102,13 +101,6 @@ public void onClick(View v) { return view; } - - - @Override - public String getTrackingName() { - return "Screen: About us"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AircrackWepFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AircrackWepFragment.java index a472f54bf..cd26a7eae 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AircrackWepFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AircrackWepFragment.java @@ -18,7 +18,6 @@ package de.tu_darmstadt.seemoo.nexmon.gui; - import android.app.Fragment; import android.content.Intent; import android.os.Bundle; @@ -61,7 +60,7 @@ * Use the {@link AircrackWepFragment#newInstance} factory method to * create an instance of this fragment. */ -public class AircrackWepFragment extends TrackingFragment implements Attack.IAttackInstanceUpdate{ +public class AircrackWepFragment extends Fragment implements Attack.IAttackInstanceUpdate{ private static final int CHOOSE_FILE = 12; @@ -226,11 +225,6 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: Aircrack WEP"; - } - @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AirdecapFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AirdecapFragment.java index aed62c0b4..ccd18e93f 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AirdecapFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AirdecapFragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -51,7 +52,7 @@ /** * Created by fabian on 8/25/16. */ -public class AirdecapFragment extends TrackingFragment { +public class AirdecapFragment extends Fragment { private static final int SHOW_LOADING = 80; private static final int DISMISS_LOADING = 81; @@ -92,11 +93,6 @@ public void onCreate(Bundle savedInstanceState) { } - @Override - public String getTrackingName() { - return "Screen: Airdecap"; - } - @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); @@ -254,7 +250,6 @@ public void run() { scanStart += scanAmount; } - guiHandler.sendEmptyMessage(UPDATE_SPINNER); guiHandler.sendEmptyMessage(DISMISS_LOADING); } diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AttackInfoFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AttackInfoFragment.java index 5dd0a3f05..94c6585b1 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AttackInfoFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/AttackInfoFragment.java @@ -48,7 +48,7 @@ * Use the {@link AttackInfoFragment#newInstance} factory method to * create an instance of this fragment. */ -public class AttackInfoFragment extends TrackingFragment { +public class AttackInfoFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_ATTACK = "ATTACK"; @@ -158,11 +158,6 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: AttackInfo"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ChannelSelectDialog.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ChannelSelectDialog.java index 58db21d22..107ae8be9 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ChannelSelectDialog.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ChannelSelectDialog.java @@ -9,8 +9,6 @@ import android.widget.ArrayAdapter; import android.widget.ListView; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; import com.stericson.RootShell.execution.Command; import com.stericson.RootTools.RootTools; @@ -75,13 +73,6 @@ public void onItemClick(AdapterView parent, View view, int position, long id) String selectedChannel = channels[position]; setWlanChannel(selectedChannel); - Tracker tracker = MyApplication.getDefaultTracker(); - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Channel") - .setLabel("Channel Selection Dialog") - .setAction("Channel changed") - .build()); - dismiss(); } }); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/FirmwareFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/FirmwareFragment.java index f044567c9..853b87327 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/FirmwareFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/FirmwareFragment.java @@ -1,5 +1,6 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.content.res.AssetManager; import android.os.Build; @@ -17,8 +18,6 @@ import android.widget.TextView; import android.widget.Toast; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; import com.nononsenseapps.filepicker.FilePickerActivity; import com.roger.catloadinglibrary.CatLoadingView; import com.stericson.RootShell.exceptions.RootDeniedException; @@ -37,7 +36,7 @@ import de.tu_darmstadt.seemoo.nexmon.R; -public class FirmwareFragment extends TrackingFragment implements View.OnClickListener { +public class FirmwareFragment extends Fragment implements View.OnClickListener { private static final int UPDATE_TV_FIRMWARE_VERSION = 50; private static final int UPDATE_BUTTON_ENABLED = 51; @@ -411,15 +410,6 @@ public void commandOutput(int id, String line) { Message msg = guiHandler.obtainMessage(UPDATE_TV_FIRMWARE_VERSION, out); guiHandler.sendMessage(msg); - - // Get tracker. - Tracker t = MyApplication.getDefaultTracker(); - // Build and send an Event. - t.send(new HitBuilders.EventBuilder() - .setCategory("Firmware Version") - .setLabel("Device: " + Build.MODEL) - .setAction("Version: " + out) - .build()); } super.commandOutput(id, line); @@ -489,14 +479,6 @@ public void onClick(View v) { switch(v.getId()) { case R.id.btnInstallNexmonFirmware: onClickInstallNexmonFirmware(); - // Get tracker. - Tracker t = MyApplication.getDefaultTracker(); - // Build and send an Event. - t.send(new HitBuilders.EventBuilder() - .setCategory("Firmware") - .setLabel("Device: " + Build.MODEL + " FW: " + tvFirmwareVersionOutput.getText()) - .setAction("Install") - .build()); break; case R.id.btnRestoreFirmwareBackup: onClickRestoreFirmwareBackup(); @@ -532,9 +514,4 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) { } } } - - @Override - public String getTrackingName() { - return "Screen: Firmware"; - } } diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/IvsMergeFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/IvsMergeFragment.java index 05b0cbe76..b29347fc8 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/IvsMergeFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/IvsMergeFragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -39,7 +40,7 @@ /** * Created by fabian on 9/26/16. */ -public class IvsMergeFragment extends TrackingFragment { +public class IvsMergeFragment extends Fragment { private static final int HANDLER_SHOW_LOADING = 1; private static final int HANDLER_DISMISS_LOADING = 2; @@ -126,11 +127,6 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: IVS merge"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapConcatFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapConcatFragment.java index 7dfcb5306..1b510fa09 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapConcatFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapConcatFragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -41,9 +42,7 @@ /** * Created by fabian on 9/25/16. */ -public class PcapConcatFragment extends TrackingFragment{ - - +public class PcapConcatFragment extends Fragment{ private static final int HANDLER_SHOW_LOADING = 1; private static final int HANDLER_DISMISS_LOADING = 2; @@ -132,12 +131,7 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: PCAP concat"; - } - - @Override + @Override public void onPause() { super.onPause(); } diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapToIvsFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapToIvsFragment.java index 79e1100f8..ddb8480f9 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapToIvsFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/PcapToIvsFragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -38,7 +39,7 @@ /** * Created by fabian on 9/26/16. */ -public class PcapToIvsFragment extends TrackingFragment { +public class PcapToIvsFragment extends Fragment { private static final int HANDLER_SHOW_LOADING = 1; private static final int HANDLER_DISMISS_LOADING = 2; @@ -120,11 +121,6 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: PCAP to IVS"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SettingsFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SettingsFragment.java index 0f99408d6..ee25b65b9 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SettingsFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SettingsFragment.java @@ -34,8 +34,6 @@ import android.view.View; import android.view.ViewGroup; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; import com.stericson.RootShell.execution.Command; import com.stericson.RootTools.RootTools; @@ -65,11 +63,6 @@ public class SettingsFragment extends PreferenceFragment implements SharedPrefer private static final int COMMAND_PULLDOWN_WLAN = 53; private static final int COMMAND_SET_CHANNEL = 54; - private Tracker mTracker; - - - - Handler guiHandler; public SettingsFragment() { @@ -83,7 +76,6 @@ public void onCreate(@Nullable Bundle savedInstanceState) { // Obtain the shared Tracker instance. MyApplication application = (MyApplication) getActivity().getApplication(); - mTracker = application.getDefaultTracker(); addPreferencesFromResource(R.xml.pentest_preferences); @@ -151,8 +143,6 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa @Override public void onResume() { super.onResume(); - mTracker.setScreenName("Screen: Settings"); - mTracker.send(new HitBuilders.ScreenViewBuilder().build()); getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this); // Disable: We dont know the status yet. diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SharkFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SharkFragment.java index fd4789b68..a1dfda6b8 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SharkFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/SharkFragment.java @@ -18,7 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; - +import android.app.Fragment; import android.content.BroadcastReceiver; import android.content.ComponentName; import android.content.Context; @@ -60,7 +60,7 @@ import de.tu_darmstadt.seemoo.nexmon.sharky.WiresharkService; -public class SharkFragment extends TrackingFragment { +public class SharkFragment extends Fragment { public static final int PACKET_AMOUNT_TO_SHOW = 500; private static final int UPDATE_LISTVIEW_STATIC = 14; @@ -176,11 +176,6 @@ public void onReceive(Context context, Intent intent) { } - @Override - public String getTrackingName() { - return "Screen: Wireshark"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/StartFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/StartFragment.java index cd53bb495..852505124 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/StartFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/StartFragment.java @@ -18,7 +18,6 @@ package de.tu_darmstadt.seemoo.nexmon.gui; - import android.app.Fragment; import android.content.Intent; import android.graphics.Color; @@ -53,7 +52,7 @@ * Use the {@link StartFragment#newInstance} factory method to * create an instance of this fragment. */ -public class StartFragment extends TrackingFragment { +public class StartFragment extends Fragment { TextView tvNexmonInfo; ImageView ivNexmon; @@ -98,11 +97,6 @@ public void onStop() { } - @Override - public String getTrackingName() { - return "Screen: Start"; - } - @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ToolsFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ToolsFragment.java index ec98831b5..fc8035645 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ToolsFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/ToolsFragment.java @@ -18,7 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; - +import android.app.Fragment; import android.content.res.AssetManager; import android.os.Bundle; import android.os.Handler; @@ -32,8 +32,6 @@ import android.widget.Spinner; import android.widget.Toast; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; import com.roger.catloadinglibrary.CatLoadingView; import com.stericson.RootShell.exceptions.RootDeniedException; import com.stericson.RootShell.execution.Command; @@ -50,7 +48,7 @@ import de.tu_darmstadt.seemoo.nexmon.R; -public class ToolsFragment extends TrackingFragment { +public class ToolsFragment extends Fragment { private final static int GUI_SHOW_TOAST = 111; private final static int GUI_SHOW_LOADING = 112; @@ -225,13 +223,6 @@ public void commandCompleted(int id, int exitcode) { File file = new File(installLocation + "/" + filename); if(!file.exists()) { toast("ERROR: Can't install to " + installLocation + "/" + filename); - - Tracker tracker = MyApplication.getDefaultTracker(); - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Error") - .setLabel("Tools") - .setAction("ERROR: Can't install to " + installLocation + "/" + filename) - .build()); } } }); @@ -247,72 +238,35 @@ public void run() { try { guiHandler.sendEmptyMessage(GUI_SHOW_LOADING); extractAssets(); - Tracker tracker = MyApplication.getDefaultTracker(); if (chkRawproxy.isChecked()) { //toast("Installing rawproxy ..."); copyExtractedAsset(binInstallLocation, "rawproxy"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("rawproxy") - .setAction("install") - .build()); } if (chkRawproxyreverse.isChecked()) { //toast("Installing rawproxyreverse ..."); copyExtractedAsset(binInstallLocation, "rawproxyreverse"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("rawproxyreverse") - .setAction("install") - .build()); } if (chkDhdutil.isChecked()) { //toast("Installing dhdutil ..."); copyExtractedAsset(binInstallLocation, "dhdutil"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("dhdutil") - .setAction("install") - .build()); } if (chkNexutil.isChecked()) { //toast("Installing nexutil ..."); copyExtractedAsset(binInstallLocation, "nexutil"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("nexutil") - .setAction("install") - .build()); } if (chkTcpdump.isChecked()) { //toast("Installing tcpdump ..."); copyExtractedAsset(binInstallLocation, "tcpdump"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("tcpdump") - .setAction("install") - .build()); } if (chkLibfakeioctl.isChecked()) { //toast("Installing tcpdump ..."); copyExtractedAsset(libInstallLocation, "libfakeioctl.so"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("libfakeioctl.so") - .setAction("install") - .build()); } if (chkAircrack.isChecked()) { @@ -336,34 +290,16 @@ public void run() { copyExtractedAsset(binInstallLocation, "tkiptun-ng"); copyExtractedAsset(binInstallLocation, "wesside-ng"); copyExtractedAsset(binInstallLocation, "wpaclean"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("Aircrack") - .setAction("install") - .build()); } if (chkNetcat.isChecked()) { //toast("Installing netcat ..."); - copyExtractedAsset(binInstallLocation, "nc"); - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("Netcat") - .setAction("install") - .build()); } if (chkIw.isChecked()) { //toast("Installing iw ..."); copyExtractedAsset(binInstallLocation, "iw"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("iw") - .setAction("install") - .build()); } if (chkWirelessTools.isChecked()) { @@ -371,34 +307,16 @@ public void run() { copyExtractedAsset(binInstallLocation, "iwconfig"); copyExtractedAsset(binInstallLocation, "iwlist"); copyExtractedAsset(binInstallLocation, "iwpriv"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("WirelessTools") - .setAction("installed") - .build()); } if (chkMdk3.isChecked()) { //toast("Installing mdk3 ..."); copyExtractedAsset(binInstallLocation, "mdk3"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("MDK3") - .setAction("installed") - .build()); } if (chkSocat.isChecked()) { //toast("Installing mdk3 ..."); copyExtractedAsset(binInstallLocation, "socat"); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Tools") - .setLabel("socat") - .setAction("installed") - .build()); } @@ -421,11 +339,4 @@ private void toast(String msg) { message.obj = msg; guiHandler.sendMessage(message); } - - - - @Override - public String getTrackingName() { - return "Screen: Tools"; - } } diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/TrackingFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/TrackingFragment.java deleted file mode 100644 index ef72fd951..000000000 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/TrackingFragment.java +++ /dev/null @@ -1,36 +0,0 @@ -package de.tu_darmstadt.seemoo.nexmon.gui; - -import android.app.Fragment; -import android.os.Bundle; - -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - -import de.tu_darmstadt.seemoo.nexmon.MyApplication; - -/** - * Created by fabian on 12/20/16. - */ - -public abstract class TrackingFragment extends Fragment { - - protected Tracker mTracker; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - // Obtain the shared Tracker instance. - mTracker = MyApplication.getDefaultTracker(); - } - - @Override - public void onResume() { - super.onResume(); - - mTracker.setScreenName(getTrackingName()); - mTracker.send(new HitBuilders.ScreenViewBuilder().build()); - } - - public abstract String getTrackingName(); -} diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/WpaDictFragment.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/WpaDictFragment.java index 9f9107311..e8314ee0b 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/WpaDictFragment.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/gui/WpaDictFragment.java @@ -18,6 +18,7 @@ package de.tu_darmstadt.seemoo.nexmon.gui; +import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.os.Environment; @@ -54,7 +55,7 @@ /** * Created by fabian on 10/1/16. */ -public class WpaDictFragment extends TrackingFragment { +public class WpaDictFragment extends Fragment { private static final int HANDLER_SHOW_LOADING = 1; private static final int HANDLER_DISMISS_LOADING = 2; @@ -62,35 +63,20 @@ public class WpaDictFragment extends TrackingFragment { private static final int HANDLER_SHOW_TOAST = 4; private static final int REQ_CODE_SRC1 = 10; private static final int REQ_CODE_SRC2 = 11; - - private static EditText etDictHashFile; private static EditText etPcapFile; private static EditText etEssid; - private static Button btnSelectDictHashFile; private static Button btnSelectPcapFile; private static Button btnStart; private static Button btnScanAp; - private Spinner spinnerAp; - - private CatLoadingView loadingView; - private String dictHashFile; private String pcapFile; - private Attack attack; - private HashMap bssidToSsid = new HashMap(); - - - - - private Handler guiHandler; - public WpaDictFragment() { // Required empty public constructor } @@ -156,11 +142,6 @@ public void onResume() { } - @Override - public String getTrackingName() { - return "Screen: WPA dict"; - } - @Override public void onPause() { super.onPause(); diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/sharky/WiresharkService.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/sharky/WiresharkService.java index 07dbe3f49..649fac86e 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/sharky/WiresharkService.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/sharky/WiresharkService.java @@ -25,9 +25,6 @@ import android.os.Environment; import android.os.IBinder; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - import java.util.ArrayList; import de.tu_darmstadt.seemoo.nexmon.MyApplication; @@ -94,12 +91,6 @@ public void startLiveCapturing() { isCapturing = true; sendMonitorModeBroadcast(true); - - Tracker tracker = MyApplication.getDefaultTracker(); - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Wireshark") - .setAction("Live Capturing started") - .build()); } } @@ -123,19 +114,6 @@ public void stopLiveCapturing() { if (isCapturing) { isCapturing = false; - Tracker tracker = MyApplication.getDefaultTracker(); - - tracker.send(new HitBuilders.TimingBuilder() - .setCategory("Runtime") - .setVariable("Wireshark") - .setValue(System.currentTimeMillis() - startTime) - .build()); - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Wireshark") - .setAction("Live Capturing stopped") - .build()); - MyApplication.getFrameReceiver().getObserver().removeObserver(this); sendMonitorModeBroadcast(false); } diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/APfinderService.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/APfinderService.java index 1278a289b..3666b9a1e 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/APfinderService.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/APfinderService.java @@ -7,9 +7,6 @@ import android.support.annotation.Nullable; import android.util.Log; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -48,12 +45,6 @@ public void start() { isRunning = true; sendMonitorModeBroadcast(true); startTime = System.currentTimeMillis(); - - Tracker tracker = MyApplication.getDefaultTracker(); - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Airodump") - .setAction("Live Capturing started") - .build()); } private void sendMonitorModeBroadcast(boolean monitorModeNeeded) { @@ -84,21 +75,6 @@ public void stop() { MyApplication.getFrameReceiver().getObserver().removeObserver(this); isRunning = false; sendMonitorModeBroadcast(false); - - Tracker tracker = MyApplication.getDefaultTracker(); - - tracker.send(new HitBuilders.TimingBuilder() - .setCategory("Runtime") - .setVariable("Airodump") - .setValue(System.currentTimeMillis() - startTime) - .build()); - - - tracker.send(new HitBuilders.EventBuilder() - .setCategory("Airodump") - .setAction("Live capturing stopped") - .build()); - } public AccessPoint getAccessPoint(String bssid) { diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/Attack.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/Attack.java index cd15d864b..d26c72299 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/Attack.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/Attack.java @@ -4,9 +4,6 @@ import android.graphics.Color; import android.text.SpannableStringBuilder; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; - import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; @@ -34,11 +31,6 @@ public abstract class Attack implements Runnable { public static final String ATTACK_REAVER = "Reaver"; public static final String ATTACK_WPA_DICT = "WpaDict"; - - - - - public static final String ATTACK_ID = "attack_id"; public static final String ATTACK_UPDATE_REASON = "attack_update_reason"; public static final String ATTACK_UPDATE_TEXT = "attack_update_text"; @@ -169,8 +161,6 @@ public void run() { intent.putExtra("status", STATUS_RUNNING); MyApplication.getAppContext().sendBroadcast(intent); - trackAttack(); - doAttack(); finishTime = System.currentTimeMillis(); @@ -182,16 +172,6 @@ public void run() { MyApplication.getAppContext().sendBroadcast(intent); } - private void trackAttack() { - // Get tracker. - Tracker t = MyApplication.getDefaultTracker(); - // Build and send an Event. - t.send(new HitBuilders.EventBuilder() - .setCategory("Attack") - .setAction(getName()) - .build()); - } - public int getGuid() { return guid; } @@ -253,4 +233,4 @@ protected void updateAttackText(String updateText, int updateReason, int attackI public interface IAttackInstanceUpdate { void onAttackInstanceUpdate(HashMap remainingInstances); } -} \ No newline at end of file +} diff --git a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/AttackService.java b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/AttackService.java index 3a61a773f..58fbaa64a 100644 --- a/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/AttackService.java +++ b/app/app/src/main/java/de/tu_darmstadt/seemoo/nexmon/stations/AttackService.java @@ -10,8 +10,6 @@ import android.graphics.drawable.Icon; import android.os.IBinder; -import com.google.android.gms.analytics.HitBuilders; -import com.google.android.gms.analytics.Tracker; import com.google.gson.Gson; import java.util.HashMap; @@ -81,25 +79,12 @@ private void updateAttack(Intent intent) { showNotification(attack, attack.getTypeString(), attackText); if(status == Attack.STATUS_FINISHED) { - Tracker tracker = MyApplication.getDefaultTracker(); - - tracker.send(new HitBuilders.TimingBuilder() - .setCategory("Runtime") - .setVariable(attack.getName()) - .setValue(attack.getFinishTime() - attack.getStartTime()) - .build()); - attacks.remove(attackId); broadcastInstances(); evaluateMonitorModeNeed(); if(attack.isCanceled) { MyApplication.getNotificationManager().cancel(attackId); - tracker.send(new HitBuilders.TimingBuilder() - .setCategory("Cancel Duration") - .setVariable(attack.getName()) - .setValue(attack.getFinishTime() - attack.getCancelTime()) - .build()); } } } diff --git a/app/build.gradle b/app/build.gradle index 4aa9de972..f6627fcfe 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -5,7 +5,6 @@ buildscript { } dependencies { classpath 'com.android.tools.build:gradle:2.3.2' - classpath 'com.google.gms:google-services:3.0.0' } }