freewifi 0.2.6 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.idea/freewifi.iml +19 -0
- data/.idea/workspace.xml +227 -531
- data/lib/freewifi/additional/additional_functions.rb +1 -1
- data/lib/freewifi/general/wifi_portal_procedures.rb +46 -43
- data/lib/freewifi/mikrotik/newhub_mtik_api.rb +1 -2
- data/lib/freewifi/version.rb +1 -1
- metadata +1 -1
@@ -23,7 +23,7 @@ class InternalFunc_1
|
|
23
23
|
response_mess = https_connector.request(request_mess)
|
24
24
|
body = response_mess.body
|
25
25
|
return {:code => 200,
|
26
|
-
:result =>
|
26
|
+
:result => "Request completed successfully",
|
27
27
|
:body => {:telegram_resp => JSON.parse(body.to_s),
|
28
28
|
:description => "Telegram message to telegram_chat_id: #{telegram_chat_id.to_s}"}}
|
29
29
|
rescue
|
@@ -25,54 +25,54 @@ class WiFiPortal_1
|
|
25
25
|
:protocol_mtik,
|
26
26
|
:mtik_capsman_list
|
27
27
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
28
|
+
def initialize(apigw_wsdl,
|
29
|
+
apigw_endpoint,
|
30
|
+
apigw_namespace,
|
31
|
+
apigw_wsse_aut_log,
|
32
|
+
apigw_wsse_aut_pass,
|
33
|
+
iwag1_host,
|
34
|
+
iwag1_username,
|
35
|
+
iwag1_password,
|
36
|
+
iwag1_port,
|
37
|
+
mtik_control_ips_get,
|
38
|
+
mtik_user,
|
39
|
+
mtik_password,
|
40
|
+
hua_wlc_1_ip,
|
41
|
+
hua_wlc_2_ip,
|
42
|
+
hua_wlc_login,
|
43
|
+
hua_wlc_password,
|
44
|
+
iwag2_host,
|
45
|
+
iwag2_username,
|
46
|
+
iwag2_password,
|
47
|
+
iwag2_port,
|
48
|
+
protocol_mtik,
|
49
|
+
mtik_capsman_list
|
50
|
+
)
|
51
|
+
@iwag_telnet_connector = CSRtelnet_1.new(iwag1_host, iwag1_username, iwag1_password)
|
52
|
+
@ard_api_gw_connector_wifi = Savon.client do
|
53
|
+
#ssl_verify_mode :none
|
54
|
+
wsdl apigw_wsdl
|
55
|
+
endpoint apigw_endpoint
|
56
|
+
namespace apigw_namespace
|
57
|
+
wsse_auth(apigw_wsse_aut_log, apigw_wsse_aut_pass, :digest)
|
58
|
+
encoding 'UTF-8'
|
59
|
+
headers = {"Accept-Encoding" => "gzip, deflate", "Connection" => "Keep-Alive"}
|
60
|
+
end
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
62
|
+
@iwag1_host = iwag1_host
|
63
|
+
@iwag_username = iwag1_username
|
64
|
+
@iwag_password = iwag1_password
|
65
65
|
|
66
|
-
|
66
|
+
@mtik_api_connector = NEWhubWifiApi_1.new(mtik_control_ips_get, mtik_user, mtik_password)
|
67
67
|
|
68
|
-
|
68
|
+
@hua_controller_connector = HuaWifi_1.new(hua_wlc_1_ip, hua_wlc_2_ip, hua_wlc_login, hua_wlc_password)
|
69
69
|
|
70
|
-
|
71
|
-
|
70
|
+
@iwag_connector1 = IwagRequester.new(iwag1_host, iwag1_username, iwag1_password, iwag1_port)
|
71
|
+
@iwag_connector2 = IwagRequester.new(iwag2_host, iwag2_username, iwag2_password, iwag2_port)
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
73
|
+
@protocol_mtik = protocol_mtik
|
74
|
+
@mtik_capsman_list = mtik_capsman_list
|
75
|
+
end
|
76
76
|
|
77
77
|
|
78
78
|
def python_mac_iwag1_1(ipaddress)
|
@@ -256,6 +256,8 @@ class WiFiPortal_1
|
|
256
256
|
end
|
257
257
|
|
258
258
|
|
259
|
+
|
260
|
+
|
259
261
|
def get_subs_add_info4new_1(access_interface, subscribers_mac)
|
260
262
|
|
261
263
|
capsman_list = mtik_capsman_list
|
@@ -307,6 +309,7 @@ class WiFiPortal_1
|
|
307
309
|
answer
|
308
310
|
end
|
309
311
|
|
312
|
+
|
310
313
|
def proc_100_71_0_0(ip_address)
|
311
314
|
begin
|
312
315
|
p access_int = iwag_telnet_connector.return_iwag_access_interface_1(ip_address)
|
@@ -96,7 +96,6 @@ class NEWhubWifiApi_1
|
|
96
96
|
end
|
97
97
|
|
98
98
|
|
99
|
-
|
100
99
|
def get_info_subs_from_mik_ssh(subs_mac, controllers_ip)
|
101
100
|
input_parameters = {:subs_mac => subs_mac, :controllers_ip => controllers_ip}
|
102
101
|
#region get additional information
|
@@ -187,7 +186,7 @@ class NEWhubWifiApi_1
|
|
187
186
|
end
|
188
187
|
|
189
188
|
#endregion
|
190
|
-
subscribers_mac+ "---" + access_point + "---" + ssid_ap + "---" + tx_rate_set + "---"+ tx_rate
|
189
|
+
subscribers_mac+ "---" + access_point + "---" + ssid_ap + "---" + tx_rate_set + "---"+ tx_rate + "---"+ rx_rate + "---"+ rx_signal + "---"+ uptime + "---"+ packets + "---"+ bytes
|
191
190
|
|
192
191
|
end
|
193
192
|
|
data/lib/freewifi/version.rb
CHANGED