summaryrefslogtreecommitdiff
path: root/common/socks5/auth_pt2.go
diff options
context:
space:
mode:
authorBluesaxorcist <joshua@operatorfoundation.org>2019-10-21 17:32:39 -0500
committerBluesaxorcist <joshua@operatorfoundation.org>2019-10-21 17:32:39 -0500
commit4a56b1440c2bc315adda61b542793b7780cb8730 (patch)
tree819118b10e18373d6ddca31665ba3b7970849652 /common/socks5/auth_pt2.go
parent770bc14548a6a48ccbc8be0f0583122cf1dc6f6e (diff)
Removed termmon and fixed compiler warnings
Diffstat (limited to 'common/socks5/auth_pt2.go')
-rw-r--r--common/socks5/auth_pt2.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/socks5/auth_pt2.go b/common/socks5/auth_pt2.go
index ce3a50d..7e22a0f 100644
--- a/common/socks5/auth_pt2.go
+++ b/common/socks5/auth_pt2.go
@@ -35,24 +35,24 @@ import (
func (req *Request) authPT2() (err error) {
// The client sends a PT 2.0 authentication request.
- // uint32_t len
- // uint8_t data[len]
+ // uint32_t u
+ // uint8_t data[u]
// Read the authentication data.
- var len uint32
- if len, err = req.readUint32(); err != nil {
+ var u uint32
+ if u, err = req.readUint32(); err != nil {
return
}
- if len == 0 {
+ if u == 0 {
err = fmt.Errorf("PT 2.0 authentication data with 0 length")
return
}
var data []byte
- if data, err = req.readBytes(int(len)); err != nil {
+ if data, err = req.readBytes(int(u)); err != nil {
return
}
- var result string = string(data)
+ var result = string(data)
// Parse the authentication data according to the PT 2.0 specification
if req.Args, err = pt.ParsePT2ClientParameters(result); err != nil {