Agent: Fix HTTPHandler class name in ExploitClassHTTPServer

This commit is contained in:
Mike Salvatore 2022-03-04 17:03:37 -05:00
parent df495f98c7
commit bf998f5021
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ def do_GET(self):
def get_new_http_handler_class(java_class: bytes, class_downloaded: threading.Event):
return type(
"http_handler_class",
"HTTPHandler",
(http.server.BaseHTTPRequestHandler,),
{
"java_class": java_class,
@ -60,9 +60,9 @@ class ExploitClassHTTPServer:
self._class_downloaded = threading.Event()
self._poll_interval = poll_interval
http_handler_class = get_new_http_handler_class(java_class, self._class_downloaded)
HTTPHandler = get_new_http_handler_class(java_class, self._class_downloaded)
self._server = http.server.HTTPServer((ip, port), http_handler_class)
self._server = http.server.HTTPServer((ip, port), HTTPHandler)
# Setting `daemon=True` to save ourselves some trouble when this is merged to the
# agent-refactor branch.
# TODO: Make a call to `create_daemon_thread()` instead of calling the `Thread()`