blob: efc8d0d76f4a135492c805d79eb1ee5deb93a155 [file] [log] [blame]
#!/usr/bin/python
import pprint, sys
import dbus, flimflam
if (len(sys.argv) < 2):
print "Usage: %s <ssid> [passphrase] [security]" % (sys.argv[0])
sys.exit(1)
print "Attempting to configure hidden service %s" % (sys.argv[1])
flim = flimflam.FlimFlam(dbus.SystemBus())
ssid = sys.argv[1]
if len(sys.argv) > 2:
if len(sys.argv) > 3:
security = sys.argv[3]
else:
security = "psk"
passphrase = sys.argv[2]
else:
security = "none"
passphrase = ""
flim.manager.ConfigureService(({
"Type" : "wifi",
"Mode" : "managed",
"SSID" : ssid,
"WiFi.HiddenSSID" : True,
"Security" : security,
"Passphrase" : passphrase }))