forked from p15670423/monkey
Agent: Fix HTTPHandler class name in ExploitClassHTTPServer
This commit is contained in:
parent
df495f98c7
commit
bf998f5021
|
@ -28,7 +28,7 @@ def do_GET(self):
|
||||||
|
|
||||||
def get_new_http_handler_class(java_class: bytes, class_downloaded: threading.Event):
|
def get_new_http_handler_class(java_class: bytes, class_downloaded: threading.Event):
|
||||||
return type(
|
return type(
|
||||||
"http_handler_class",
|
"HTTPHandler",
|
||||||
(http.server.BaseHTTPRequestHandler,),
|
(http.server.BaseHTTPRequestHandler,),
|
||||||
{
|
{
|
||||||
"java_class": java_class,
|
"java_class": java_class,
|
||||||
|
@ -60,9 +60,9 @@ class ExploitClassHTTPServer:
|
||||||
self._class_downloaded = threading.Event()
|
self._class_downloaded = threading.Event()
|
||||||
self._poll_interval = poll_interval
|
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
|
# Setting `daemon=True` to save ourselves some trouble when this is merged to the
|
||||||
# agent-refactor branch.
|
# agent-refactor branch.
|
||||||
# TODO: Make a call to `create_daemon_thread()` instead of calling the `Thread()`
|
# TODO: Make a call to `create_daemon_thread()` instead of calling the `Thread()`
|
||||||
|
|
Loading…
Reference in New Issue