Beispiel #1
0
    def testProcess(self):
        """Test the Process function on a WebView SQLite file."""
        plugin = android_webview.WebViewPlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(['webview.db'],
                                                           plugin)

        self.assertEqual(storage_writer.number_of_warnings, 0)
        self.assertEqual(storage_writer.number_of_events, 8)

        events = list(storage_writer.GetEvents())

        event = events[0]

        self.CheckTimestamp(event.timestamp, '2014-03-05 15:04:44.000000')

        event_data = self._GetEventDataOfEvent(storage_writer, event)
        self.assertEqual(event_data.host, 'skype.com')
        self.assertEqual(event_data.cookie_name, 'SC')
        expected_data = (
            'CC=:CCY=:LC=en-us:LIM=:TM=1362495731:TS=1362495680:TZ=:VAT=:VER=')
        self.assertEqual(event_data.data, expected_data)

        expected_message = ('Path: / ' 'Secure: False')
        self._TestGetMessageStrings(event_data, expected_message,
                                    expected_message)
Beispiel #2
0
    def testProcess(self):
        """Test the Process function on a WebView SQLite file."""
        plugin = android_webview.WebViewPlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(['webview.db'],
                                                           plugin)

        self.assertEqual(storage_writer.number_of_warnings, 0)
        self.assertEqual(storage_writer.number_of_events, 8)

        events = list(storage_writer.GetEvents())

        expected_event_values = {
            'cookie_name':
            'SC',
            'data':
            ('CC=:CCY=:LC=en-us:LIM=:TM=1362495731:TS=1362495680:TZ=:VAT=:VER='
             ),
            'data_type':
            'webview:cookie',
            'host':
            'skype.com',
            'path':
            '/',
            'secure':
            False,
            'timestamp':
            '2014-03-05 15:04:44.000000'
        }

        self.CheckEventValues(storage_writer, events[0], expected_event_values)
Beispiel #3
0
  def testProcess(self):
    """Test the Process function on a WebView SQLite file."""
    plugin_object = android_webview.WebViewPlugin()
    storage_writer = self._ParseDatabaseFileWithPlugin(
        [u'webview.db'], plugin_object)

    test_event = storage_writer.events[0]
    self.assertEqual(test_event.host, u'.skype.com')
    expected_timestamp = timelib.Timestamp.CopyFromString(
        u'2014-03-05 15:04:44')
    self.assertEqual(test_event.timestamp, expected_timestamp)
    self.assertEqual(test_event.cookie_name, u'SC')
    expected_data = (
        u'CC=:CCY=:LC=en-us:LIM=:TM=1362495731:TS=1362495680:TZ=:VAT=:VER=')
    self.assertEqual(test_event.data, expected_data)

    self.assertEqual(len(storage_writer.events), 3)
Beispiel #4
0
    def testProcess(self):
        """Test the Process function on a WebView SQLite file."""
        plugin = android_webview.WebViewPlugin()
        storage_writer = self._ParseDatabaseFileWithPlugin(['webview.db'],
                                                           plugin)

        self.assertEqual(storage_writer.number_of_events, 8)

        events = list(storage_writer.GetEvents())

        event = events[0]

        self.assertEqual(event.host, 'skype.com')
        expected_timestamp = timelib.Timestamp.CopyFromString(
            '2014-03-05 15:04:44')
        self.assertEqual(event.timestamp, expected_timestamp)
        self.assertEqual(event.cookie_name, 'SC')
        expected_data = (
            'CC=:CCY=:LC=en-us:LIM=:TM=1362495731:TS=1362495680:TZ=:VAT=:VER=')
        self.assertEqual(event.data, expected_data)
Beispiel #5
0
    def testProcess(self):
        """Test the Process function on a WebView SQLite file."""
        test_file = self._GetTestFilePath([u'webview.db'])
        plugin = android_webview.WebViewPlugin()
        event_queue_consumer = self._ParseDatabaseFileWithPlugin(
            plugin, test_file)
        event_objects = self._GetEventObjectsFromQueue(event_queue_consumer)

        test_event = event_objects[0]
        self.assertEqual(test_event.host, u'.skype.com')
        expected_timestamp = timelib.Timestamp.CopyFromString(
            u'2014-03-05 15:04:44')
        self.assertEqual(test_event.timestamp, expected_timestamp)
        self.assertEqual(test_event.cookie_name, u'SC')
        expected_data = (
            u'CC=:CCY=:LC=en-us:LIM=:TM=1362495731:TS=1362495680:TZ=:VAT=:VER='
        )
        self.assertEqual(test_event.data, expected_data)

        self.assertEqual(len(event_objects), 3)