import sys
import getopt
import os
import multiprocessing
def list_all_file(path):
"""
list all files of a directory
:param path:
:return:
"""
file_list = []
for (path, _, files) in os.walk(path):
for filename in files:
file_list.append(os.path.join(path, filename))
return file_list
def process_file(filename, is_black):
suffix = os.path.splitext(filename)[-1][1:]
if suffix != "pcap":
return
if is_black:
cmd = "python extract_tls_flow4.py -vr {} -o black/{}.txt >logs/black/{}.log".format(filename, os.path.basename(filename), os.path.basename(filename))
else:
cmd = "python extract_tls_flow4.py -vr {} -o white/{}.txt >logs/white/{}.log".format(filename, os.path.basename(file