2018-11-12 14:13:05 +01:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import unittest
|
|
|
|
import json
|
2018-11-12 15:21:47 +01:00
|
|
|
from datetime import datetime
|
2018-11-12 14:13:05 +01:00
|
|
|
|
|
|
|
from pyintel471 import PyIntel471
|
|
|
|
from .keys import email, authkey
|
|
|
|
|
|
|
|
|
|
|
|
class TestBasic(unittest.TestCase):
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
self.intel = PyIntel471(email, authkey)
|
|
|
|
|
|
|
|
def test_search(self):
|
2018-11-12 15:21:47 +01:00
|
|
|
f = self.intel.search_filters(malwareFamily='lokibot')
|
|
|
|
p = self.intel.url_parameters(createdFrom=datetime(2018, 11, 11), createdUntil=datetime(2018, 11, 12))
|
|
|
|
r = self.intel.search(filters=f, parameters=p)
|
2018-11-12 14:13:05 +01:00
|
|
|
print(json.dumps(r.json(), indent=2))
|