d0r1

webhacking 14 본문

webhacking

webhacking 14

d0r1 2023. 7. 19. 21:39
<html>
<head>
<title>Challenge 14</title>
<style type="text/css">
body { background:black; color:white; font-size:10pt; }
</style>
</head>
<body>
<br><br>
<form name=pw onsubmit=ck()><input type=text name=input_pwd><input type=button value="check" onclick=ck()></form>
<script>
function ck(){
  var ul=document.URL;
  ul=ul.indexOf(".kr");
  ul=ul*30;
  if(ul==pw.input_pwd.value) { location.href="?"+ul*pw.input_pwd.value; }
  else { alert("Wrong"); }
  return false;
}
</script>
</body>
</html>

 

>exploit code

url = 'https://webhacking.kr/challenge/js-1/'

ul = url.index('.kr') * 30

path = ul * ul
print(ul)

print(f"[+] real path : {url}?{path}")s

 

'webhacking' 카테고리의 다른 글

[webhacking.kr] old-36  (0) 2023.08.29
[webhacking.kr] old-10  (0) 2023.08.29
webhacking 34  (0) 2023.07.19
webhacking 32  (0) 2023.07.19
[webhacking] old-18  (0) 2023.05.23