oblique / create_ap

[NOT MAINTAINED] This script creates a NATed or Bridged WiFi Access Point.
BSD 2-Clause "Simplified" License
4.45k stars 1k forks source link

Add WEP support from config file #431

Open akarilimano opened 4 years ago

akarilimano commented 4 years ago

To add support of WEP authorization, generated hostapd.conf should contain these lines:

auth_algs=1
wep_default_key=0
wep_key0=WEP_KEY

Where WEP_KEY is a key used for WEP authorization, a parameter that can be set within create_ap config file. If auth_algs is set to 2, WEP does not work.

The configuration file for create_ap --config setting.conf that works for me:

CHANNEL=1
GATEWAY=192.168.1.1
ETC_HOSTS=0
DHCP_DNS=gateway
NO_DNS=0
NO_DNSMASQ=0
HIDDEN=0
MAC_FILTER=0
MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
ISOLATE_CLIENTS=0
SHARE_METHOD=nat
IEEE80211N=0
IEEE80211AC=0
HT_CAPAB=[HT40+]
VHT_CAPAB=
DRIVER=nl80211
NO_VIRT=0
COUNTRY=RU
FREQ_BAND=2.4
NEW_MACADDR=
DAEMONIZE=0
NO_HAVEGED=0
WIFI_IFACE=wlx12345678abcd
INTERNET_IFACE=eth0
SSID=MyWEP_point
PASSPHRASE=
USE_PSK=0
WEP_KEY=123456789a

PASSPHRASE should be empty (like for OPEN) and there should be no WPA_VERSION. Not sure how to add this to command line arguments, but maybe someone finds this helpful.

Should resolve Issue #343

alemarciana commented 4 years ago

when using the above comment config file as template, although WEP_KEY is set, the created ap does not ask for wep password not sure how to find log files so not attaching anything for the moment

akarilimano commented 4 years ago

@angeelgod, what does generated hostapd config looks like (it is created in some temporary directory)? Does it have the wep config lines? Have you stopped all running instances of create_ap when creating a new one? It used to work with my adapter, and the WEP was recognized. The only problem I got, is that it supported only hexadecimal digits in a wep key: [0-9a-f]. And some restrictions on a length maybe, but I don't remember. Could you post a config you use?