Skip to content

Commit 19bbc2e

Browse files
authored
Fix regex escape in wpa_passphrase function
1 parent 98777cd commit 19bbc2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/modules/ap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def ieee80211n():
3232
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep ieee80211n= | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()
3333

3434
def wpa_passphrase():
35-
return subprocess.run("sed -En 's/wpa_passphrase=(.*)/\1/p' /etc/hostapd/hostapd.conf", shell=True, capture_output=True, text=True).stdout.strip()
35+
return subprocess.run("sed -En 's/wpa_passphrase=(.*)/\\1/p' /etc/hostapd/hostapd.conf", shell=True, capture_output=True, text=True).stdout.strip()
3636

3737
def interface():
3838
return subprocess.run("cat /etc/hostapd/hostapd.conf | grep '^interface=' | cut -d'=' -f2", shell=True, capture_output=True, text=True).stdout.strip()

0 commit comments

Comments
 (0)