Ejemplo n.º 1
0
 @Override
 public void onEvent(Event e) {
   if (e instanceof FuseBind) {
     FuseBind f = (FuseBind) e;
     onNewMountpoint(f.source, f.mountpoint);
   } else {
     Logger.error("unknown event: " + e);
   }
 }
Ejemplo n.º 2
0
  public void readDNSlist() {
    String _line = "";

    try {
      BufferedReader inputReader =
          new BufferedReader(
              new FileReader(
                  System.getContext().getFilesDir().getAbsolutePath()
                      + "/tools/ettercap/share/etter.dns"));
      while ((_line = inputReader.readLine()) != null) {
        mTextDnsList.append(_line + "\n");
      }

      inputReader.close();
    } catch (Exception e) {
      Logger.error("readDNSList() error: " + e.getLocalizedMessage());
    }
  }
Ejemplo n.º 3
0
  public void saveDNSlist() {

    try {
      Logger.info(
          "saveDNSList() saving dnss to: "
              + System.getContext().getFilesDir().getAbsolutePath()
              + "/tools/ettercap/share/etter.dns");
      File f =
          new File(
              System.getContext().getFilesDir().getAbsolutePath()
                  + "/tools/ettercap/share/etter.dns");
      FileOutputStream fos = new FileOutputStream(f);
      fos.write(mTextDnsList.getText().toString().getBytes());
      fos.close();

      Toast.makeText(this, "Saved", Toast.LENGTH_SHORT).show();
    } catch (Exception e) {
      Logger.error("readDNSList() error: " + e.getLocalizedMessage());
      Toast.makeText(this, "Error: " + e.getLocalizedMessage(), Toast.LENGTH_SHORT).show();
    }
  }