Yourls: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Created page with "==References== {|class='wikitable mw-collapsible' style='width:100%;margin:3px 0' !scope='col' style='text-align:left' colspan='3'| References |- |valign='top' style='width:33%'| * [https://yourls.org/docs/guide/advanced/passwordless-api Yourls » API » Passwordless] * Yourls » Helm * [https://yourls.org/docs/guide/advanced/api Yourls » API] |valign='top' style='width:34%'| |valign='top' style='width:33%'| |}"
 
No edit summary
Line 1: Line 1:
==Yourls » Bash==
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
!scope='col' style='text-align:left'|
Helm » Debug
|-
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | md5sum | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
</syntaxhighlight>
|-
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | shasum -a 256 | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&hash=sha256&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
</syntaxhighlight>
|-
|valign='top'|
<syntaxhighlight style='margin:3px 0' lang='bash'>
echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | shasum -a 512 | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&hash=sha512&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
</syntaxhighlight>
|}
==References==
==References==
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'
{|class='wikitable mw-collapsible' style='width:100%;margin:3px 0'

Revision as of 02:47, 27 December 2025

Yourls » Bash

Helm » Debug

echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | md5sum | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | shasum -a 256 | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&hash=sha256&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
echo; \
cat <<'EXE' | bash
TOKEN='1002a612b4'
TIMESTAMP="$(date +%s)"
TARGET_URL='https://google.com'
YOURLS_URL='https://go.shahed.biz.ops/yourls-api.php'
SIGNATURE="$(printf '%s%s' "${TIMESTAMP}" "${TOKEN}" | shasum -a 512 | awk '{print $1}')"
curl -sSL "${YOURLS_URL}?signature=${SIGNATURE}&timestamp=${TIMESTAMP}&hash=sha512&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE

References

References