Ubuntu Pastebin

Paste from Tj at Thu, 16 Nov 2017 18:15:46 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
sudo dpkg-divert --divert /usr/bin/dig.real --rename /usr/bin/dig
Adding 'local diversion of /usr/bin/dig to /usr/bin/dig.real'

cat <<EOF | sudo tee /usr/bin/dig
#!/bin/sh
args=""
for arg in $@; do
  if [ "$arg" = "caa" ]; then
    arg="type257"
  fi
  args="$args $arg"
done

/usr/bin/dig.real $args
EOF

chmod +x /usr/bin/dig
Download as text