summaryrefslogtreecommitdiff
path: root/login.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'login.coffee')
-rw-r--r--login.coffee12
1 files changed, 12 insertions, 0 deletions
diff --git a/login.coffee b/login.coffee
new file mode 100644
index 0000000..c129622
--- /dev/null
+++ b/login.coffee
@@ -0,0 +1,12 @@
+system = require 'system'
+[_, login_page, username, password] = system.args
+
+util = require './util'
+page = util.page
+
+page.open login_page, (status)->
+ util.log "Opening login page: #{status}"
+ util.handle_login_captcha ->
+ phantom.exit()
+ , username, password
+