Beispiel #1
0
    def do_scan(self):
        if self.pid == 0:
            self.show_error('Please select a process')
            return
        active = self.scan_data_type_combobox.get_active()
        assert(active >= 0)
        data_type = self.scan_data_type_combobox.get_model()[active][0]
        cmd = self.value_input.get_text()
   
        try:
            cmd = misc.check_scan_command(data_type, cmd, self.is_first_scan)
        except Exception as e:
            # this is not quite good
            self.show_error(e.args[0])
            return

        # disable the window before perform scanning, such that if result come so fast, we won't mess it up
        self.search_count +=1 
        self.scanoption_frame.set_sensitive(False) # no need to check search_count here
        self.main_window.set_sensitive(False)
        self.memoryeditor_window.set_sensitive(False)
        self.is_scanning = True
        # set scan options only when first scan, since this will reset backend
        if self.search_count == 1:
            self.apply_scan_settings()
        self.backend.reset_scan_progress()
        self.progress_watcher_id = GObject.idle_add(self.progress_watcher)
        threading.Thread(target=self.scan_thread_func, args=(cmd,)).start()
Beispiel #2
0
    def do_scan(self):
        if self.pid == 0:
            self.show_error(_('Please select a process'))
            return
        assert (self.scan_data_type_combobox.get_active() >= 0)
        data_type = self.scan_data_type_combobox.get_active_text()
        cmd = self.value_input.get_text()

        try:
            cmd = misc.check_scan_command(data_type, cmd, self.is_first_scan)
        except Exception as e:
            # this is not quite good
            self.show_error(e.args[0])
            return

        # disable the window before perform scanning, such that if result come so fast, we won't mess it up
        self.scanoption_frame.set_sensitive(False)

        # disable set of widgets interfering with the scan
        for wid in self.disablelist:
            wid.set_sensitive(False)

        self.is_scanning = True
        # set scan options only when first scan, since this will reset backend
        if self.is_first_scan:
            self.apply_scan_settings()
            self.is_first_scan = False
        self.backend.reset_scan_progress()
        self.progress_watcher_id = GLib.timeout_add(
            PROGRESS_INTERVAL,
            self.progress_watcher,
            priority=GLib.PRIORITY_DEFAULT_IDLE)
        threading.Thread(target=self.scan_thread_func, args=(cmd, )).start()
Beispiel #3
0
    def do_scan(self):
        if self.pid == 0:
            self.show_error(_('Please select a process'))
            return
        active = self.scan_data_type_combobox.get_active()
        assert (active >= 0)
        data_type = self.scan_data_type_combobox.get_model()[active][0]
        cmd = self.value_input.get_text()

        try:
            cmd = misc.check_scan_command(data_type, cmd, self.is_first_scan)
        except Exception as e:
            # this is not quite good
            self.show_error(e.args[0])
            return

        # disable the window before perform scanning, such that if result come so fast, we won't mess it up
        self.search_count += 1
        self.scanoption_frame.set_sensitive(
            False)  # no need to check search_count here
        self.main_window.set_sensitive(False)
        self.memoryeditor_window.set_sensitive(False)
        self.is_scanning = True
        # set scan options only when first scan, since this will reset backend
        if self.search_count == 1:
            self.apply_scan_settings()
        self.backend.reset_scan_progress()
        self.progress_watcher_id = GObject.timeout_add(
            PROGRESS_INTERVAL,
            self.progress_watcher,
            priority=GObject.PRIORITY_DEFAULT_IDLE)
        threading.Thread(target=self.scan_thread_func, args=(cmd, )).start()
Beispiel #4
0
    def do_scan(self):
        if self.pid == 0:
            self.show_error(_('Please select a process'))
            return
        active = self.scan_data_type_combobox.get_active()
        assert(active >= 0)
        data_type = self.scan_data_type_combobox.get_model()[active][0]
        cmd = self.value_input.get_text()
   
        try:
            cmd = misc.check_scan_command(data_type, cmd, self.is_first_scan)
        except Exception as e:
            # this is not quite good
            self.show_error(e.args[0])
            return

        # disable the window before perform scanning, such that if result come so fast, we won't mess it up
        self.search_count +=1 
        self.scanoption_frame.set_sensitive(False) # no need to check search_count here

        # disable set of widgets interfering with the scan
        for wid in self.disablelist:
            wid.set_sensitive(False)

        self.is_scanning = True
        # set scan options only when first scan, since this will reset backend
        if self.search_count == 1:
            self.apply_scan_settings()
        self.backend.reset_scan_progress()
        self.progress_watcher_id = GObject.timeout_add(PROGRESS_INTERVAL,
            self.progress_watcher, priority=GObject.PRIORITY_DEFAULT_IDLE)
        threading.Thread(target=self.scan_thread_func, args=(cmd,)).start()
Beispiel #5
0
  def do_scan(self):
      if self.pid == 0:
          self.show_error('Please select a process')
          return
      active = self.scan_data_type_combobox.get_active()
      assert(active >= 0)
      data_type = self.scan_data_type_combobox.get_model()[active][0]
      cmd = self.value_input.get_text()
 
      try:
          cmd = misc.check_scan_command(data_type, cmd)
      except Exception,e:
          # this is not quite good
          self.show_error(e.args[0])
          return
    def do_scan(self):
        if self.pid == 0:
            self.show_error('Please select a process')
            return
        active = self.scan_data_type_combobox.get_active()
        assert (active >= 0)
        data_type = self.scan_data_type_combobox.get_model()[active][0]
        cmd = self.value_input.get_text()

        try:
            cmd = misc.check_scan_command(data_type, cmd)
        except Exception, e:
            # this is not quite good
            self.show_error(e.args[0])
            return