#!/bin/sh
O=/opt/coldfusion8/wwwroot/userfiles/file/cfpw4_out.txt
echo "=== security.properties FULL ===" > $O
cat /opt/coldfusion8/runtime/lib/security.properties >> $O 2>&1
echo "=== search all cf files for admin password ===" >> $O
grep -rilE 'cfadminpassword|adminpassword|admin.*password|password.*admin' /opt/coldfusion8/wwwroot/WEB-INF /opt/coldfusion8/runtime/lib /opt/coldfusion8/registry 2>/dev/null | head -20 >> $O
echo "=== files mentioning password in WEB-INF (non-flex) ===" >> $O
grep -rliE 'password' /opt/coldfusion8/wwwroot/WEB-INF --include='*.cfm' --include='*.xml' --include='*.properties' 2>/dev/null | grep -ivE 'cfform|flex' | head -20 >> $O
echo "=== look for salt/hash hex strings ===" >> $O
find /opt/coldfusion8/wwwroot/WEB-INF -maxdepth 3 -name '*.xml' -o -maxdepth 3 -name '*.properties' 2>/dev/null | grep -ivE 'cfform|flex|cftags' | head -20 >> $O
cat $O >> $O
