52 lines
2.0 KiB
HTML
52 lines
2.0 KiB
HTML
{{define "title"}}Split pcap{{end}}
|
|
|
|
{{define "toolbar-info"}}<span class="toolbar-info">Split a pcap file by packet count or file size</span>{{end}}
|
|
|
|
{{define "content"}}
|
|
{{with .Data}}
|
|
{{if .Error}}<div class="error" role="alert">{{.Error}}</div>{{end}}
|
|
|
|
<form method="post" action="/split" enctype="multipart/form-data">
|
|
<section class="widget">
|
|
<div class="widget-title"><h2>Split</h2></div>
|
|
<div class="widget-content">
|
|
<p class="note">
|
|
The parts are downloaded together as a zip. Packets are copied unchanged, and each part keeps the original file header.
|
|
</p>
|
|
|
|
<label for="file">pcap file <span class="hint">classic pcap, up to {{.MaxUpload}}. Convert pcapng with <code>editcap -F pcap</code></span></label>
|
|
<input id="file" name="file" type="file" accept=".pcap,.cap,.dmp,application/vnd.tcpdump.pcap" required>
|
|
|
|
<fieldset class="modes">
|
|
<legend>Split by</legend>
|
|
<label class="check">
|
|
<input type="radio" name="mode" value="packets"{{if eq .Form.Mode "packets"}} checked{{end}}>
|
|
At most
|
|
<input name="packets" class="num" inputmode="numeric" value="{{.Form.Packets}}" aria-label="Packets per file">
|
|
packets per file
|
|
</label>
|
|
<label class="check">
|
|
<input type="radio" name="mode" value="size"{{if eq .Form.Mode "size"}} checked{{end}}>
|
|
At most
|
|
<input name="size" class="num" inputmode="decimal" value="{{.Form.Size}}" aria-label="Size per file">
|
|
<select name="unit" class="unit" aria-label="Size unit">
|
|
{{range .Units}}<option{{if eq . $.Data.Form.Unit}} selected{{end}}>{{.}}</option>{{end}}
|
|
</select>
|
|
per file
|
|
</label>
|
|
</fieldset>
|
|
|
|
<p class="note">
|
|
1 MB = 1,000,000 bytes. A packet bigger than the size limit gets a file to itself.
|
|
At most {{.MaxParts}} output files. If the capture ends with a truncated packet, that packet is dropped.
|
|
</p>
|
|
|
|
<div class="actions">
|
|
<button type="submit" class="btn primary">Split and download zip</button>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</form>
|
|
{{end}}
|
|
{{end}}
|