Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional methods to check network capabilities (EAP, PSK, WEP, WPA, and WPA2) #66

Closed
jewom opened this issue Jul 10, 2017 · 4 comments
Assignees
Labels
Status - Released Work that has been released TODO Work that needs a-doin'
Milestone

Comments

@jewom
Copy link

jewom commented Jul 10, 2017

Hi,

Is it posible to check if the SSID use WEP or WPA ?

@isuPatches
Copy link
Owner

Yes...there is...although it also includes PSK.

  public boolean isNetworkSecure(ScanResult scanResult) {
        boolean isSecure = false;
        if (scanResult != null && scanResult.capabilities != null) {
            if (scanResult.capabilities.contains(Capabilities.WEP) || scanResult.capabilities.contains(Capabilities.PSK) || scanResult.capabilities.contains(Capabilities.EAP)) {
                isSecure = true;
            }
        }
        return isSecure;
    }

Is that good enough for your use case?

@isuPatches isuPatches added the Question A question about functionality or behavior label Jul 10, 2017
@isuPatches isuPatches self-assigned this Jul 10, 2017
@jewom
Copy link
Author

jewom commented Jul 11, 2017

Hi,

Finally I found a solution by checking myScanResult List nearbyAccessPoints.get(i).capabilities

@isuPatches
Copy link
Owner

I'll add methods for this in the library :)

@isuPatches isuPatches added 2.x TODO Work that needs a-doin' and removed Question A question about functionality or behavior labels Jul 11, 2017
@isuPatches
Copy link
Owner

commit 4afd442

@isuPatches isuPatches added this to the 2.x Initial Release milestone Jul 15, 2017
@isuPatches isuPatches changed the title Check if SSID is using WEP or WPA Add additional methods to check network capabilities (EAP, PSK, WEP, WPA, and WPA2) Jul 16, 2017
@isuPatches isuPatches added the Status - Released Work that has been released label Dec 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status - Released Work that has been released TODO Work that needs a-doin'
Projects
None yet
Development

No branches or pull requests

2 participants