Skip to content

Commit

Permalink
增加 MTU 欄位
Browse files Browse the repository at this point in the history
  • Loading branch information
hms5232 committed Jan 18, 2020
1 parent 95a2825 commit 5e59052
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ufw_log_to_csv.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def main():
csv_title = '"月","日","時間","主機名稱","kernel 時間","動作","IN","OUT","MAC", "來自(src)", "DST", "LEN","TOS","PREC","TTL","ID","協定(PROTO)","來源埠(SPT)","DPT","WINDOW","RES","Control Bits / flags","URGP"\n'

# You can change order of fieldnames here
fieldnames = ['月', '日', '時間', '主機名稱', 'kernel 時間', '動作', 'IN', 'OUT', 'MAC', 'SRC', 'DST', 'LEN', 'TOS', 'PREC', 'TTL', 'ID', 'DF', 'PROTO', 'SPT', 'DPT', 'WINDOW', 'RES', 'Control Bits / flags', 'URGP', 'TC', 'HOPLIMIT', 'FLOWLBL', 'TYPE', 'CODE', 'SEQ', '??'] # 欄位名稱
fieldnames = ['月', '日', '時間', '主機名稱', 'kernel 時間', '動作', 'IN', 'OUT', 'MAC', 'SRC', 'DST', 'LEN', 'TOS', 'PREC', 'TTL', 'ID', 'DF', 'PROTO', 'SPT', 'DPT', 'WINDOW', 'RES', 'Control Bits / flags', 'URGP', 'TC', 'HOPLIMIT', 'FLOWLBL', 'TYPE', 'CODE', 'SEQ', 'MTU', '??'] # 欄位名稱
writer = csv.DictWriter(o, fieldnames=fieldnames)
writer.writeheader() # 寫入標題

Expand Down

0 comments on commit 5e59052

Please sign in to comment.