전체 글(140)
-
file in file
signatures = [ "ff d8 ff e0", "ff d8 ff e8", "47 49 46 38 37 61", "47 49 46 38 39 61", "89 50 4e 47 0d 0a 1a 0a", "25 50 44 46 2d 31 2e", "50 4b 03 04", "41 4c 5a 01", "52 61 72 21 1a 07", "50 4b 03 04 14 00 06 00", "49 44 33" ] signatures = list(map(bytes.fromhex, signatures)) def searchFileInFile(filename): with open(filename, "rb") as file: data = file.read() for signature in signatures: if s..
2022.11.26 -
[CTF] SECCON CTF 2022 - skipinx
server { listen 8080 default_server; server_name nginx; location / { set $args "${args}&proxy=nginx"; proxy_pass http://web:3000; } }#default.conf const app = require("express")(); const FLAG = process.env.FLAG ?? "SECCON{dummy}"; const PORT = 3000; app.get("/", (req, res) => { req.query.proxy.includes("nginx") ? res.status(400).send("Access here directly, not via nginx :(") : res.send(`Congratz..
2022.11.13 -
RSA 암호화 구현 with 파이썬
import base64 import math from Crypto.Util.number import getPrime def gcd(p, q): x = math.gcd(p,q) return x def lcm(p, q): l = math.lcm(p,q) return l def pubkey_e(l): e = 2 while e < l and gcd(e,l) != 1: e += 1 return e def pubkey_n(p,q): n = p * q print("public key n : " + str(n)) return n def prikey_d(e,l): d = 1 while (e*d) % l != 1 or d == e: d += 1 return d def rsa_enc(e,n,m): C = (int(m)**..
2022.11.06 -
[CTF] Blackhat 2022 CTF - naruto
대회가 끝나고 적는 라이트업이라 서버가 내려가서 정확한 문제 이름 하고 사이트 사진이 없다. 양해바람.. 사이트 들어가면 나루토 사진이 있길래 그냥 기억나는대로 아무거나 썻다 $flag=getenv("FLAG"); if ($_SERVER['REQUEST_METHOD'] === 'POST') { if(isset($_POST["email"])&&isset($_POST["pass"])){ if($_POST["email"]==="admin@naruto.com"){ $x=$_POST["test"]; $inp=preg_replace("/[^A-Za-z0-9$]/","",$_POST["pass"]); if($inp==="SuperSecRetPassw0rd"){ die("Hacking Attempt detected")..
2022.10.02 -
코드업 C언어 100제 클리어
이제 드림핵으로,,
2022.09.15 -
과제 6. CSP에 대해서
보호되어 있는 글입니다.
2022.09.12