Skip to content

Instantly share code, notes, and snippets.

View 0awawa0's full-sized avatar
👾
Focusing

Alexander 0awawa0

👾
Focusing
View GitHub Profile
document.getElementById('neville-locker-form').addEventListener('submit', function(e) {
e.preventDefault();
var passphrase = document.getElementById('passwd').value,
encryptedMsg = '4cce4470203e10b395ab1787a22553a5b2503d42a965da813676d929cc16f76cU2FsdGVkX19FvUyhqWoQKHXNLBL64g8acK4UQoP6XZQ/n4MRL3rgQj8TJ/3r8Awtxte2V9s+RLfQHJOHGwYtctqRa/H2BetmxjwGG+LYKUWC8Z6WBoYbecwtATCOuwewnp+VKBzsWLme+3BZyRgKEA==',
encryptedHMAC = encryptedMsg.substring(0, 64),
encryptedHTML = encryptedMsg.substring(64),
decryptedHMAC = CryptoJS.HmacSHA256(encryptedHTML, CryptoJS.SHA256(passphrase).toString()).toString();
from PIL import Image
from morse_decode import morse_decode
from zipfile import ZipFile
from os import chdir
def parse_image_to_morse(pixels, width, height, space_color, sign_color):
code = ""
for x in range(1, height, 2):
from PIL import Image
from morse_decode import morse_decode
from zipfile import ZipFile
from os import chdir, remove, rmdir
from shutil import copyfile, rmtree
def parse_image_to_morse(pixels, width, height, space_color, sign_color):
code = ""
import requests
import json
import curses
def main(stdscr):
curses.resize_term(100, 300)
stdscr.refresh()
curses.start_color()
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int win(){
char flag[128];
FILE *file = fopen("flag.txt","r");
if (!file) {
#include <stdio.h>
char password[128];
void generate_password() {
FILE *file = fopen("/dev/urandom","r");
fgets(password, 128, file);
fclose(file);
}
import string
with open("key.txt", "r") as f:
shift = int(f.readline())
key = f.readline()
with open("flag.txt", "r") as f:
flag = f.read()
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void main(){
setbuf(stdout, NULL);
setbuf(stderr, NULL);
char password[64];
int ways_to_leave_your_lover = 0;
def xorBytes(b1, b2):
 res = b""
 for i in range(max(len(b1), len(b2))):
 res += bytes([b1[i % len(b1)] ^ b2[i % len(b2)]])
 return res
crib = b"actf{"
ctext = bytes.fromhex("ae27eb3a148c3cf031079921ea3315cd27eb7d02882bf724169921eb3a469920e07d0b883bf63c018869a5090e8868e331078a68ec2e468c2bf13b1d9a20ea0208882de12e398c2df60211852deb021f823dda35079b2dda25099f35ab7d218227e17d0a982bee7d098368f13503cd27f135039f68e62f1f9d3cea7c")
for i in range(len(ctext) - 5):
 offset = ctext[i: i + 5]
 key = xorBytes(offset, crib)
@0awawa0
0awawa0 / bash.py
Created April 28, 2021 06:08
ImagineCTF Round 9 Salty Task
#!/usr/bin/env python3
import os
import hashlib
def main():
while True:
command = input("bash-4.2$ ")
checkInput(command)
os.system(command)