From 2d759ed8f729d05415a50d5d1f333fe1c3f5930c Mon Sep 17 00:00:00 2001 From: lickthecheese Date: Thu, 19 Mar 2020 16:16:11 -0400 Subject: [PATCH] allow the user to not specify a new url while crawling --- crawly | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crawly b/crawly index 9cadcef..7044298 100755 --- a/crawly +++ b/crawly @@ -4,9 +4,6 @@ cleanxss(){ sed 's/&/\&/g; s//\>/g; s/"/\"/g; s/'"'"'/\'/g' | tr "\n" " " | sed -e '$a\'; } - -SITE=$1 - TEMPIDC=/tmp/$RANDOM function visit(){ @@ -35,10 +32,16 @@ echo "link $1 is invalid" fi } +if [ ! -z $1 ];then + +SITE=$1 + visit $SITE urls.txt +fi + URLLIST=`cat urls.txt` rm urls.txt