mirror of
https://github.com/xdtianyu/scripts.git
synced 2025-11-02 15:56:11 +08:00
Create ngnix_autoindex_2_download_link.sh
This commit is contained in:
12
ngnix_autoindex_2_download_link.sh
Normal file
12
ngnix_autoindex_2_download_link.sh
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Convert nginx autoindex url to download link.
|
||||||
|
if [ -z "$1" ];then
|
||||||
|
echo "Error param."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
URL=$1
|
||||||
|
|
||||||
|
for uri in $(curl -k -s $URL |grep '<a href' |grep -o "\".*\"");do
|
||||||
|
echo "$URL${uri//\"}"
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user