Skip to content

Instantly share code, notes, and snippets.

@juananpe
Last active July 27, 2025 00:17
Show Gist options
  • Select an option

  • Save juananpe/26c3a41b5d6b9b97e16cc94be6c1acf6 to your computer and use it in GitHub Desktop.

Select an option

Save juananpe/26c3a41b5d6b9b97e16cc94be6c1acf6 to your computer and use it in GitHub Desktop.
ee33 hackit levels
def drop_dead(ive_seen_you_before, wrong):
to_be_or_not_to_be = ive_seen_you_before + wrong
# The original ArnoldC code contains a section that appears to be an arithmetic
# puzzle. The variable `or_i_will_put_you_down` is used but never declared.
# Assuming `or_i_will_put_you_down` is 0.
or_i_will_put_you_down = 0
no_shit = (1 + 1 - 0 + 1 - or_i_will_put_you_down + 1 - 0 + 1 - or_i_will_put_you_down + 1 - 0 + 1 + 0 + 1 - 0 + 1 + 0 + 1 - or_i_will_put_you_down + 1 + 0 + 1 - or_i_will_put_you_down + 1 + 0 + 1) > to_be_or_not_to_be
if no_shit:
# Recursive call with swapped arguments. The return value is assigned to i_did_nothing
# but the variable is not used afterwards inside this function's scope.
i_did_nothing = kill_me_drop_dead(wrong, to_be_or_not_to_be)
return i_did_nothing
else:
# The line 'BULLSHIT all_of_it ????????' is syntactically incorrect in ArnoldC.
# It's interpreted as the start of an else block, but the rest of the line is ignored.
return to_be_or_not_to_be
def kill_me_drop_dead(ive_seen_you_before, wrong):
# This function seems to be a wrapper or part of a multi-name function call.
# It directly calls drop_dead with its arguments.
return drop_dead(ive_seen_you_before, wrong)
def main():
so_you_can_go_fuck_yourself = 0
right = 1
im_back = 1
you_should_not_drink_and_bake = 1
and_the_nipples_are_very_sensitive = 0
wrong = 1
this_is_war = 0
bad = 1
you_son_of_a_bitch = 1
step_to_the_right = 0
well_that_hit_the_spot = 1
you_are_a_stupid = 0
look_whos_talking = 1
hooligans = 0
so_you_can_go_fuck_yourself = (0 or 1) and so_you_can_go_fuck_yourself
# This is equivalent to 'while(0):', so this loop never executes.
while 0:
pass
so_you_can_go_fuck_yourself = kill_me_drop_dead(1, 1)
# ArnoldC is stack-based, so operations are sequential.
# The previous one-line translation was incorrect due to Python's
# operator precedence. This is the corrected, sequential calculation.
stack = 1
stack += right
stack *= so_you_can_go_fuck_yourself
stack //= so_you_can_go_fuck_yourself
stack *= so_you_can_go_fuck_yourself
right = stack
print(right)
if __name__ == "__main__":
main()
sed 's/https:\/\/youtu.be\///g' text.txt > level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=2$/IT'S SHOWTIME/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=209/HEY CHRISTMAS TREE/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=276/varfuckyourself/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=36/varright/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=508/varimback/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=372/varcakedrinkbake/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=307/varwoman/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=37/varwrong/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=226/varwar/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=236/varbad/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=22/varsonbitch/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=217/varthatsright/g" level.arnoldc # right? var_right
sed -i "s/pDxn0Xfqkgw?t=196/varhitspot/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=186/varstupid/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=61/varwhostalking/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=53$/varholy/g" level.arnoldc
sed -i "s/78-vFsj3EK4?t=47/YOU SET US UP/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=496/@I LIED/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=133/@NO PROBLEMO/g" level.arnoldc
sed -i "s/ybJWKZB0Erk?t=77/@I LIED/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=106/GET TO THE CHOPPER/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=253/HERE IS MY INVITATION/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=113/CONSIDER THAT A DIVORCE/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=168/KNOCK KNOCK/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=101/ENOUGH TALK/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=165/STICK AROUND/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=8$/CHILL/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=245/GET YOUR ASS TO MARS/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=552/DO IT NOW/g" level.arnoldc
sed -i "s/3LVfJFED7pk?t=92/GET UP/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=50/func/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=176/YOU'RE FIRED/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=92/TALK TO THE HAND/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=429/YOU HAVE BEEN TERMINATED/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=24/LISTEN TO ME VERY CAREFULLY/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=10/I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=32/argseenyoubefore/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=446/argwrong/g" level.arnoldc # var_wrong
sed -i "s/pDxn0Xfqkgw?t=546/GIVE THESE PEOPLE AIR/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=200/vartobe/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=30/varnoshit/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=18/vardidnothing/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=517/GET DOWN/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=522/GET DOWN/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=521/GET DOWN/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=518/GET DOWN/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=530/LET OFF SOME STEAM BENNET/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=45/BECAUSE I'M GOING TO SAY PLEASE/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=80/BULLSHIT/g" level.arnoldc
sed -i "s/ybJWKZB0Erk?t=272/YOU HAVE NO RESPECT FOR LOGIC/g" level.arnoldc
sed -i "s/pDxn0Xfqkgw?t=526/HASTA LA VISTA, BABY/g" level.arnoldc
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Decoder para el puzzle "En garde!".
Pipeline:
1) Leet parcial: 1->R, 5->V, 6->W, 7->X, 8->Y (el '3' se deja como ruido)
2) Atbash (alfabeto espejo)
3) César con desplazamiento -10 para DESCIFRAR
Gestión del case:
- Se preserva el case por posición respecto al texto original.
- Si en una posición original había un dígito/puntuación que se convierte en letra,
se usa 'upper' por defecto (configurable con --nonalpha-case).
- Opción para invertir el case al final (--invert-case).
Uso rápido:
python decoder_en_garde.py -t "iLEEB, D1 CPDL H7 hCHJB dBC6B1P. RB5 FHEELM D1 KP6IL8. a8LAP8L 6B MHL."
python decoder_en_garde.py -t "a8yCnLX7p71zU3y7I" --invert-case
python decoder_en_garde.py -f entrada.txt
echo "a8yCnLX7p71zU3y7I" | python decoder_en_garde.py
"""
import argparse
from typing import List
LEET_DECODE = {
'1': 'R',
'5': 'V',
'6': 'W',
'7': 'X',
'8': 'Y',
}
def atbash_char(ch: str) -> str:
if 'A' <= ch <= 'Z':
return chr(ord('Z') - (ord(ch) - ord('A')))
if 'a' <= ch <= 'z':
return chr(ord('z') - (ord(ch) - ord('a')))
return ch
def caesar_char(ch: str, shift: int) -> str:
if 'A' <= ch <= 'Z':
return chr((ord(ch) - ord('A') + shift) % 26 + ord('A'))
if 'a' <= ch <= 'z':
return chr((ord(ch) - ord('a') + shift) % 26 + ord('a'))
return ch
def char_case_flag(ch: str) -> str:
"""Devuelve 'upper', 'lower' o 'nonalpha' según el carácter origen."""
if ch.isalpha():
return 'upper' if ch.isupper() else 'lower'
return 'nonalpha'
def apply_case(letter: str, flag: str, nonalpha_hint: str) -> str:
"""Aplica el case final según la bandera de la posición origen."""
if not letter.isalpha():
return letter
if flag == 'upper':
return letter.upper()
if flag == 'lower':
return letter.lower()
# nonalpha
return letter.lower() if nonalpha_hint == 'lower' else letter.upper()
def decrypt(text: str, *, shift: int = -10, invert_case: bool = False,
nonalpha_case: str = 'upper') -> str:
# 1) Guardar banderas de case del texto original
flags: List[str] = [char_case_flag(c) for c in text]
# 2) Leet parcial
after_leet = ''.join(LEET_DECODE.get(c, c) for c in text)
# 3) Atbash + César (operamos en mayúsculas para determinismo)
tmp_chars: List[str] = []
for c in after_leet:
if c.isalpha():
u = c.upper()
a = atbash_char(u)
z = caesar_char(a, shift)
tmp_chars.append(z) # queda en mayúscula aquí
else:
tmp_chars.append(c)
after_cipher = ''.join(tmp_chars)
# 4) Aplicar case por posición
out_chars: List[str] = []
for c, flag in zip(after_cipher, flags):
if c.isalpha():
out_chars.append(apply_case(c, flag, nonalpha_case))
else:
out_chars.append(c)
result = ''.join(out_chars)
# 5) Opción de invertir case
if invert_case:
result = ''.join(ch.lower() if ch.isupper() else ch.upper() for ch in result)
return result
def read_input(args: argparse.Namespace) -> str:
if args.text is not None:
return args.text
if args.file is not None:
with open(args.file, 'r', encoding='utf-8') as f:
return f.read()
# STDIN
import sys
return sys.stdin.read()
def main():
parser = argparse.ArgumentParser(description="Decoder del puzzle 'En garde!'.")
parser.add_argument('-t', '--text', help='Texto a descifrar (si no, usa --file o STDIN).')
parser.add_argument('-f', '--file', help='Ruta a fichero con el texto.')
parser.add_argument('--shift', type=int, default=-10,
help='Desplazamiento César para descifrar (por defecto -10).')
parser.add_argument('--invert-case', action='store_true',
help='Invierte el case del resultado al final.')
parser.add_argument('--nonalpha-case', choices=['upper', 'lower'], default='upper',
help='Case a aplicar cuando un dígito/puntuación origina una letra (defecto: upper).')
args = parser.parse_args()
text = read_input(args)
# Procesar cada línea por separado para mantener alineación de case
lines = text.splitlines(keepends=False)
outputs = [
decrypt(line, shift=args.shift, invert_case=args.invert_case,
nonalpha_case=args.nonalpha_case)
for line in lines
]
print('\n'.join(outputs))
if __name__ == '__main__':
main()
BeginMain
DeclareInt var1 SetInitialValue false
DeclareInt WRONG SetInitialValue true
DeclareInt I'LL BE BACK SetInitialValue true
DeclareInt YOU SHOULD NOT DRINK AND BAKE SetInitialValue true
DeclareInt MY NIPPLES ARE VERY SENSITIVE SetInitialValue false
DeclareInt WRONG SetInitialValue true
DeclareInt THIS IS WAR SetInitialValue false
DeclareInt BORN TO BE BAD SetInitialValue true
DeclareInt YOU SON OF A BITCH! SetInitialValue true
DeclareInt THAT'S RIGHT. KEEP IT! SetInitialValue false
DeclareInt WELL, THAT HIT THE SPOT SetInitialValue true
DeclareInt YOU'RE A STUPID SetInitialValue false
DeclareInt LOOK WHO'S TALKING SetInitialValue true
DeclareInt HOOLIGANI SetInitialValue false
AssignVariable var1 SetValue
false Or true And var1
EndAssignVariable
While false
EndWhile
AssignVariableFromMethodCall
var1
CallMethod
fun1
true
true
AssignVariable WRONG SetValue
true + WRONG * var1 / var1 * var1
EndAssignVariable
Print WRONG
EndMain
DeclareMethod
fun1
MethodArguments
arg1
MethodArguments
arg2
NonVoidMethod
DeclareInt var1 SetInitialValue false
DeclareInt var2 SetInitialValue false
DeclareInt var3 SetInitialValue false
AssignVariable var1 SetValue
arg1 + arg2
EndAssignVariable
AssignVariable var2 SetValue
14 > var1
EndAssignVariable
If var2
AssignVariableFromMethodCall
var3
CallMethod
fun1
arg2
var1
Return var3
Else
Return var1
EndIf
EndMethodDeclaration
It's showtime.
Hey, Christmas tree! So you can go fuck yourself.
you set us up. I lied.
Hey, Christmas tree! Right?
you set us up. No problemo.
Hey, Christmas tree! I'm back.
you set us up. No problemo.
Hey, Christmas tree! You should not drink and bake.
you set us up. No problemo.
Hey, Christmas tree! And the nipples are very sensitive.
you set us up. I lied.
Hey, Christmas tree! Wrong.
you set us up. No problemo.
Hey, Christmas tree! This is war.
you set us up. I lied.
Hey, Christmas tree! bad
you set us up. No problemo.
Hey, Christmas tree! You son of a bitch.
you set us up. No problemo.
Hey, Christmas tree! Step to the right. Keep it down.
you set us up. I lied.
Hey, Christmas tree! Well, that hit the spot.
you set us up. No problemo.
Hey, Christmas tree! You are a stupid...
you set us up. i lied
Hey, Christmas tree! Look who's talking.
you set us up. No problemo.
Hey, Christmas tree! Hooligans
you set us up. I lied.
Get to the chopper! So you can go fuck yourself.
Here's my invitation. i lied
Consider that a divorce. No problemo.
Knock, knock. So you can go fuck yourself.
Enough talk.
Stick around. i lied
chill.
Get your ass to Mars. So you can go fuck yourself.
Do it now! Kill me! Drop dead. No problemo. No problemo.
Get to the chopper! Right?
Here's my invitation. No problemo.
every day to get up. Right?
You're fired. So you can go fuck yourself.
Uh, he had to split. So you can go fuck yourself.
You're fired. So you can go fuck yourself.
Enough talk.
Talk to the hand. Right?
You are terminated.
Listen to me very carefully. Drop dead.
I need your clothes, your boots, and your motorcycle. I've seen you before.
I need your clothes, your boots, and your motorcycle. Wrong.
Give these people air!
Hey, Christmas tree! To be or not to be.
you set us up. I lied.
Hey, Christmas tree! No shit.
you set us up. I lied.
Hey, Christmas tree! I did nothing. The pavement was his enemy.
you set us up. i lied
Get to the chopper! To be or not to be.
Here's my invitation. I've seen you before.
every day to get up. Wrong.
Enough talk.
Get to the chopper! No shit.
Here's my invitation. No problemo.
every day to get up. No problemo.
Get down. I lied.
every day to get up. No problemo.
Get down or I'll put you down. I lied.
every day to get up. No problemo.
Get down. I lied.
every day to get up. No problemo.
Get down or I'll put you down. I lied.
every day to get up. No problemo.
Get down. I lied.
every day to get up. No problemo.
every day to get up. I lied.
every day to get up. No problemo.
Get down. i lied
every day to get up. No problemo.
every day to get up. i lied
every day to get up. No problemo.
Get down or I'll put you down. i lied
every day to get up. No problemo.
every day to get up. i lied
every day to get up. No problemo.
Get down or I'll put you down. I lied.
every day to get up. No problemo.
every day to get up. I lied.
every day to get up. No problemo.
Let off some steam, Bennett. To be or not to be.
Enough talk.
Because I'm going to say please. No shit.
Get your ass to Mars. I did nothing. The pavement was his enemy.
Do it now! Kill me! Drop dead. Wrong. To be or not to be.
I'll be back. I did nothing. The pavement was his enemy.
It's all bullshit, all of it.
I'll be back. To be or not to be.
you have no respect for logic
Hasta la vista, baby.
IT'S SHOWTIME
HEY CHRISTMAS TREE so_you_can_go_fuck_yourself
YOU SET US UP @I LIED
HEY CHRISTMAS TREE right
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE im_back
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE you_should_not_drink_and_bake
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE and_the_nipples_are_very_sensitive
YOU SET US UP @I LIED
HEY CHRISTMAS TREE wrong
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE this_is_war
YOU SET US UP @I LIED
HEY CHRISTMAS TREE bad
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE you_son_of_a_bitch
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE step_to_the_right
YOU SET US UP @I LIED
HEY CHRISTMAS TREE well_that_hit_the_spot
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE you_are_a_stupid
YOU SET US UP @I LIED
HEY CHRISTMAS TREE look_whos_talking
YOU SET US UP @NO PROBLEMO
HEY CHRISTMAS TREE hooligans
YOU SET US UP @I LIED
GET TO THE CHOPPER so_you_can_go_fuck_yourself
HERE IS MY INVITATION @I LIED
CONSIDER THAT A DIVORCE @NO PROBLEMO
KNOCK KNOCK so_you_can_go_fuck_yourself
ENOUGH TALK
STICK AROUND @I LIED
CHILL
GET YOUR ASS TO MARS so_you_can_go_fuck_yourself
DO IT NOW kill_me_drop_dead @NO PROBLEMO @NO PROBLEMO
GET TO THE CHOPPER right
HERE IS MY INVITATION @NO PROBLEMO
GET UP right
YOU'RE FIRED so_you_can_go_fuck_yourself
HE HAD TO SPLIT so_you_can_go_fuck_yourself
YOU'RE FIRED so_you_can_go_fuck_yourself
ENOUGH TALK
TALK TO THE HAND right
YOU HAVE BEEN TERMINATED
LISTEN TO ME VERY CAREFULLY drop_dead
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE ive_seen_you_before
I NEED YOUR CLOTHES YOUR BOOTS AND YOUR MOTORCYCLE wrong
GIVE THESE PEOPLE AIR
HEY CHRISTMAS TREE to_be_or_not_to_be
YOU SET US UP @I LIED
HEY CHRISTMAS TREE no_shit
YOU SET US UP @I LIED
HEY CHRISTMAS TREE i_did_nothing
YOU SET US UP @I LIED
GET TO THE CHOPPER to_be_or_not_to_be
HERE IS MY INVITATION ive_seen_you_before
GET UP wrong
ENOUGH TALK
GET TO THE CHOPPER no_shit
HERE IS MY INVITATION @NO PROBLEMO
GET UP @NO PROBLEMO
GET DOWN @I LIED
GET UP @NO PROBLEMO
GET DOWN or_i_will_put_you_down @I LIED
GET UP @NO PROBLEMO
GET DOWN @I LIED
GET UP @NO PROBLEMO
GET DOWN or_i_will_put_you_down @I LIED
GET UP @NO PROBLEMO
GET DOWN @I LIED
GET UP @NO PROBLEMO
GET UP @I LIED
GET UP @NO PROBLEMO
GET DOWN @I LIED
GET UP @NO PROBLEMO
GET UP @I LIED
GET UP @NO PROBLEMO
GET DOWN or_i_will_put_you_down @I LIED
GET UP @NO PROBLEMO
GET UP @I LIED
GET UP @NO PROBLEMO
GET DOWN or_i_will_put_you_down @I LIED
GET UP @NO PROBLEMO
GET UP @I LIED
GET UP @NO PROBLEMO
LET OFF SOME STEAM BENNET to_be_or_not_to_be
ENOUGH TALK
BECAUSE I'M GOING TO SAY PLEASE no_shit
GET YOUR ASS TO MARS i_did_nothing
DO IT NOW kill_me_drop_dead wrong to_be_or_not_to_be
I'LL BE BACK i_did_nothing
BULLSHIT all_of_it ????????
I'LL BE BACK to_be_or_not_to_be
YOU HAVE NO RESPECT FOR LOGIC
HASTA LA VISTA, BABY
$(document).ready(function(){
$("#password").keyup(function(){
function c(p) {
const m = [];
p = p.toLowerCase();
for (let index = 0; index < p.length; index++) {
let x = p.charCodeAt(index);
if ( x < 48 || x > 122 || (x > 57 && x < 97)) {
continue;
}
if ((m.length + 1) % 6 === 0) {
m.push(32);
}
if (x < 97) {
m.push(x);
continue;
}
x -= 97;
m.push((7 * x + 13) % 26 + 97);
}
let s = String.fromCharCode(...m).replace(/ /g,'');
if (s === 'jkhlnwwrarqznaidpqra') {
return true;
}
return false;
}
r=$("#password").val();
res = c(r);
$("#password").css({"background-color":res?"#8f8":"#f88"});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment