Skip to content

Commit af896f2

Browse files
author
Nhoya
committed
Solved problem relatives to Google/Amazon URLs
1 parent 48348ea commit af896f2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

z0r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ stats(){
8787
mss(){
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
107107
is_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

0 commit comments

Comments
 (0)