Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<title>ocf.io shorturls</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
</head>
<body>
<div class="m-3">
<h1>ocf.io short link translations</h1>
<h5><a href="https://www.ocf.berkeley.edu/docs/">Documentation</a></h5>
@strellic
strellic / notreceivedprize.js
Created February 28, 2021 09:07
javascript solution for web notreceivedprize in aeroctf 2021
let fn = function() {
async function x() {
let r = await fetch(`/api/admin/pz/ex`, { method: `POST` });
let prob = (await r.json()).ex.split(' ');
let a = parseInt(prob[0]), op = prob[1], b = parseInt(prob[2]);
let ans = 0;
if(op === '+') ans = a+b;
if(op === '*') ans = a*b;
if(op === '-') ans = a-b;
if(op === '/') ans = a/b;
<!DOCTYPE html>
<html>
<body>
<iframe src="https://computeration-fixed.web.jctf.pro/#" id="iframe"></iframe>
<script>
let iframe = document.getElementById("iframe");
let known = "";
let check = `[a-m]`;
let gen = (c) => {