netsoul 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c87d6edb74b1dd1b82b6617944658c472f8ceff
4
- data.tar.gz: 705d281ad0c3174ad5aadbfc9dbaa367e14dae8e
3
+ metadata.gz: 3c63a4a266613cfd391300dc3b956822ee76fd66
4
+ data.tar.gz: 3186372ef1119950c82d7484f70e81819a097060
5
5
  SHA512:
6
- metadata.gz: 2facc495620c54c44ef89d081ce5a2e3794f39937ff96887af617a330907a42144ffb90d4f5a2c8b731332e9679bdba4c44e516bc9cdbe88f1b5037b7738b1c3
7
- data.tar.gz: 3537edb9e19b2dd4048d9c744f7dd7728d8bf8bee601d514352c8124e7c80ec1c8401859cfa40c57b685509981dbf99f04ff2c726301420d189a4e0e46e15d71
6
+ metadata.gz: 4811496fc6e71bc5557485592e9ee4fa198b142a148f9498cf92419904f4fd60641c6fa7b94607b8f251cdcbee390f113d2002fe2d34eb3185623e8a20c5a84b
7
+ data.tar.gz: 1700b440b9c802256d3949ff56473bfc7044c0e5ccbac251da46d7d24faa7494eaf647b05a55d4ca1277adf44971e8b8088db1ce3f658eaef23c4d7c4edd9930
@@ -16,8 +16,8 @@ module Netsoul
16
16
 
17
17
  def standard_auth(config)
18
18
  client_ip = config.user_connection_info[:client_ip]
19
- location = Message.escape(Location.get(client_ip) == 'ext'.freeze ? config.location : Location.get(client_ip))
20
- client_name = Message.escape(config.client_name)
19
+ location = Message._escape(Location.get(client_ip) == 'ext'.freeze ? config.location : Location.get(client_ip))
20
+ client_name = Message._escape(config.client_name)
21
21
  "ext_user_log #{config.login} #{_standard_auth_string(config)} #{client_name} #{location}"
22
22
  end
23
23
 
@@ -28,10 +28,10 @@ module Netsoul
28
28
  end
29
29
 
30
30
  def _kerberos_auth_klog(config)
31
- location = Message.escape(config.location)
32
- user_group = Message.escape(config.user_group)
33
- client_name = Message.escape(config.client_name)
34
- "ext_user_klog #{_kerberos_get.token_base64.slice(0, 812)} #{Message.escape(RUBY_PLATFORM)} #{location} #{user_group} #{client_name}"
31
+ location = Message._escape(config.location)
32
+ user_group = Message._escape(config.user_group)
33
+ client_name = Message._escape(config.client_name)
34
+ "ext_user_klog #{_kerberos_get.token_base64.slice(0, 812)} #{Message._escape(RUBY_PLATFORM)} #{location} #{user_group} #{client_name}"
35
35
  end
36
36
 
37
37
  def kerberos_auth(config)
@@ -48,7 +48,7 @@ module Netsoul
48
48
  end
49
49
 
50
50
  def send_message(user, msg)
51
- "user_cmd msg_user #{user} msg #{Message.escape(msg.to_s)}"
51
+ "user_cmd msg_user #{user} msg #{Message._escape(msg.to_s)}"
52
52
  end
53
53
 
54
54
  def start_writing_to_user(user)
@@ -80,11 +80,11 @@ module Netsoul
80
80
  end
81
81
 
82
82
  def user_data(data)
83
- "user_cmd user_data #{Message.escape(data.to_s)}"
83
+ "user_cmd user_data #{Message._escape(data.to_s)}"
84
84
  end
85
85
 
86
86
  def xfer(user, id, filename, size, desc)
87
- "user_cmd msg_user #{user} desoul_ns_xfer #{Message.escape("#{id} #{filename} #{size} #{desc}")}"
87
+ "user_cmd msg_user #{user} desoul_ns_xfer #{Message._escape("#{id} #{filename} #{size} #{desc}")}"
88
88
  end
89
89
 
90
90
  def desoul_ns_xfer(user, id, filename, size, desc)
@@ -100,7 +100,7 @@ module Netsoul
100
100
  end
101
101
 
102
102
  def xfer_data(user, id, data)
103
- "user_cmd msg_user #{user} desoul_ns_xfer_data #{Message.escape("#{id} #{Base64.b64encode(data.to_s, data.to_s.length)}")}"
103
+ "user_cmd msg_user #{user} desoul_ns_xfer_data #{Message._escape("#{id} #{Base64.b64encode(data.to_s, data.to_s.length)}")}"
104
104
  end
105
105
 
106
106
  def desoul_ns_xfer_data(user, id, data)
@@ -123,26 +123,14 @@ module Netsoul
123
123
  'exit'.freeze
124
124
  end
125
125
 
126
- def escape(str)
126
+ def _escape(str)
127
127
  str = URI.escape(str, Regexp.new("#{URI::PATTERN::ALNUM}[:graph:][:punct:][:cntrl:][:print:][:blank:]", false, 'N'.freeze))
128
128
  URI.escape(str, Regexp.new("[^#{URI::PATTERN::ALNUM}]", false, 'N'.freeze))
129
129
  end
130
130
 
131
- def unescape(str)
131
+ def _unescape(str)
132
132
  URI.unescape str
133
133
  end
134
-
135
- def ltrim(str)
136
- str.to_s.gsub(/^\s+/, ''.freeze)
137
- end
138
-
139
- def rtrim(str)
140
- str.to_s.gsub(/\s+$/, ''.freeze)
141
- end
142
-
143
- def trim(str)
144
- rtrim(ltrim(str.to_s))
145
- end
146
134
  end
147
135
  end
148
136
  end
@@ -1,3 +1,3 @@
1
1
  module Netsoul
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netsoul
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Kakesa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-04 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler