aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-08-02 10:53:32 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-08-02 10:53:32 +1200
commitc73f92c337558e8579f9905f6e90b661baa67699 (patch)
tree35eb1c0f84c3fde867d9f2ba36aa9cfbc5dcca5f /bin
parentMerge branch 'release/v7.4.0' into develop (diff)
downloaddotfiles-c73f92c337558e8579f9905f6e90b661baa67699.tar.gz
dotfiles-c73f92c337558e8579f9905f6e90b661baa67699.zip
Add defang(1df)
><tejr> I learned the word "defang" today as applied to URLs ><tejr> I knew about the practice but not what it was called ><tejr> Now I am writing a little script to do it for me ><russm> tejr: pip install defang ? ><tejr> Why you gotta be like that, russm ><tejr> Let me have my three-line sed script
Diffstat (limited to 'bin')
-rw-r--r--bin/defang.sed4
1 files changed, 4 insertions, 0 deletions
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