Update server.py

This commit is contained in:
Namhyeon Go 2024-03-04 18:38:54 +09:00 committed by GitHub
parent 551656fa68
commit 6185279e39
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,7 @@
# Namyheon Go (Catswords Research) <gnh1201@gmail.com> # Namyheon Go (Catswords Research) <gnh1201@gmail.com>
# https://github.com/gnh1201/caterpillar # https://github.com/gnh1201/caterpillar
# Created at: 2022-10-06 # Created at: 2022-10-06
# Updated at: 2024-12-28 # Updated at: 2024-03-04
# #
import argparse import argparse
@ -166,7 +166,8 @@ def jsonrpc2_server(conn, id, method, params):
print ("[*] relay destroyed: %s" % (id)) print ("[*] relay destroyed: %s" % (id))
else: else:
rpcmethod = Extension.get_rpcmethod(method) rpcmethod = Extension.get_rpcmethod(method)
rpcmethod.dispatch("call", id, params) if rpcmethod:
rpcmethod.dispatch("call", id, params)
def proxy_connect(webserver, conn): def proxy_connect(webserver, conn):
hostname = webserver.decode(client_encoding) hostname = webserver.decode(client_encoding)