Study/Web Hacking
[DreamHeck] random-test
얀 짱
2026. 7. 21. 21:41
먼저 파일을 열고 app.py를 확인함

alphanumeric 부분을 통해 해당 사물함 번호는 숫자+소문자 조합 4자리 수인 것을 확인함.
if locker_num != "" and rand_str[0:len(locker_num)] == locker_num: # lock_num이 비어있지 않고 rand_str의 앞부분과 일치하면
if locker_num == rand_str and password == str(rand_num): # lock_num이 rand_str 전체랑 같고 비번 맞추면 Flag
return render_template("index.html", result = "FLAG:" + FLAG)
return render_template("index.html", result = "Good") # locker_num이 rand_str의 앞부분과 일치하면 good (Flag 안) s+n+e+r / 148
# alphanumeric 26+10=36가지..............
else:
return render_template("index.html", result = "Wrong!")
이 부분 코드를 통해 하나씩 하나씩,, 찾아봤다..
사물함 번호: 36*4번
자물쇠 비밀번호: 100~200 사이 중에 한 수로 찾았음.
버퍼스위트로 푸는 방법이 더 좋아보임.