Skip to content

Commit da5694a

Browse files
authored
Only upload_to_host once in browsermonitor (#2346)
1 parent c083d18 commit da5694a

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

analyzer/windows/modules/auxiliary/browsermonitor.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ def __init__(self, options=None, config=None):
2727
self.startupinfo = subprocess.STARTUPINFO()
2828
self.startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
2929
self.browser_logfile = ""
30-
self.last_modification = 0.0
31-
self._is_first_save = True
3230

3331
def _find_browser_extension(self):
3432
temp_dir = tempfile.gettempdir()
@@ -54,22 +52,12 @@ def _find_browser_extension(self):
5452
time.sleep(1)
5553

5654
def _collect_browser_logs(self):
57-
if not self._is_first_save and self.last_modification != os.path.getmtime(self.browser_logfile):
58-
return
59-
self.last_modification = os.path.getmtime(self.browser_logfile)
6055
upload_to_host(self.browser_logfile, "browser/requests.log")
61-
self._is_first_save = False
6256

6357
def run(self):
6458
self.do_run = True
6559
if self.enabled:
6660
self._find_browser_extension()
67-
self.last_modification = os.path.getmtime(self.browser_logfile)
68-
while self.do_run:
69-
self._collect_browser_logs()
70-
time.sleep(1)
71-
return True
72-
return False
7361

7462
def stop(self):
7563
if self.enabled:

0 commit comments

Comments
 (0)