代码拉取完成,页面将自动刷新
#!/bin/bash
if [ -z "$1" ]; then
echo "[*] Scanning multiple targets using IIS Short Name (8.3) Scanner by Soroush Dalili - @irsdl"
echo "[*] Usage: $0 <scope file> <is_default_https (1=https)>"
echo "[*] Example: $0 scope.txt 1"
exit 0
fi
default_scheme="http"
if [ "$2" = "1" ]; then
default_scheme="https"
fi
# current directory
CUR=`pwd`
# Load scope
if [ ! -f "$1" ]; then
echo "File not found: $1"
exit 1
fi
scope=`cat "$1"`
### IIS Shortname Scanner time!
resultDir="$CUR"/iis_shortname_results
mkdir "$resultDir"
uniquehostname=()
while read target; do
if [[ "$target" =~ [\'\"]+ ]]; then
echo "Error: an invalid character was found in $1"
exit 1
fi
if [[ "$target" =~ ^[[:space:]]*$ ]]; then
# the input is whitespace!
myhostname=""
else
myhostname=`python -c "from urlparse import urlparse;url = urlparse('$target','$default_scheme');print url.scheme+'://'+url.netloc+url.path"`
if [ -z "$myhostname" ]; then
# when target is not a url (ip address for example), python variable will be empty
myhostname="$target"
fi
uniquehostname+=("$myhostname")
fi
done <<<"$scope"
# unique hosts only
uniquehostname=($(printf "%s\n" "${uniquehostname[@]}" | sort -u));
for myhostname in "${uniquehostname[@]}"; do
targetFile=$(echo "$myhostname" | tr '[\/\\\:\000-\017\177\377]' '_')
java -jar iis_shortname_scanner.jar 0 20 "$myhostname" > "$resultDir/iis_shortname_${targetFile}.txt"
done
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。