annoying-wifi 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +2 -2
- data/annoying-wifi.gemspec +1 -1
- data/bin/annoying-wifi +3 -3
- metadata +1 -1
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# AnnoyingWifi
|
2
2
|
|
3
|
-
Derived from [Rulu-Wifi](https://github.com/mcansky/RuLu-Wifi). Allows to login on the takeoffconf wifi.
|
3
|
+
Hack. Derived from [Rulu-Wifi](https://github.com/mcansky/RuLu-Wifi). Allows to login on the takeoffconf wifi.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,5 +10,5 @@ Derived from [Rulu-Wifi](https://github.com/mcansky/RuLu-Wifi). Allows to login
|
|
10
10
|
|
11
11
|
### Login
|
12
12
|
|
13
|
-
annoying-wifi login
|
13
|
+
USERNAME=takeoff_xx PASSWORD=xxx annoying-wifi login
|
14
14
|
|
data/annoying-wifi.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |gem|
|
|
11
11
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
12
12
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
13
13
|
gem.name = "annoying-wifi"
|
14
|
-
gem.version = "0.0.
|
14
|
+
gem.version = "0.0.2"
|
15
15
|
|
16
16
|
gem.add_dependency "rake"
|
17
17
|
gem.add_dependency "thor"
|
data/bin/annoying-wifi
CHANGED
@@ -5,14 +5,14 @@ require "thor"
|
|
5
5
|
require "yaml"
|
6
6
|
|
7
7
|
class AnnoyingWifi < Thor
|
8
|
-
|
9
8
|
desc "login", "Logs you in to the wifi"
|
10
9
|
def login
|
11
10
|
while true
|
12
|
-
username = "
|
13
|
-
password = "
|
11
|
+
username = ENV.fetch('USERNAME') { raise "need USERNAME" }
|
12
|
+
password = ENV.fetch('PASSWORD') { raise "need PASSWORD" }
|
14
13
|
say "Attempting login with #{username} / #{"*"*password.length}"
|
15
14
|
req = Curl::Easy.http_post("https://controller.mobile.lan/portal_api.php", "action=authenticate&login=#{username}&password=#{password}")
|
15
|
+
|
16
16
|
puts req.body_str
|
17
17
|
if req.body_str =~ /errorMessage/
|
18
18
|
puts "Wrong user name/password"
|