MCPcopy Index your code
hub / github.com/cSploit/android / WipeReceiver

Class WipeReceiver

cSploit/src/org/csploit/android/MainActivity.java:978–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976 }
977
978 private class WipeReceiver extends ManagedReceiver {
979 private IntentFilter mFilter = null;
980
981 public WipeReceiver() {
982 mFilter = new IntentFilter();
983
984 mFilter.addAction(SettingsActivity.SETTINGS_WIPE_START);
985 }
986
987 public IntentFilter getFilter() {
988 return mFilter;
989 }
990
991 @Override
992 public void onReceive(Context context, Intent intent) {
993
994 if (intent.getAction().equals(SettingsActivity.SETTINGS_WIPE_START)) {
995 try {
996 String path;
997
998 if (intent.hasExtra(SettingsActivity.SETTINGS_WIPE_DIR)) {
999 path = intent.getStringExtra(SettingsActivity.SETTINGS_WIPE_DIR);
1000 } else {
1001 path = System.getRubyPath() + "' '" + System.getMsfPath();
1002 }
1003
1004 StopRPCServer();
1005 System.getTools().raw.async("rm -rf '" + path + "'", new Child.EventReceiver() {
1006 @Override
1007 public void onEnd(int exitCode) {
1008 MainActivity.this.sendBroadcast(new Intent(SettingsActivity.SETTINGS_WIPE_DONE));
1009 }
1010
1011 @Override
1012 public void onDeath(int signal) {
1013 MainActivity.this.sendBroadcast(new Intent(SettingsActivity.SETTINGS_WIPE_DONE));
1014 }
1015
1016 @Override
1017 public void onEvent(Event e) {
1018 }
1019 });
1020 } catch (Exception e) {
1021 System.errorLogging(e);
1022 }
1023 }
1024 }
1025 }
1026
1027 private class UpdateReceiver extends ManagedReceiver {
1028 private IntentFilter mFilter = null;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected