Skip to content

Instantly share code, notes, and snippets.

@anoduck
Last active July 26, 2024 01:58
Show Gist options
  • Save anoduck/56b550bb5a22f73df046aafa5886e292 to your computer and use it in GitHub Desktop.
Save anoduck/56b550bb5a22f73df046aafa5886e292 to your computer and use it in GitHub Desktop.
transformed commands from ivre documentation into a shell script to run.
#!/usr/bin/env bash
if [ "$EUID" -ne 0 ]
then echo "You must run this with root permissions."
exit
fi
cd /var/www/html || exit
rm index.html
ln -s /usr/share/ivre/web/static/* .
cd /var/lib/dokuwiki/data/pages || exit
ln -s /usr/share/ivre/dokuwiki/doc .
cd /var/lib/dokuwiki/data/media || exit
ln -s /usr/share/ivre/dokuwiki/media/logo.png .
ln -s /usr/share/ivre/dokuwiki/media/doc .
cd /usr/share/dokuwiki || exit
patch -p0 < /usr/share/ivre/patches/dokuwiki/backlinks-20200729.patch
cd /etc/apache2/mods-enabled || .
for m in rewrite.load wsgi.conf wsgi.load ; do
[ -L $m ] || ln -s ../mods-available/$m ;
done
cd ../
cat << EOF >> conf-enabled/ivre.conf
Alias /cgi "/usr/share/ivre/web/wsgi/app.wsgi"
<Location /cgi>\n wsgi-script
Options +ExecCGI
Require all granted
</Location>
EOF
sed -i 's/^\(\s*\)#Rewrite/\1Rewrite/' /etc/dokuwiki/apache.conf
echo 'WEB_GET_NOTEPAD_PAGES = "localdokuwiki"' >> /etc/ivre.conf
service apache2 start ## or start
@anoduck
Copy link
Author

anoduck commented Jul 26, 2024

Although a good idea in theory, it's application in Kali Linux was less than fruitful. Here why:

  1. Regardless of the above instructions coming directly from IVRE's website specifically noted for Kali Linux, they are either out of date or were incorrect on inception.
  2. Dokuwiki is not required to run IVRE, and will not be installed as a dependency.
  3. If it is installed, both the patch and additional dokuwiki specific files for ivre are not located in /usr/local/share/ivre/dokuwiki, but in /usr/share/ivre/dokuwiki.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment