替换 PcapNGFormatAnalys.py
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user