From 8228f24185b2d7cdb4d48df92069b281e2413a05 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 5 Sep 2024 18:49:14 +0200 Subject: [PATCH] web/bookmarklet --- web/bookmarklet/index.html | 75 ++++++++++++++++++++++++++++++++++++++ web/bookmarklet/solve.js | 12 ++++++ 2 files changed, 87 insertions(+) create mode 100644 web/bookmarklet/index.html create mode 100755 web/bookmarklet/solve.js diff --git a/web/bookmarklet/index.html b/web/bookmarklet/index.html new file mode 100644 index 0000000..7c95b55 --- /dev/null +++ b/web/bookmarklet/index.html @@ -0,0 +1,75 @@ + + + + + + + picoCTF - picoGym | Bookmarklet Challenge + + + + + + +
+ picoCTF logo +
+ +
+
+
+
+ flag art +
+

Welcome to my flag distribution website!

+
+

If you're reading this, your browser has succesfully received the flag.

+

Here's a bookmarklet for you to try:

+ + + + + + + +
+
+
+
+ + + diff --git a/web/bookmarklet/solve.js b/web/bookmarklet/solve.js new file mode 100755 index 0000000..1eb64cd --- /dev/null +++ b/web/bookmarklet/solve.js @@ -0,0 +1,12 @@ +#!/usr/bin/env nix-shell +/* +#!nix-shell -i node -p nodejs +*/ + +var encryptedFlag = "àÒÆަȬë٣֖ÓÚåÛÑ¢ÕӜÒËɧœ©™í"; +var key = "picoctf"; +var decryptedFlag = ""; +for (var i = 0; i < encryptedFlag.length; i++) { + decryptedFlag += String.fromCharCode((encryptedFlag.charCodeAt(i) - key.charCodeAt(i % key.length) + 256) % 256); +} +console.log(decryptedFlag)