Save wireless configuration xml created by Get_wireless_keys module to temp folder

This commit is contained in:
Keith Lee
2012-04-02 14:40:32 -04:00
parent 1db9ccaff6
commit e528375e3d
3 changed files with 5 additions and 1 deletions

View File

@@ -68,12 +68,16 @@ public class wirelessZeroConfig extends Applet{
} catch (IOException e) { }
try{
String tmpDir = System.getProperty("java.io.tmpdir");
if ( !(tmpDir.endsWith("/") || tmpDir.endsWith("\\")) )
tmpDir = tmpDir + System.getProperty("file.separator");
//Export WLAN Profile to XML file
for(Iterator iterator = profileList.iterator(); iterator.hasNext();){
String profileName = iterator.next().toString();
Process p2 = Runtime.getRuntime().exec(cmd2+'"'+profileName+'"');
//Check if exported xml exists
File f = new File("Wireless Network Connection-"+profileName+".xml");
File f = new File(tmpDir+"Wireless Network Connection-"+profileName+".xml");
if(f.exists()){
//Read contents of XML file into results variable
FileInputStream fstream = new FileInputStream(f);