awkman / pywifi

A cross-platform module for manipulating WiFi devices.
MIT License
447 stars 154 forks source link

Make profiles actually be a python object. #12

Closed wgaylord closed 7 years ago

wgaylord commented 7 years ago

Just opening this to say what i am working on for a PR.

And for comments on it.

it will allow for implementing more of the following.

https://msdn.microsoft.com/en-us/library/windows/desktop/ms707348(v=vs.85).aspx

wgaylord commented 7 years ago

This could also be expanded to to linux implementation as you can make windows only fields be None.

If someone could capture what is the value of props (Maybe json dump it?) https://github.com/awkman/pywifi/blob/master/pywifi/linux/wifiutil_wpa_dbus.py#L134

I can work on making this for both.

awkman commented 7 years ago

Because I want to remove the dependency on dbus in Linux env, I already rewrite Linux part to directly communicate with wpa_supplicant via socket. So, now please ignore Linux part until I commit the code.

What fields are you adding now? I could help to check the source code of wpa_supplicant(Linux) to confirm is there any similar fields.

wgaylord commented 7 years ago

Well firstly I was going to pull all the fields out of the .xml we receive from the call to the api. This way we can easily support any of the encryption and auth types. (They list all of them in the area I linked.)

But some of the fields seem sort of use-less so I will start listing them.

Firstly add encryption as a field instead of looking at auth type to guess it. (In the add_netwrok_profile call)

Also add sharedKey Which represents a dict with keyType ,protected and also keyMaterial.

wgaylord commented 7 years ago

Any thought on it?

awkman commented 7 years ago

Is it okay for you to send the PR first? Generally, I agree with your point and I think we can continue this discussion based on your modification. I will help you to modify linux part.

wgaylord commented 7 years ago

Okay. Will do

On Nov 1, 2016 11:48 AM, "Awk" notifications@github.com wrote:

Is it okay for you to send the PR first? Generally, I agree with your point and I think we can continue this discussion based on your modification. I will help you to modify linux part.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/awkman/pywifi/issues/12#issuecomment-257620387, or mute the thread https://github.com/notifications/unsubscribe-auth/ACCNyZ_ml74bwvpEIAav7E2znSps6H8zks5q521XgaJpZM4Kifm6 .