diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-08-02 10:54:03 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-08-02 10:54:03 +1200 |
commit | 587a9987c2e6658b10fae5e9d3665f6d34e90b0e (patch) | |
tree | 78ac64be3fcc32292e1c70f7bde23f0fed5a8469 | |
parent | Merge branch 'release/v7.4.0' (diff) | |
parent | Update dotfiles(7) manual page (diff) | |
download | dotfiles-587a9987c2e6658b10fae5e9d3665f6d34e90b0e.tar.gz dotfiles-587a9987c2e6658b10fae5e9d3665f6d34e90b0e.zip |
Merge branch 'release/v7.5.0'v7.5.0
* release/v7.5.0:
Update dotfiles(7) manual page
Add defang(1df)
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | bin/defang.sed | 4 | ||||
-rw-r--r-- | man/man1/defang.1df | 17 | ||||
-rw-r--r-- | man/man7/dotfiles.7df | 3 |
7 files changed, 29 insertions, 2 deletions
@@ -21,6 +21,7 @@ /bin/d2u /bin/dam /bin/ddup +/bin/defang /bin/dfv /bin/dfv.m4 /bin/dfv.sh @@ -114,6 +114,7 @@ BINS = bin/ap \ bin/dam \ bin/d2u \ bin/ddup \ + bin/defang \ bin/dfv \ bin/dmp \ bin/dub \ @@ -505,6 +505,7 @@ Installed by the `install-bin` target: input. * `dam(1df)` buffers all its input before emitting it as output. * `ddup(1df)` removes duplicate lines from unsorted input. +* `defang(1df)` prevents dangerous URLs from being made into clickable links. * `dmp(1df)` copies a pass(1) entry selected by `dmenu(1)` to the X CLIPBOARD. * `dub(1df)` lists the biggest entries in a directory. * `edda(1df)` provides a means to run `ed(1)` over a set of files preserving @@ -1,2 +1,2 @@ -tejr dotfiles v7.4.0 -Wed, 31 Jul 2019 22:27:33 +0000 +tejr dotfiles v7.5.0 +Thu, 01 Aug 2019 22:54:02 +0000 diff --git a/bin/defang.sed b/bin/defang.sed new file mode 100644 index 00000000..0a9a314e --- /dev/null +++ b/bin/defang.sed @@ -0,0 +1,4 @@ +# Escape a dangerous URL to discourage it from being made into a link +s|^http|hxxp| +s|://|[&]| +s|\.|[&]|g diff --git a/man/man1/defang.1df b/man/man1/defang.1df new file mode 100644 index 00000000..1d99cd14 --- /dev/null +++ b/man/man1/defang.1df @@ -0,0 +1,17 @@ +.TH DEFANG 1df "August 2019" "Manual page for defang" +.SH NAME +.B defang +\- butcher dangerous URLs to stop them being made clickable +.SH USAGE +.B defang [FILE1 [FILE2 ...]] +.br +.B defang +< FILE +.br +printf 'http://pwn3d.badguys.icu/h4ck/0x_ph1sh.html' | +.B defang +.SH DESCRIPTION +Manipulates URLs on each line of input in such a way that they're unlikely to +be made into clickable links by tools that try to make dynamic HTML links. +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man7/dotfiles.7df b/man/man7/dotfiles.7df index 5eb551e7..abd75951 100644 --- a/man/man7/dotfiles.7df +++ b/man/man7/dotfiles.7df @@ -775,6 +775,9 @@ read from the input. .IP \[bu] 2 \f[C]ddup(1df)\f[] removes duplicate lines from unsorted input. .IP \[bu] 2 +\f[C]defang(1df)\f[] prevents dangerous URLs from being made into +clickable links. +.IP \[bu] 2 \f[C]dmp(1df)\f[] copies a pass(1) entry selected by \f[C]dmenu(1)\f[] to the X CLIPBOARD. .IP \[bu] 2 |