Yourls: Difference between revisions
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%'| |}" |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
==Yourls » PHP== | |||
{|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='php'> | |||
echo; \ | |||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | |||
<?php | |||
$token='1002a612b4'; | |||
$timestamp = time(); | |||
$target_url='https://google.com'; | |||
$signature = md5( $timestamp . $token ); | |||
$yourls_url='https://go.shahed.biz.ops/yourls-api.php'; | |||
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&action=shorturl&format=json&url={$target_url}"; | |||
PHP | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='php'> | |||
echo; \ | |||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | |||
<?php | |||
$token='1002a612b4'; | |||
$timestamp = time(); | |||
$target_url='https://google.com'; | |||
$signature = hash( 'sha256' , $timestamp . $token ); | |||
$yourls_url='https://go.shahed.biz.ops/yourls-api.php'; | |||
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&hash=sha256&action=shorturl&format=json&url={$target_url}"; | |||
PHP | |||
</syntaxhighlight> | |||
|- | |||
|valign='top'| | |||
<syntaxhighlight style='margin:3px 0' lang='php'> | |||
echo; \ | |||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | |||
<?php | |||
$token='1002a612b4'; | |||
$timestamp = time(); | |||
$target_url='https://google.com'; | |||
$signature = hash( 'sha512' , $timestamp . $token ); | |||
$yourls_url='https://go.shahed.biz.ops/yourls-api.php'; | |||
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&hash=sha512&action=shorturl&format=json&url={$target_url}"; | |||
PHP | |||
</syntaxhighlight> | |||
|} | |||
==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}×tamp=${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}×tamp=${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}×tamp=${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' | ||
| Line 10: | Line 103: | ||
|valign='top' style='width:34%'| | |valign='top' style='width:34%'| | ||
* [[Convention for Database Tables|Convention » Database » Table]] | |||
* [[Convention for API|Convention » API]] | |||
|valign='top' style='width:33%'| | |valign='top' style='width:33%'| | ||
|} | |} | ||
Latest revision as of 04:02, 27 December 2025
Yourls » PHP
|
Helm » Debug |
|---|
echo; \
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl
<?php
$token='1002a612b4';
$timestamp = time();
$target_url='https://google.com';
$signature = md5( $timestamp . $token );
$yourls_url='https://go.shahed.biz.ops/yourls-api.php';
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&action=shorturl&format=json&url={$target_url}";
PHP
|
echo; \
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl
<?php
$token='1002a612b4';
$timestamp = time();
$target_url='https://google.com';
$signature = hash( 'sha256' , $timestamp . $token );
$yourls_url='https://go.shahed.biz.ops/yourls-api.php';
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&hash=sha256&action=shorturl&format=json&url={$target_url}";
PHP
|
echo; \
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl
<?php
$token='1002a612b4';
$timestamp = time();
$target_url='https://google.com';
$signature = hash( 'sha512' , $timestamp . $token );
$yourls_url='https://go.shahed.biz.ops/yourls-api.php';
echo "{$yourls_url}?signature={$signature}×tamp={$timestamp}&hash=sha512&action=shorturl&format=json&url={$target_url}";
PHP
|
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}×tamp=${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}×tamp=${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}×tamp=${TIMESTAMP}&hash=sha512&action=shorturl&format=json&url=${TARGET_URL}" | jq -r .shorturl
EXE
|
References
|
References | ||
|---|---|---|