Android Open Source - WIFI_Recovery W E P Network






From Project

Back to project page WIFI_Recovery.

License

The source code is released under:

GNU General Public License

If you think the Android project WIFI_Recovery listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.vorsk.wifirecovery.network;
//from   ww  w  . jav  a  2  s. c om
import com.vorsk.wifirecovery.R;

public class WEPNetwork extends Network{
  
  public static final String key_mgmt = "NONE";
  
  private String key;
  
  public WEPNetwork(String ssid, String key){
    super(ssid);
    setSecurity(Network.WEP);
    setWEP_Key(key);
  }

  //mutators
  public String getWEP_Key() {
    return key;
  }
  public void setWEP_Key(String key) {
    //should check to make sure there are only the chars 0-9 and A-F
    //check removed because android allows invalid keys
    //check if key is enclosed in quotes, remove if so.
    if (key.charAt(0) == '"' && key.charAt(key.length()-1) == '"')
    {
      key = key.substring(1,key.length()-1);
    }
    this.key = key;
  }

  @Override
  protected String getSecurityDetails() {
    String key = "KEY: " + this.getWEP_Key();
    return key;
  }
  
  public int getIcon(){
    return R.drawable.network_wep;
  }
  
}




Java Source Code List

com.vorsk.wifirecovery.BackupActivity.java
com.vorsk.wifirecovery.BackupTask.java
com.vorsk.wifirecovery.HomeActivity.java
com.vorsk.wifirecovery.NetworkArrayAdapter.java
com.vorsk.wifirecovery.ParserTask.java
com.vorsk.wifirecovery.network.EAPNetwork.java
com.vorsk.wifirecovery.network.Network.java
com.vorsk.wifirecovery.network.OpenNetwork.java
com.vorsk.wifirecovery.network.WEPNetwork.java
com.vorsk.wifirecovery.network.WPANetwork.java