import os
import sys

sys.path.append(os.path.dirname(os.path.realpath(__file__))+'/..')

from malware_data_science.network_attribute_analyzer import NetworkAttributeAnalyzer
from malware_data_science.db import DB

network_attr_analyzer = NetworkAttributeAnalyzer(1, '#086A87')
network_attr_analyzer.output = 'dot'
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_domain.dot')
network_attr_analyzer = NetworkAttributeAnalyzer(1, '#086A87')
network_attr_analyzer.output = 'html'
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_domain.html')

network_attr_analyzer = NetworkAttributeAnalyzer(10, '#4682B4')
network_attr_analyzer.output = 'dot'
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_mutex.dot')
network_attr_analyzer = NetworkAttributeAnalyzer(10, '#4682B4')
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_mutex.html')

network_attr_analyzer = NetworkAttributeAnalyzer(5, '#086A87')
network_attr_analyzer.output = 'dot'
network_attr_analyzer.shortest_path = True
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_files_written_on_disk.dot')
network_attr_analyzer = NetworkAttributeAnalyzer(5, '#086A87')
network_attr_analyzer.shortest_path = True
network_attr_analyzer.run_analysis()
network_attr_analyzer.save_graph('data/results/network_by_files_written_on_disk.html')
