2

I want to create fake access point in WEP mode using hostapd. I found some configuration samples like this:

interface=wlan0
driver=nl80211
ssid=myAp
hw_mode=g
channel=1
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wep_default_key=1
wep_key1="abcde"
wep_key_len_broadcast="5"
wep_key_len_unicast="5"
wep_rekey_period=300

It created the access point in WEP mode properly. But when I attempted to connect to this fake access point, it remains on authentication and can't connect to that. any helps?

lord.h
  • 153
  • 3
  • 14

2 Answers2

2

The wep_key1 property is a HEX string. See here what makes a valid WEP key: https://www.speedguide.net/faq/what-is-a-valid-wep-key-110

wep_key1=abcde will be interpreted as 5 HEX characters instead of 5 ASCII characters, and you need 10 HEX characters. Therefore, a valid key would have double the length: wep_key1=abcdeabcde.

As the other answer said, you should also remove the quotes.

Edit: You should probably also remove your auth_algs line. For me, this setup works:

interface=wlan0
driver=nl80211
ssid=myAp
hw_mode=g
channel=1
ignore_broadcast_ssid=0
wep_default_key=1
wep_key1=abcdeabcde
wep_key_len_broadcast=5
wep_key_len_unicast=5
wep_rekey_period=300
Jelle
  • 36
  • 6
  • While not a problem in this "abcde" key; just to emphasize in case link bitrots: WEP key **cannot** be of arbirtrary length, only some lengths are allowed (5,13, or 16 chars, depending which WEP keysize is being used) – Matija Nalis May 10 '22 at 10:18
1

Only thing I can think of is removing the quotes from wep_key1.

I found this on the raspbian guide to setup a bridge:

https://www.raspberrypi.org/documentation/configuration/wireless/access-point.md#internet-sharing

Vickel
  • 7,879
  • 6
  • 35
  • 56
Ismael
  • 11
  • 1
  • Who knows @Ismael?!! :-) Maybe it works. I am not in such situation to test it. Please be sure and tell me to accept your answer. Thanks. – lord.h Dec 14 '19 at 11:42