Add missing files, update style
This commit is contained in:
@@ -1,47 +1,51 @@
|
||||
{{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}}
|
||||
<h1>Split pcap</h1>
|
||||
<p class="lead">
|
||||
Upload a pcap file and split it into several files by packet count or by file size.
|
||||
The parts are downloaded together as a zip.
|
||||
Packets are copied unchanged, and each part keeps the original file header.
|
||||
</p>
|
||||
|
||||
{{if .Error}}<div class="error" role="alert">{{.Error}}</div>{{end}}
|
||||
|
||||
<form method="post" action="/split" enctype="multipart/form-data">
|
||||
<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>
|
||||
<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>
|
||||
|
||||
<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
|
||||
<span class="hint">1 MB = 1,000,000 bytes. A packet bigger than this gets a file to itself.</span>
|
||||
</label>
|
||||
</fieldset>
|
||||
<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>
|
||||
|
||||
<p class="note">
|
||||
At most {{.MaxParts}} output files. If the capture ends with a truncated packet, that packet is dropped.
|
||||
</p>
|
||||
<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>
|
||||
|
||||
<div class="actions">
|
||||
<button type="submit" class="primary">Split and download zip</button>
|
||||
<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}}
|
||||
|
||||
Reference in New Issue
Block a user