From 31cec5014352762e800ef58179a5615840af7688 Mon Sep 17 00:00:00 2001 From: itoid Date: Sat, 25 Oct 2025 17:44:04 +0700 Subject: [PATCH] Delete services/phew/dist/chall.py --- services/phew/dist/chall.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 services/phew/dist/chall.py diff --git a/services/phew/dist/chall.py b/services/phew/dist/chall.py deleted file mode 100644 index c97146c..0000000 --- a/services/phew/dist/chall.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python3 - -from Pailier import * -from Crypto.Util.number import * -with open("/flag.txt", "rb") as f: - flag = f.read() -flag = bytes_to_long(flag) -cipher = pailier() -while True: - print("1. encrypt") - print("2. bingo") - print("3. decrypt") - print("4. exit") - inp = int(input("> ")) - if inp==1: - print("pt (hex)") - inp = input("> ") - ct = cipher.encrypt(int(inp,16)) - print('ct : ','{0:x}'.format(ct)) - elif inp==2: - ct = cipher.encrypt(flag) - print('ct : ','{0:x}'.format(ct)) - elif inp==3: - print("ct (hex)") - inp = input("> ") - pt = cipher.decrypt(int(inp,16)) - print('pt : ','{0:x}'.format(pt)) - else: - exit()