hide password
parent
c8c36d2848
commit
017a178cde
|
@ -28,9 +28,6 @@
|
||||||
# --username <username>
|
# --username <username>
|
||||||
# The username in TuxBliki to use as the owner.
|
# The username in TuxBliki to use as the owner.
|
||||||
#
|
#
|
||||||
# --password <password>
|
|
||||||
# The username's password in TuxBliki. Check your shell logs...
|
|
||||||
#
|
|
||||||
# --server <server address>
|
# --server <server address>
|
||||||
# The server running TuxBliki, optional; defaults to http://penguincoder.org
|
# The server running TuxBliki, optional; defaults to http://penguincoder.org
|
||||||
#
|
#
|
||||||
|
@ -103,6 +100,12 @@ host_prefix = "#{server.gsub(/\/$/, '')}:#{port}"
|
||||||
page = agent.get("#{host_prefix}/sessions/new")
|
page = agent.get("#{host_prefix}/sessions/new")
|
||||||
login_form = page.forms.first
|
login_form = page.forms.first
|
||||||
login_form.username = username
|
login_form.username = username
|
||||||
|
print "Password: "
|
||||||
|
STDOUT.flush
|
||||||
|
system "stty -echo"
|
||||||
|
password = STDIN.readline.chomp
|
||||||
|
system "stty echo"
|
||||||
|
puts ''
|
||||||
login_form.password = password
|
login_form.password = password
|
||||||
page = agent.submit(login_form, login_form.buttons.first)
|
page = agent.submit(login_form, login_form.buttons.first)
|
||||||
|
|
||||||
|
|
Reference in New Issue