File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
lib/rex/post/hwbridge/extensions/rftransceiver Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def make_pkt_vlen(idx, len)
84
84
# @param data [String] Data to transmit
85
85
# @param opt [Hash] Optional parameters: "repeat" => Integer, "offset" => Integer
86
86
def rfxmit ( idx , data , opt = { } )
87
- data = Base64 . encode64 ( data )
87
+ data = Base64 . urlsafe_encode64 ( data )
88
88
request = "/rftransceiver/#{ idx } /rfxmit?data=#{ data } "
89
89
request += "&repeat=#{ opt [ "repeat" ] } " if opt . has_key? "repeat"
90
90
request += "&offset=#{ opt [ "offset" ] } " if opt . has_key? "offset"
@@ -112,7 +112,7 @@ def rfrecv(idx, opt={})
112
112
data = client . send_request ( request )
113
113
# Note the data is initially base64 encoded
114
114
if data . size ( ) > 0
115
- data [ "data" ] = Base64 . decode64 ( data [ "data" ] ) if data . has_key? "data"
115
+ data [ "data" ] = Base64 . urlsafe_decode64 ( data [ "data" ] ) if data . has_key? "data"
116
116
end
117
117
data
118
118
end
You can’t perform that action at this time.
0 commit comments