전체 글(140)
-
백준 [ALGORITHM] - A와 B (12904)
S = list(input()) T = list(input()) while len(S) < len(T): if T[-1] == 'A': T.pop() elif T[-1] == 'B': T.pop() T.reverse() if ''.join(T) == ''.join(S): print(1) else: print(0) 그리디 알고리즘 구현 문제였는데 골드5 문제 치고 간단한 문제였음
2024.01.21 -
백준 [ALGORITHM] - 빈도 정렬 (2910)
N, C = map(int, input().split()) num = list(map(int, input().split())) print_list = list() hash_map = dict() for i in range(N): if str(num[i]) in hash_map.keys(): hash_map[str(num[i])][0] += 1 else: hash_map[str(num[i])] = [1, i] hash_map = sorted(hash_map.items(), key=lambda x: (x[1][0], -x[1][1]), reverse=True) for i in range(len(hash_map)): #print(hash_map[i][0]) #print(hash_map[i][1][1]) pri..
2024.01.20 -
[CTF] uoftctf-2024
문제 페이지에 접속하면 닉네임을 입력하는 input 창과 submit 버튼이 있다. asdf라는 닉네임을 입력하고 submit하면 page2로 이동되고, 닉네임이 출력되는 간단한 기능을 하는 사이트다. 이때 cookie를 확인해보면 auth_token이라는 이름으로 입력된 이름이 저장된다. 이때, signature 코드를 입력하지 않으면 jwt를 입력했을때 /register로 redirect된다. 따라서, jwt-cracker 등을 이용해서 jwt 시그니처를 알아냈어야 했다. 이후, response 값을 확인해보니 server로 python3.10.13을 사용하고 있다. 입력 값을 통해서 ssti를 트리거 시키는 문제라고 생각했다. 하지만, config,class,mro,_,',",%등 거의 모든 문자열..
2024.01.17 -
[PWN] Dreamhack - rao (Return Address Overwrite)
보호되어 있는 글입니다.
2024.01.02 -
백준[ALGORITHM] - 팩토리얼 0의 개수 (1676)
n = int(input()) lst = list(range(n,0,-1)) temp = '' count = 0 for i in range(len(lst)): temp = lst[-1] * lst[i-1] lst[-1] = temp temp = str(temp) count = 0 for digit in reversed(str(temp)): if digit == '0': count += 1 else: break print(count)
2023.10.31 -
Best of the Best 프로젝트 - DSM 6.X & 7.X 기본 지원 패키지
보호되어 있는 글입니다.
2023.09.19