Commit e34b2ded authored by g0t mi1k's avatar g0t mi1k

Add helper-script (Closes: 5521)

parent 8749b4c4
#!/bin/bash
## Generate: awk -F ': ' '/^Description: / {print $2}' debian/control
description="Collection of webshells"
package="webshells"
location="/usr/share/webshells"
## Define command line arguments
banner="true"
output="true"
## Read command line arguments
while [[ $# -gt 0 ]]; do
opt="$1";
shift;
case "$opt" in
"-h")
banner="true" ;;
"-v")
output="true" ;;
"-q")
banner="false";
output="false";;
"-s")
banner="false";
output="false";;
esac
done
## Move to location
cd "${location}"
## Feedback (-h)
[ "${banner}" == "true" ] \
&& echo "> ${package} ~ ${description}"
## List output (-v)
if [ "${output}" == "true" ]; then
if [ "$( which tree )" ]; then
tree -d -L 1 --prune --noreport "${location}"
else
echo "${location}"
#ls --color
find "${location}" -maxdepth 1 -mindepth 1 -type d \
| sort \
| sed -e 's/[^-][^\/]*\//-/g; s/^/ /; s/-/|/'
fi
fi
## Drop to shell (so to "move" with "cd")
[ "${OLDPWD}" != "${location}" ] \
&& eval "${SHELL}"
debian/helper-scripts/webshells usr/bin/
asp usr/share/webshells/
aspx usr/share/webshells/
cfm usr/share/webshells/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment