Example #1
0
import teFileHandler
import tePcapFileParser
import teTextFileParser


testdata = "testdata\\harness_test"

#sort what the user gave us
sortedFiles = teFileHandler.getFilesSorted(testdata)

stats = teFileHandler.getStats(sortedFiles)
for entry in stats:
  print entry

#aggregate and dedupe

#remove black list items

# build modules for intel gathering 

# thread them / throttle them



#what are my filters:
#ip
#domain name
#resolved ip # network connection required
#md5
#sha1
def test_getStats_dir_parent_recur():
  status,files = teFileHandler.getFilesFromDirectory(dir_parent, True)
  sortedFiles = teFileHandler.sortFilesByType(files)
  assert teFileHandler.getStats(sortedFiles) == [{'domains': 1, 'ips': 8, 'filename': ['test_data\\mixed_files\\pcap1.pcap']}, {'domains': 2, 'ips': 23, 'filename': ['test_data\\mixed_files\\pcap2.pcap']}, {'domains': 1, 'ips': 8, 'filename': ['test_data\\pcap_files\\pcap1.pcap']}, {'domains': 2, 'ips': 23, 'filename': ['test_data\\pcap_files\\pcap2.pcap']}, {'domains': 1, 'ips': 3, 'md5hashes': 3, 'sha1hashes': 3, 'filename': 'test_data\\csv_files\\csv1.csv'}, {'domains': 0, 'ips': 6, 'md5hashes': 0, 'sha1hashes': 0, 'filename': 'test_data\\log_files\\log1.log'}, {'domains': 1, 'ips': 3, 'md5hashes': 3, 'sha1hashes': 3, 'filename': 'test_data\\mixed_files\\csv1.csv'}, {'domains': 0, 'ips': 6, 'md5hashes': 0, 'sha1hashes': 0, 'filename': 'test_data\\mixed_files\\log1.log'}, {'domains': 2, 'ips': 6, 'md5hashes': 6, 'sha1hashes': 5, 'filename': 'test_data\\mixed_files\\txt1.txt'}, {'domains': 2, 'ips': 6, 'md5hashes': 6, 'sha1hashes': 5, 'filename': 'test_data\\txt_files\\txt1.txt'}]
Example #3
0
import teFileHandler
import tePcapFileParser
import teTextFileParser

testdata = "testdata\\harness_test"

#sort what the user gave us
sortedFiles = teFileHandler.getFilesSorted(testdata)

stats = teFileHandler.getStats(sortedFiles)
for entry in stats:
    print entry

#aggregate and dedupe

# build modules for intel gathering

# thread them / throttle them

#what are my filters:
#ip
#domain name
#resolved ip # network connection required
#md5
#sha1