Guest User

Untitled

a guest
Apr 19th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. proxy do |data|
  2. next if data.size < 9
  3. v, c, port, o1, o2, o3, o4, user = data.unpack("CCnC4a*")
  4. return { :close => "\0\x5b\0\0\0\0\0\0" } if v != 4 or c != 1
  5. next if ! idx = user.index("\0")
  6. { :remote => "#{[o1,o2,o3,o4]*'.'}:#{port}", :reply => "\0\x5a\0\0\0\0\0\0", :data => data[idx+9..-1] }
  7. end
Add Comment
Please, Sign In to add comment