Skip to content

Instantly share code, notes, and snippets.

View RomainL972's full-sized avatar

Romain Lebbadi-Breteau RomainL972

View GitHub Profile

Google CTF 2022 Writeup - Enigma

Hi, and welcome to this writeup for the crypto Enigma challenge.

At the end of the CTF, it had 9 solves and awarded 373 points. My team (PolyHx) was the 4th to crack it.

Introduction

Since I've always had a passion for cryptography, I was interested as soon as I saw the challenge title.

#!/usr/bin/env python3
import requests
from dateutil.parser import parse
def main():
fromcur = input("From currency : ")
tocur = input("To currency : ")
amount = float(input("Amount : "))
date = input("Date : ")
@RomainL972
RomainL972 / 2-sum.py
Created October 12, 2020 00:28
2-sum algorithm
array = [-2, 2, 4, 8, 9]
target = 13
def function(array, target):
for f in range(len(array)):
for s in range(f+1, len(array)-f):
if array[f] + array[s] == target:
return True
return False
from math import exp
u = 1/2
p=0
uplus1= (7*exp(u)+1)/(exp(u)+3)
while uplus1 - u >= pow(10,-5):
u = uplus1
uplus1 = (7*exp(u)+1)/(exp(u)+3)
p += 1
print(p)
<?php
if($argc < 2)
die("Give modpack url as argument");
$url = $argv[1] . "/files/latest";
$modpack_headers = get_headers($url, 1);
if(!in_array("HTTP/1.1 200 OK", $modpack_headers))
die("URL isn't valid\n");