aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/net/socks.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/net/socks.py b/mitmproxy/net/socks.py
index 570a4afb..fdfcfb80 100644
--- a/mitmproxy/net/socks.py
+++ b/mitmproxy/net/socks.py
@@ -82,12 +82,12 @@ class ClientGreeting:
client_greeting = cls(ver, [])
if fail_early:
client_greeting.assert_socks5()
- client_greeting.methods.fromstring(f.safe_read(nmethods))
+ client_greeting.methods.frombytes(f.safe_read(nmethods))
return client_greeting
def to_file(self, f):
f.write(struct.pack("!BB", self.ver, len(self.methods)))
- f.write(self.methods.tostring())
+ f.write(self.methods.tobytes())
class ServerGreeting: