Skip to content

Instantly share code, notes, and snippets.

@Raffy27
Raffy27 / JS Alapok.md
Last active November 2, 2020 14:30
Bevezetés, változók, adattípusok, operátorok

JavaScript alapok

Bevezetés

A JavaScript egy eredetileg webes környezetre tervezett programozási nyelv. A benne írt programokat scripteknek nevezzük, és ezek szöveg formájában tárolhatók, illetve futtathatók - nincs szükség például fordításra. Létezik több engine (motor), ami JavaScriptet futtat, ilyen például a V8, amire a Chromium böngészők és a Node.js is épül.

Környezet

A továbbiakban a következő programokra/kiegészítőkre lesz szükség:

@Raffy27
Raffy27 / aireader.py
Last active October 26, 2020 19:36
ROCSC 2020 | Final Phase | aireader solution
import socket
from PIL import Image
import numpy as np
from pyzbar import pyzbar
import base64
import pytesseract
CTF_IP = '35.242.239.180'
CTF_PORT = 32303
BUFSIZE = 2048
@Raffy27
Raffy27 / LSR.md
Last active November 26, 2025 02:47
Local Storage Reassembly - Discord

Local Storage Reassembly

General

The purpose of this writeup is to document a method that can be exploited in order to transfer files to a Discord user's Windows system, without said user's explicit consent. This method does not allow for immediate and direct execution of the file, therefore it does not qualify as an individual security vulnerability.

Technique

LSR requires an image file that will not be modified by Discord. Images that have already been compressed are not modified in any way, EOF data is not trimmed or altered. Using such an image, any file can be split into chunks that (combined with the image) don't exceed 8Mb, which is the upload limit for regular Discord accounts. These images containing EOF data can be sent to a user without being altered - file hashes do not match, so remote caching can not be used, and the original image has already been compressed, thus no additional compression will take place. As soon as the user views the given conversation and the images load, they a

@Raffy27
Raffy27 / img2ascii.py
Created May 17, 2020 18:38
Simple code to transform and display an image as colored ASCII art
from colorama import init, deinit, Style, Fore
from PIL import Image
def pix2str_bw(p, charset, space):
p *= len(charset)-1
p //= 255
return charset[p] + ' ' * space
def pix2str(p, char, space):
apx = [(12,12,12), (197,15,31), (19,161,14), (193,156,0), (0,55,218), (136,23,152), (58,150,221), (204,204,204),
DebugView Filter Definition File v1.0
*] [W]*
[Orion]*
*] [W]*
*] [E]*
*] [H]*
*] [S]*