Quantcast
Channel: sshnet Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1026

Created Unassigned: SOCKS Proxy - Port is wrongly written to socket [2680]

$
0
0
Hi,

The port to write to socket should be masked and bit shift instead of dividing and modulus.

// Send port
//SocketWriteByte((byte)(ConnectionInfo.Port / 0xFF));
//SocketWriteByte((byte)(ConnectionInfo.Port % 0xFF));
// Mask & bit shift, not divide or modulus
SocketWriteByte((byte)((ConnectionInfo.Port & 0xFF00) >> 8));
SocketWriteByte((byte)(ConnectionInfo.Port & 0xFF));

Thanks.

Viewing all articles
Browse latest Browse all 1026

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>