Skip to content

Instantly share code, notes, and snippets.

View aljazmedic's full-sized avatar
💻
Hacking the mainframe . . .

Aljaz aljazmedic

💻
Hacking the mainframe . . .
View GitHub Profile
@aljazmedic
aljazmedic / index.php
Last active February 7, 2023 17:18
DiceCTF 2023 - Recursive CSP - solution script
<?php
if (isset($_GET["source"])) highlight_file(__FILE__) && die();
$name = "world";
if (isset($_GET["name"]) && is_string($_GET["name"]) && strlen($_GET["name"]) < 128) {
$name = $_GET["name"];
}
$nonce = hash("crc32b", $name);
header("Content-Security-Policy: default-src 'none'; script-src 'nonce-$nonce' 'unsafe-inline'; base-uri 'none';");
@aljazmedic
aljazmedic / chal.sv
Last active August 31, 2022 12:23
MapleCTF
module top();
reg eo3,nF3;
wire [11:0] D1q7APfd;
wire [7:0] Dy,HZ4cC8Gwm7YlmW,XIzbggF,XvqVFhCAiK8ZU,eCzsnH;
wire n35s92a4h;
string flag;
integer z;
initial forever begin
eo3 = 0; #5;