Skip to content

Instantly share code, notes, and snippets.

@sae13
Last active May 12, 2021 05:48
Show Gist options
  • Save sae13/cac150e7a8c9f4a11fe17d138365fad2 to your computer and use it in GitHub Desktop.
Save sae13/cac150e7a8c9f4a11fe17d138365fad2 to your computer and use it in GitHub Desktop.
function kutt
set API "5deD1GnnzAvAcp5updIjNvbnolj7jkEiI6~yi"
set mainDomain "https://69b.ir/"
set URL $mainDomain"api/v2/links"
set date (date "+%N")
set custom (string sub -l 6 $date)
if test $argv[2]
set custom $argv[2]
end
set newUrl $mainDomain$custom
set data '{"target":"'$argv[1]'","customurl":"'$custom'","domain":"'$mainDomain'"}'
curl -s -H "Content-Type: application/json" -H "X-API-key:"$API --data $data $URL|jq '.link'
end
@sae13
Copy link
Author

sae13 commented May 12, 2021

فیلتر شده دومین اصلی

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment