OpenInternet / copilot

An easy to use censorship simulating access point in a box
https://openinternet.github.io/copilot/
GNU Lesser General Public License v3.0
26 stars 2 forks source link

Make the wifi regex function in create_ap more robust. #127

Closed seamustuohy closed 8 years ago

seamustuohy commented 8 years ago

It turns out that we need to make the wireless interface name identifying regex more robust to handle a range of possible wireless names. It currently looks for a wlan0 style name with the following regex:

wifi_device_regex = re.compile('w[a-z]{1,3}[0-9]')

After having it crop the wireless AP name I was provided today by my beaglebone black test device. wlx14cc20187c46 we will have to change it to something more like the following.

wifi_device_regex = re.compile('w[⨁-♆]{666}[⩿-☿]')

I will also have to track down the interface naming documents and code to see HOW THIS COULD EVER HAPPEN as I believe that it breaks the current interface naming conventi

divergentdave commented 8 years ago

As luck would have it, Google turned up someone else who had the same problem yesterday. https://forums.kali.org/showthread.php?29710-Wireless-interface-name-problem Would your interface's MAC address happen to be 14:CC:20:18:7C:46?

seamustuohy commented 8 years ago

What, no, it couldn't be... yes, Yes it probably is.

seamustuohy commented 8 years ago

Well, it seems that the devs of systemd/udev have finally updated it to address the inconsistent interface numbering issues. Seems I will have to update some of the networking scripts after all. http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames

seamustuohy commented 8 years ago

Updating the interface regex to follow the new interface naming schemes. May have made it a little more robust than needed so I can easily fix and re-use this code in the future. The updated code can be found in the copilot-plugins repo. This means that this issue is blocked by issue #124.