File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ import os
2+
3+ def line_prepender (filename , line ):
4+ with open (filename , 'r+' ) as f :
5+ content = f .read ()
6+ f .seek (0 , 0 )
7+ f .write (line .rstrip ('\r \n ' ) + '\n ' + content )
8+
9+ for fname in os .listdir ('icmp' ):
10+ with open (fname ) as f :
11+ for line in f :
12+ if 'MSS' in line :
13+ # line_prepender(fname, "MSS=1460")
14+ print 'found in file ' + fname
15+ f .close ()
Original file line number Diff line number Diff line change 66[ close-last-ack-lost] ( close-last-ack-lost.pkt ) | Passed
77[ close-read-data-fin] ( close-read-data-fin.pkt ) | Passed
88[ close-write-data-ack] ( close-write-data-ack.pkt ) | Passed
9- [ close-unread-data-ack ] ( close-unread-data-ack .pkt ) | Failed(Note 1)
9+ [ close-unread-data-rst ] ( close-unread-data-rst .pkt ) | Failed(Note 1)
1010[ simultaneous-close] ( simultaneous-close.pkt ) | Passed
1111
1212## Notes
You can’t perform that action at this time.
0 commit comments