Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. def f3(a,b,c,d):
  2.     if(a.split('.')[1]!='pcap'):
  3.         print('Le format est incorrect')
  4.         return
  5.     e=rdpcap(a)
  6.     for p in e:
  7.         if(str(b) in p):
  8.             if(str(c) in p[str(b)].fields.keys()):
  9.                 p[str(b)].fields[str(c)]=d
  10.                 p.show2()
  11.     f=a.split('.')[0]
  12.     wrpcap(f+'_modified.pcap',p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement