Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
glitchcat.py
Plain and simple: connect, print whatever the server sends, decode a line like:
'picoCTF{gl17ch_m3_n07_' + chr(0x61) + chr(0x34) + '}'
into the assembled string.
Usage:
python3 glitchcat.py
python3 glitchcat.py host port
import java.util.*;
class VaultDoor1 {
public static void main(String args[]) {
VaultDoor1 vaultDoor = new VaultDoor1();
Scanner scanner = new Scanner(System.in);
System.out.print("Enter vault password: ");
String userInput = scanner.next();
String input = userInput.substring("picoCTF{".length(),userInput.length()-1);
if (vaultDoor.checkPassword(input)) {
def brute_force_caeser_cipher(encrypted_flag):
alphabet = "abcdefghijklmnopqrstuvwxyz" # Define the alphabet - in this case is the latin alphabet
length_text = len(encrypted_flag)
for shift in range(26):
decrypted_message = ""
for char in encrypted_flag:
if char in alphabet:
new_char = chr(((ord(char) - 97 - shift) % 26) + 97) # Decrypt the character using modular arithmetic
def convert_to_text(numbers):
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" # Alphabet string
result = ""
for item in numbers:
# Check if the item is a number; convert to letter if so
if isinstance(item, int):
result += letters[item - 1] # Convert number to corresponding letter
else:
result += str(item) # Add non-integer items directly
// This code belongs to picoCTF.
// I do not own this code. It is provided as part of the picoCTF challenge.
import java.util.*;
class VaultDoorTraining {
public static void main(String args[]) {
VaultDoorTraining vaultDoor = new VaultDoorTraining();
Scanner scanner = new Scanner(System.in);
System.out.print("Enter vault password: ");