From 155a03efad2d2e96eca4464be3f34e52583d2a88 Mon Sep 17 00:00:00 2001 From: itsikkes Date: Mon, 19 Sep 2016 22:24:33 +0300 Subject: [PATCH 1/2] Small hack to support fast-user switching when RDPing to already loggen-in host Although it doesn't always happen, because there is no easy wasy to know - trying to press YES on the dialog box (if any) can help the login process --- chaos_monkey/exploit/rdpgrinder.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/chaos_monkey/exploit/rdpgrinder.py b/chaos_monkey/exploit/rdpgrinder.py index 6d2bbde18..89a4014da 100644 --- a/chaos_monkey/exploit/rdpgrinder.py +++ b/chaos_monkey/exploit/rdpgrinder.py @@ -140,6 +140,11 @@ class KeyPressRDPClient(rdp.RDPClientObserver): time.sleep(KEYS_SENDER_SLEEP) def onReady(self): + time.sleep(1) + reactor.callFromThread(self._controller.sendKeyEventUnicode, ord('Y'), True) + time.sleep(1) + reactor.callFromThread(self._controller.sendKeyEventUnicode, ord('Y'), False) + time.sleep(1) pass def onClose(self): @@ -147,6 +152,7 @@ class KeyPressRDPClient(rdp.RDPClientObserver): self.closed = True def onSessionReady(self): + LOG.debug("Logged in, session is ready for work") self._last_update = time.time() self._keys_thread.start() From 2066c191905ba76b482a4e84f00ac6462e81c905 Mon Sep 17 00:00:00 2001 From: Evstifeev Roman Date: Tue, 20 Sep 2016 19:35:23 +0400 Subject: [PATCH 2/2] requirements.txt - remove duplicate (requests) --- chaos_monkey/requirements.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chaos_monkey/requirements.txt b/chaos_monkey/requirements.txt index 0f4423f9f..7992b5242 100644 --- a/chaos_monkey/requirements.txt +++ b/chaos_monkey/requirements.txt @@ -12,5 +12,4 @@ psutil PyInstaller ecdsa netifaces -requests -grequests \ No newline at end of file +grequests