diff --git a/PcapNGFormatAnalys.py b/PcapNGFormatAnalys.py index 21ee58b..ccb3837 100644 --- a/PcapNGFormatAnalys.py +++ b/PcapNGFormatAnalys.py @@ -124,7 +124,7 @@ def ExtractPacketsCommentStr(input_file_path, appsketch_api, pcap_file_id): else: proto = 'other' stream_id = '' - session_dict['session'] = appsketch_api + 'session/' + pcap_file_id + '/' + proto + '/' + stream_id + session_dict['session'] = appsketch_api + '/session/' + pcap_file_id + '/' + proto + '/' + stream_id comment_str_list.append(session_dict) return comment_str_list @@ -151,12 +151,8 @@ if __name__=="__main__": input_file_path = TransferPcapNG(sys.argv[1]) output_file_path = sys.argv[2] - appsketch_api = 'https://sg.appsketch.gdnt-cloud.com/' - - # Get the file name (including extension) - file_name_with_extension = os.path.basename(input_file_path) - # Remove the extension - pcap_file_id = os.path.splitext(file_name_with_extension)[0] + appsketch_api = sys.argv[3] + pcap_file_id = sys.argv[4] comment_str_list = ExtractPacketsCommentStr(input_file_path, appsketch_api, pcap_file_id) # for i, pkt in enumerate(comment_str_list):