Exemplo n.º 1
0
 def setUp(self):
     self.test_state = state.DFTimewolfState(config.Config)
     self.grr_file_collector = grr_hosts.GRRFileCollector(self.test_state)
     self.grr_file_collector.setup(hosts='tomchop,tomchop2',
                                   files='/etc/passwd',
                                   use_tsk=True,
                                   reason='random reason',
                                   grr_server_url='http://fake/endpoint',
                                   grr_username='******',
                                   grr_password='******',
                                   approvers='approver1,approver2')
Exemplo n.º 2
0
 def setUp(self, mock_InitHttp):
     self.mock_grr_api = mock.Mock()
     mock_InitHttp.return_value = self.mock_grr_api
     self.test_state = state.DFTimewolfState(config.Config)
     self.grr_file_collector = grr_hosts.GRRFileCollector(self.test_state)
     self.grr_file_collector.SetUp(hosts='tomchop',
                                   files='/etc/passwd',
                                   use_tsk=True,
                                   reason='random reason',
                                   grr_server_url='http://fake/endpoint',
                                   grr_username='******',
                                   grr_password='******',
                                   approvers='approver1,approver2',
                                   action='stat')
Exemplo n.º 3
0
 def testInitialization(self):
     """Tests that the collector can be initialized."""
     test_state = state.DFTimewolfState()
     grr_file_collector = grr_hosts.GRRFileCollector(test_state)
     self.assertIsNotNone(grr_file_collector)