| 1 |
#!/usr/bin/env sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
echo "creddump7 - Python tool to extract credentials and secrets from Windows registry hives" |
| 6 |
cd /usr/share/creddump7 |
| 7 |
tree -L 1 --noreport /usr/share/creddump7 |
| 8 |
|
| 9 |
## Check to see if last location is where we want to end up |
| 10 |
## If its not, spawn a new shell (sub shell), so to "move" with "cd" |
| 11 |
## This isn't ideal, but best option for the time being (rather keep everything in parent shell) |
| 12 |
if [ "${OLDPWD}" != "${location}" ]; then |
| 13 |
## From kali-menu: exec-in-shell |
| 14 |
USER=${USER:-$(whoami)} |
| 15 |
SHELL=${SHELL:-$(getent passwd $USER|cut -d: -f7)} |
| 16 |
${SHELL:-bash} -i |
| 17 |
fi |