views:

88

answers:

2

@string = "\x16\x03\x01\x00\x91\x01\x00\x00\x8D\x03\x01LI.\e\x8F|\x06\f\xA2Tu\xC8WW\xCF\x87G2O,98\xEC\xADMM H\xB4\x0E-G\x00\x00H\xC0\n\xC0\x14\x00\x88\x00\x87\x009\x008\xC0\x0F\xC0\x05\x00\x84\x005\xC0\a\xC0\t\xC0\x11\xC0\x13\x00E\x00D\x00f\x003\x002\xC0\f\xC0\x0E\xC0\x02\xC0\x04\x00\x96\x00A\x00\x04\x00\x05\x00/\xC0\b\xC0\x12\x00\x16\x00\x13\xC0\r\xC0\x03\xFE\xFF\x00\n\x02\x01\x00\x00\e\xFF\x01\x00\x01\x00\x00\n\x00\b\x00\x06\x00\x17\x00\x18\x00\x19\x00\v\x00\x02\x01\x00\x00#\x00\x00"

Thanks in advance

A: 

It turned out i was attempting to connect to the server with wss:// instead of ws:// so i was trying to read an encrypted packet. So the packet is in whatever format secure web sockets are in.

Thanks for your help every one.

Phil M
A: 

(Using ruby 1.9)

@string.encoding
=> #<Encoding:UTF-8>
@string.force_encoding("UTF-8").valid_encoding?
=> false
phaedryx