From 96e7dd9f231ff7ae232cd73ca00a450b384078e4 Mon Sep 17 00:00:00 2001 From: th33xitus Date: Wed, 27 Apr 2022 11:33:29 +0200 Subject: [PATCH] refactor: generate a randomized paste-name Signed-off-by: Dominik Willner th33xitus@gmail.com --- scripts/upload_log.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/upload_log.sh b/scripts/upload_log.sh index 5f66531..73ab117 100755 --- a/scripts/upload_log.sh +++ b/scripts/upload_log.sh @@ -75,7 +75,7 @@ function upload_selection(){ top_border echo -e "| ${yellow}~~~~~~~~~~~~~~~ [ Log Upload ] ~~~~~~~~~~~~~~${white} |" hr - echo -e "| You can choose the following files for uploading: |" + echo -e "| You can choose the following logfiles for uploading: |" blank_line for log in "${logfiles[@]}"; do log=${log//${HOME}/"~"} @@ -86,7 +86,7 @@ function upload_selection(){ blank_line back_footer while true; do - read -p "${cyan}Please select:${white} " option + read -p "${cyan}###### Please select:${white} " option if [ -n "${option}" ] && ((option < ${#logfiles[@]})); then upload_log "${logfiles[${option}]}" upload_selection @@ -102,7 +102,7 @@ function upload_log(){ local link clear && print_header status_msg "Uploading ${1} ..." - link=$(curl -s --upload-file "${1}" 'http://paste.c-net.org/') + link=$(curl -s -H "x-random;" --upload-file "${1}" 'http://paste.c-net.org/') if [ -n "${link}" ]; then ok_msg "${1} upload successfull!" echo -e "\n${cyan}###### Here is your link:${white}"