File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ stats(){
8787mss (){
8888 for i in ${@: 2} ; do
8989 mass=$( curl -s -L " http://z0r.it/yourls-api.php?signature=$apikey &action=shorturl&title=uploaded_with_z0r_script&format=simply&url=$( echo $i | sed ' s/?/%3F/' ) " | awk -F ' /' ' {print$NF}' )
90- if wget --spider " $i " 2> /dev/null; then
90+ if wget --spider " $i " 2> /dev/null || curl -s --head $1 | head -n 1 | grep -q " 405 " ; then
9191 if [ -n " $mass " ] ; then
9292 if curl $mode -L " http://z0r.it/yourls-api.php?signature=$apikey &action=shorturl&title=uploaded_with_z0r_script&format=simply&url=$( echo $i | sed ' s/?/%3F/' ) " | grep -q " Errore 406" ; then
9393 echo -e $RED " Error 406 - URL not valid(try to use https instead of http)" $FINE
@@ -106,14 +106,14 @@ mss(){
106106# control over argument
107107is_url (){
108108 if [[ $1 =~ $regex ]]; then
109- if wget --spider " $1 " 2> /dev/null; then
109+ if wget --spider " $1 " 2> /dev/null || curl $mode --head $1 | head -n 1 | grep -q " 405 " ; then
110110 shr $1 $2
111111 else
112112 echo -e $RED " Page does not exist" $FINE
113113 fi
114114 else
115115 if [[ $url =~ $regex ]]; then
116- if wget --spider " $1 " 2> /dev/null; then
116+ if wget --spider " $1 " 2> /dev/null || curl $mode --head $1 | head -n 1 | grep -q " 405 " | grep -q " 405 " ; then
117117 shr $1 $2
118118 else
119119 echo -e $RED " Page does not exist" $FINE
You can’t perform that action at this time.
0 commit comments