PyIntel471/tests/test.py

21 lines
584 B
Python
Raw Permalink Normal View History

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import unittest
import json
2018-11-12 15:21:47 +01:00
from datetime import datetime
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)
print(json.dumps(r.json(), indent=2))