We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is useful especially to see DMARC reports, which usually come as zip/gzip'd xml files:
Content-Type: application/zip;↓ → name="google.com!gahr.ch!1576022400!1576108799.zip" Content-Disposition: attachment;↓ → filename="google.com!gahr.ch!1576022400!1576108799.zip" Content-Transfer-Encoding: base64
mailcap
application/zip; /home/gahr/bin/dump-compressed-xml.tcl %s | less -r; application/gzip; /home/gahr/bin/dump-compressed-xml.tcl %s | less -r; application/xml; /home/gahr/bin/dump-compressed-xml.tcl %s | less -r;
dump-compressed-xml.tcl
#!/usr/bin/env tclsh # Enter alternate screen puts "\x1b7\x1b\[?47h" set g(hi) {highlight -S xml -O xterm256 -s lucretia} set g(ex) { .gz {gunzip -c} .zip {unzip -p} .xml {cat} } if {$argc != 1} { puts "Usage: $argv0 filename" exit 1 } set filename [lindex $argv 0] set extension [file extension $filename] if {![dict exists $g(ex) $extension]} { puts "Unhandled extension: $extension" exit 1 } set fd [open "|[dict get $g(ex) $extension] $filename | $g(hi)"] puts [read $fd]
By: @gahr
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is useful especially to see DMARC reports, which usually come as zip/gzip'd xml files:
mailcap
dump-compressed-xml.tcl
By: @gahr
The text was updated successfully, but these errors were encountered: