Yourls: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| Line 9: | Line 9: | ||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | ||
<?php | <?php | ||
$token='1002a612b4'; | |||
$timestamp = time(); | $timestamp = time(); | ||
$signature = md5( $timestamp . | $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 | PHP | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 20: | Line 23: | ||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | ||
<?php | <?php | ||
$token='1002a612b4'; | |||
$timestamp = time(); | $timestamp = time(); | ||
$signature = hash( 'sha256' , $timestamp . | $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 | PHP | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 31: | Line 37: | ||
cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | cat <<'PHP' | kubectl -n yourls exec -i svc/yourls -c yourls -- php /dev/stdin | xargs curl -sSL | jq -r .shorturl | ||
<?php | <?php | ||
$token='1002a612b4'; | |||
$timestamp = time(); | $timestamp = time(); | ||
$signature = hash( 'sha512' , $timestamp . | $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 | PHP | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Revision as of 03:42, 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 | ||
|---|---|---|