[5/03] WPA-Enterprise WORKING for UT, UNSW, Georgia Tech

Search This thread

persiansown

Retired Recognized Developer
Jan 12, 2007
877
717
At this time, my courseload is way too high for me to do this. I also formatted and lost my sourcecode so I would have to write it from scratch. Sorry!


http://www.4shared.com/file/103246844/247a67c/WPA_Enterprise.html

Look below for instructions to request your school

Root, of course, is required.
The only other things this program needs is for the user to input their username and password as well as copy the security certificate to their SDcard as well as copying the security file to the SDcard. The program takes care of the rest.

I can modify my program to allow other people to connect to WPA Enterprise places in their area. If there is interest in this, let me know and I would be happy to upload versions of my program that allows others to connect.


Donations are always enjoyed :)

For UT Students:
1. Copy cacerts.pem to your SDCard. Make sure its named cacerts.pem NOT cacerts.pem or anything else similar. The program is CASE SENSITIVE. Make sure to UNMOUNT your sdcard from the computer
2. Run the program and click always to the superuser prompt (if you have it installed)
3. Input your information.
4. Click Save
5. Click Install
6. Click Reboot
If you ever need to revert, just open the program and click undo!

For UNSW Students:
1. Run the program and click always to the superuser prompt (if you have it installed)
3. Input your password (leave username blank)
4. Click Save
5. Click Install
6. Click Reboot
If you ever need to revert, just open the program and click undo!

For Georgia Tech Students
1. Copy Equifax_Secure_CA.pem to your SDCard. Make sure its named Equifax_Secure_CA.pem. The program is CASE SENSITIVE. Make sure to UNMOUNT your sdcard from the computer
2. Run the program and click always to the superuser prompt (if you have it installed)
3. Input your information.
4. Click Save
5. Click Install
6. Click Reboot
If you ever need to revert, just open the program and click undo!


If anyone else wants it, link me to a page like this one and it will give me an example config.


Enjoy!
 
Last edited:

grippa

Senior Member
Feb 26, 2008
129
15
UK
I'm putting the finishing touches on my program that allows students that go to the University of Texas to connect to the WPA-Enterprise network here.

Root, of course, is required.
The only other things this program needs is for the user to input their username and password as well as copy the security certificate to their SDcard. The program takes care of the rest.

I can modify my program to allow other people to connect to WPA Enterprise places in their area. If there is interest in this, let me know and I would be happy to upload versions of my program that allows others to connect.

BTW, It definitely does work, I was able to connect to restricted.utexas.edu on my phone and browse the web through it.

Thats good news - I am interested - if this works, i'd be finally able to use it on my uni network.

btw - im on adb 1.5 official.
 

persiansown

Retired Recognized Developer
Jan 12, 2007
877
717
Sorry I haven't uploaded the APK yet. I've been really busy with school and the like.

I need to put in a couple more lines so no one screws up their wifi. Expect it soon though
 

persiansown

Retired Recognized Developer
Jan 12, 2007
877
717
thanks alot for this.

here's a link for my uni : http://www.port.ac.uk/special/is/mobilemedia/broadband/wirelessoncampus/ -> its got the config details.

my uni operates on both wpa/wpa2 and the auth is peap, mschapv2
the cer certificate is on the windows xp part on the above link.

ive converted my .cer to .pem through openssl, so atleast one step is complete.

any help pls? thanks.

I can try that. Im not sure, but Ill try to wing it for you. Ill send you a PM when its uploaded.
 

vSymm

Member
Nov 26, 2008
7
1
Please post the source. I suggest that other UT students refrain from using this application until then, due to the ridiculously high abuse potential of an app that elevates to root, and even worse, one that you enter EID + password in.

The normal restrictions on network access can be sidestepped. Your EID and password could easily be harvested. Don't run apps like this until the source is available and someone reputable looks at it.

I posted UT Austin specific instructions back in November. If you want access at UT but don't like to gamble, feel free to give them a try. They're a bit dated with respect to gaining root.
http://xdaforums.com/showthread.php?t=450915

I'll add also that the instructions will probably work at any location using WPA Enterprise auth - anything that wpa_supplicant supports. There are several examples in my thread of people getting it to work at their school/workplace. You can either create the configuration file yourself by looking at the Windows/Mac/whatever instructions made available to you, or you may try contacting the local IT dept.
 
  • Like
Reactions: Nick123194

persiansown

Retired Recognized Developer
Jan 12, 2007
877
717
package com.test.login;


import java.io.BufferedWriter;
import java.io.DataOutputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Spinner;

public class Login extends Activity {
// Declare our Views, so we can access them later
private EditText etUsername;
private EditText etPassword;
private Button btnLogin;
private Button btnInstall;
private Button btnUndo;
private Button btnRestart;
private String username;
private String password;
private String securityfilename = "cacerts.pem";
private boolean copied = false;

/** Called when the activity is first created. */
@SuppressWarnings("unchecked")
@Override
public void onCreate(Bundle savedInstanceState) {

command("cp /data/misc/wifi/wpa_supplicant.conf /sdcard/wpa_supplicant.conf");
command("cp /data/misc/wifi/wpa_supplicant.conf /sdcard/wpa_supplicant.conf.bac");
super.onCreate(savedInstanceState);

// Set Activity Layout
setContentView(R.layout.main);

// Get the EditText and Button References
etUsername = (EditText)findViewById(R.id.username);
etPassword = (EditText)findViewById(R.id.password);
btnLogin = (Button)findViewById(R.id.login_button);
btnInstall = (Button)findViewById(R.id.install_button);
btnRestart = (Button)findViewById(R.id.restart_button);
btnUndo = (Button)findViewById(R.id.undo_button);
// Spinner array
final Spinner s = (Spinner) findViewById(R.id.spinner);
ArrayAdapter adapter = ArrayAdapter.createFromResource(
this, R.array.locations, android.R.layout.simple_spinner_item);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
s.setAdapter(adapter);
action("WARNING!","If you have superuser installed, you MUST click ALWAYS before continuing.\n \nOtherwise I'm not sure what may happen\n\nMake sure your Security Certificate is on your SDcard");




// Set Click Listener
btnLogin.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// Check Login
username = etUsername.getText().toString();
password = etPassword.getText().toString();
action("Step 1 Complete","Input Successful\nIf phone is in landscape, change to portrait and click again :)");
String place = (String) s.getSelectedItem();
inputvalues (username, password, place);
}
});
btnInstall.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
command ("cp /sdcard/" + securityfilename + " /data/misc/wifi/" + securityfilename);
command ("cp /sdcard/wpa_supplicant.conf" + " /data/misc/wifi/wpa_supplicant.conf");
command ("chmod 666 /data/misc/wifi/wpa_supplicant.conf");
command ("chmod 444 /data/misc/wifi/cacerts.pem");
copied = true;
try {
Thread.sleep(2500);
}
catch(InterruptedException e) {}
action("Step 2 Complete","Config Saved Successfly");
}
});
btnRestart.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(copied)
command ("reboot");
}
});
btnUndo.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
command ("cp /sdcard/wpa_supplicant.conf.bac" + " /data/misc/wifi/wpa_supplicant.conf");
}
});
}
public void command (String inputcommand)
{
Process process = null;
DataOutputStream os = null;
try
{
process = Runtime.getRuntime().exec("su");
os = new DataOutputStream(process.getOutputStream());
os.writeBytes(inputcommand);
os.flush();
os.close();
}
catch (Exception e)
{
return;
}
finally
{
try
{
if (os !=null)
{
os.close();
}
}
catch (Exception e) {}
}
}
public void inputvalues (String usrname, String pswrd, String location)
{
if (location=="University of Texas at Austin");
{
try
{
BufferedWriter writer = new BufferedWriter(new FileWriter("/sdcard/wpa_supplicant.conf", true));
writer.newLine();
writer.write("fast_reauth=0");
writer.newLine();
writer.write("network={");
writer.newLine();
writer.write("\t ssid=\"restricted.utexas.edu\"");
writer.newLine();
writer.write("\t key_mgmt=WPA-EAP");
writer.newLine();
writer.write("\t eap=TTLS");
writer.newLine();
writer.write("\t ca_cert=\"/data/misc/wifi/" + securityfilename + "\"");
writer.newLine();
writer.write("subject_match=\"CN=restricted.utexas.edu\"");
writer.newLine();
writer.write("\t anonymous_identity=\"anonymous\"");
writer.newLine();
writer.write("\t identity=\"" + usrname + "\"");
writer.newLine();
writer.write("\t password=\"" + pswrd + "\"");
writer.newLine();
writer.write("\t phase2=\"auth=MSCHAPV2\"");
writer.newLine();
writer.write("}");
writer.newLine();
writer.newLine();
writer.flush();
writer.close();
}
catch(FileNotFoundException ex){}
catch(IOException ioe){}
}
}
public void action (String step, String title)
{
AlertDialog.Builder alert = new AlertDialog.Builder(this);

alert.setTitle(step);
alert.setMessage(title);

alert.setPositiveButton("Ok", new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{
//cancel
}

});

alert.show();
}
}

Here is my source. There is an XML portion that takes care of the interface.
To be truthful, I'm kind of embarrassed of the code because I haven't touched Java since highschool. There is nothing wrong with this application, and nothing nefarious. To be honest, I wouldn't know how to do something like that if I wanted since I would have to delve into the commands.
If you have any suggestions for my code, I would be happy to hear them.

I took up this application as a side product just to see if my knowledge of linux was strong enough (I used linux on my netbook for a while before switching to windows 7) and once I got it working I wanted to share it with the community that has given me so much on both my current phone and previous ones.

Anyway, to all the people in this thread who are requesting stuff:

My birthday is today and my girlfriend came up to UT to celebrate with me. She won't be leaving until Sunday so.... I won't be working on it until Sunday. Bear with me though, I will get it up for you guys if I can (again, I pretty much suck. But now that the framework is down, I think I know what to do)

Smurfette, I took a look there and I'm pretty sure I can do it for you :)
 
Last edited:

persiansown

Retired Recognized Developer
Jan 12, 2007
877
717
So far I am sure I can do it for ellingthepirate and smurphete. I found example configurations for those two. I'm not sure about N23 or the guy on the other page yet. Again, I won't be able to update the app until sunday night (central time) at the earliest.
 

zhang42

Member
Apr 20, 2009
12
0
West Lafayette
Hi Persiansown,

I am working on something similar. Can you tell me how did you get permission to create/modify wpa_supplicant.conf programatically?

THANK YOU SO MUCH!!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Please post the source. I suggest that other UT students refrain from using this application until then, due to the ridiculously high abuse potential of an app that elevates to root, and even worse, one that you enter EID + password in.

    The normal restrictions on network access can be sidestepped. Your EID and password could easily be harvested. Don't run apps like this until the source is available and someone reputable looks at it.

    I posted UT Austin specific instructions back in November. If you want access at UT but don't like to gamble, feel free to give them a try. They're a bit dated with respect to gaining root.
    http://xdaforums.com/showthread.php?t=450915

    I'll add also that the instructions will probably work at any location using WPA Enterprise auth - anything that wpa_supplicant supports. There are several examples in my thread of people getting it to work at their school/workplace. You can either create the configuration file yourself by looking at the Windows/Mac/whatever instructions made available to you, or you may try contacting the local IT dept.