Last active
May 12, 2021 05:48
-
-
Save sae13/cac150e7a8c9f4a11fe17d138365fad2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
فیلتر شده دومین اصلی