Add files via upload

This commit is contained in:
wibyweb 2023-05-08 00:34:47 -04:00 committed by GitHub
parent b8a8d9f473
commit 57addd1688
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

5
c/cr.c
View file

@ -1538,8 +1538,8 @@ int main(int argc, char **argv)
}
if(isinternal==1 && ((crawl_type != 0 && crawl_type[0] != '2') || crawl_type == 0)){//is internal link
urls++;
if(url_fromlist[0]=='/' && url_fromlist[1] != '.'){//can't handle '..' otherwise append to insert
urls++;
if(urls>1){
strcat(url_insert,", (");
}
@ -1573,6 +1573,7 @@ int main(int argc, char **argv)
}
strcat(url_insert,")");
}else if(url_fromlist[0] != '/' && url_fromlist[0] != '.'){
urls++;
if(urls>1){
strcat(url_insert,", (");
}
@ -1612,8 +1613,8 @@ int main(int argc, char **argv)
strcat(url_insert,")");
}
}else if(isinternal==0 && crawl_type != 0 && crawl_type[0] != '0'){//is external link
urls++;
if(url_fromlist[0] != '.'){
urls++;
if(urls>1){
strcat(url_insert,", (");
}

View file

@ -543,7 +543,7 @@ int canCrawl(int urlSize){
return 0;
prefixfound=1;
}
if(strURL[i]=='?' || strURL[i]=='\\' || strURL[i] == '"' || strURL[i] == '\''){
if(strURL[i]=='?' || strURL[i]=='\\' || strURL[i] == '"' || strURL[i] == '\'' || strURL[i] == ' '){
return 0;
}
if(strURL[i]=='.'){