Skip to content

Instantly share code, notes, and snippets.

View superfashi's full-sized avatar
🚩
h4ck1ng

SuperFashi superfashi

🚩
h4ck1ng
View GitHub Profile
@superfashi
superfashi / flare-on-11-write-up.md
Last active November 13, 2024 08:10
Flare-On 11 Write-Up

image-20241031152546252.png

1 - frog

For the first challenge, we are given a game written in Python. Luckily the source code is also given, so let's dig into the source code directly.

The source code is not that long, and quickly we noticed the GenerateFlagText function. If we read this line closely:

return ''.join([chr(ord(c) ^ key) for c in encoded])
@superfashi
superfashi / solver.py
Created August 21, 2021 14:07
Adding values consists of limited bytes to a target number using modular arithmetic
import itertools
from collections import defaultdict
target_byte_size = 4
target_size = 1 << (target_byte_size * 8)
usable_bytes = (0x05, 0x50, 0xc3)
reverse_mapping = defaultdict(list)
@superfashi
superfashi / els.go
Last active July 26, 2021 11:18
EMPTY LS, Google CTF 2021
package main
import (
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"net"
"net/http"
"sync"
@superfashi
superfashi / parking.cpp
Created July 26, 2021 07:20
Parking, Google CTF 2021
#include <iostream>
#include <fstream>
#include <vector>
#include <unordered_map>
#include <forward_list>
#include <z3++.h>
int width, height;
std::vector<bool> walls;
@superfashi
superfashi / cpp.go
Created July 19, 2021 11:32
CPP, Google CTF 2021
package main
import (
"fmt"
)
var mem = map[string]uint8{}
var str string
func MEMORY(address uint8) byte {
@superfashi
superfashi / sound_gen.go
Created July 6, 2017 16:52
for the paper "Conversion Between Mathematical Functions And Sound"
package main
import (
"log"
"os"
"math"
"github.com/youpy/go-wav"
)
@superfashi
superfashi / poor_pigs.go
Created May 28, 2017 14:27
poor pigs validation
package main
import (
"fmt"
"math"
"math/rand"
"reflect"
"time"
)