Permalink
Browse files

Prompt for the password on an unknown but encrypted link. Untested.

  • Loading branch information...
1 parent ab1ab30 commit 47573d07a121f3e6e300933c8a554a3873fe6713 @akkana committed Nov 1, 2012
Showing with 10 additions and 4 deletions.
  1. +10 −4 netscheme
View
@@ -384,8 +384,8 @@ def is_debian() :
release = float(line[16:])
lsb.close()
if is_ubuntu :
- if release >= 12.0 :
- return False
+ #if release >= 12.0 :
+ # return False
return True
except :
pass
@@ -471,9 +471,15 @@ def find_and_set_scheme(newscheme, add=False) :
if ans != 'y' and ans != 'Y' and ans != '':
sys.exit(1)
+ # Get the key, if relevant:
+ if ap.encryption and ap.encryption != "open" :
+ key = raw_input("Password: ")
+ else :
+ key = ''
+
# Use the scheme
- scheme = NetScheme(ap.essid, True, '', '', '', '',
- ap.encryption, ap.essid)
+ scheme = NetScheme(ap.essid, True, encryption=ap.encryption,
+ essid=ap.essid, key=key)
if ap.interface :
scheme.interface = ap.interface
scheme.set_scheme()

0 comments on commit 47573d0

Please sign in to comment.