권장 : 쿠키 방지 스푸핑 취약점 (VBS JS 구현) 1. 공격 쿠키 원칙 스푸핑은 주로 현재 네트워크에 쿠키에 사용자 로그인 정보를 저장하는 안전하지 않은 관행을 사용합니다. SQL 주입 취약점 및 RDQUO와 같은 취약점에 비해 공격 방법은 상대적으로 어렵습니다.
다음은 인용 된 내용입니다. <%'' ``호출 예제 'dim int_rpp, int_start, int_shownumberlink_, str_nonlinkcolor_, tof_, top10_, top1_, top1_, ton1_, ton10_, tol_, showmorepagego_type_, cpageno 'int_rpp = 2'페이지 당 디스플레이 수를 설정합니다 'int_shownumberLink_ = 8'숫자 이름 표시 번호입니다 'showmorepagego_type_ = 1'드롭 다운 메뉴 또는 입력 값 점프입니까? 여러 통화가 호출 될 때 1 만 선택할 수 있습니다. 'str_nonlinkcolor _ =#999999'비 호트 링크 색상 'tof _ = <font face = webdings> 9 </font>'홈 'top10_ = <font face = webdings> 7 </font>'에서 'top1_ = <font face = webdings> 3 </font>'이전 'ton1_ = <font face = webdings> 4 </font>'다음 'ton10_ = <font face = webdings> 8 </font>'다음 10 'tol _ = <font face = webdings> : </font>'마지막 페이지 '============================================================== '이 코드는 vclass_rs.open과 for loop 사이에 있어야합니다. 'set vclass_rs = createobject (g_fs_rs) 'vclass_rs.open this_fun_sql, user_conn, 1,1 'vclass_rs.eof가 아니라면 'vclass_rs.pagesize = int_rpp 'cpageno = nosqlhack (request.querystring (page)) 'cpageno =이면 cpageno = 1입니다 'isnumeric (cpageno)이 아니라면 cpageno = 1 'cpageno = clng (cpageno) 'cpageno <= 0이면 cpageno = 1 'cpageno> vclass_rs.pagecount 인 경우 cpageno = vclass_rs.pagecount 'vclass_rs.absolutepage = cpageno 'int_start = 1 to Int_rpp의 경우 '' '' '데이터를 표시하려면 루프 바디를 추가하십시오 '' '' 'vclass_rs.movenext 'vclass_rs.eof 또는 vclass_rs.bof 인 경우 종료하십시오 ' 다음 '끝 If '============================================================== '응답 <p> & fpagecount (vclass_rs, int_shownumberlink_, str_nonlinkcolor_, tof_, top10_, top1_, top1_, ton10_, tol_, showmorepagego_type_, cpageno) '' '' '************************************************************* '목적 : 페이지 매김의 페이지 매개 변수를 유지하십시오 '제출 쿼리의 일관성 '입력 : MoveParam : Pagination 매개 변수 'removelist : 제거 할 매개 변수 '반환 : Pagination URL '************************************************************* 기능 pageurl (MoveParam, Removelist) 희미한 strname Dim Keepurl, Keepform, KeepMove removelist = removelist &, & movparam keepform = request.form의 각 strname에 대해 '판사는 양식 매개 변수로 값을 제출하고 빈 값을 제출합니다 instrev (& removelist & ,, & strname &, -1, 1)> 0이 아닌 경우, request.form (strname) <> keepform = recoyform &&& strname & = & server.urlencode (request.form (strname)) 끝 If removelist = removelist &, & strname 다음 requurl = request.querystring의 각 strname에 대해 그렇지 않은 경우 (Instrev (& removelist & ,, & strname &, -1, 1)> 0) keepurl = keepurl & & & strname & = & server.urlencode (request.querystring (strname)) 끝 If 다음 KeepMove = Keepform & KeepUrl if (keepmove <>) 그러면 keepmove = right (keepMove, Len (KeepMove) -1) KeepMove = server.htmlencode (KeepMove) & & 끝 If 'pageurl = replace (request.servervariables (url),/search.asp,/search.html) &? & KeepMove & MoveParam & = pageurl =? & KeepMove & MoveParam & = 엔드 기능 함수 fpagecount (page_rs, showingumberLink_, nonlinkcolor_, tof_, top10_, top1_, top1_, ton1_, ton10_, tol_, showmorepagego_type_, page) this_func_get_html_, topage_, p_, sp2_, i, tpagecount dim Dim NaviLength, STARTPAGE, ENDPAGE this_func_get_html_ = : i = 1 naviLength = ShowumberLink__ if isempty (showmorepagego_type_)이면 showmorepagego_type_ = 1 tpagecount = page_rs.pagecount tpagecount <1 인 경우 tpagecount = 1입니다 page_rs.eof가 아닌 경우 page_rs.bof topage_ = pageurl (페이지, 제출, gettype, no-cache, _) Page = 1 인 경우 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = home> & tof _ & </font> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <a href = & topage_ & 1 title = home> & tof_ & vbnewline 끝 If Page <NaviLength라면 startpage = 1 또 다른 startPage = fix (page / navilegrength) * naviLength 끝 If 엔드 페이지 = STARTPAGE NAVILENGTH-1 EndPage> tpageCount 인 경우 endPage = TPageCount입니다 STARTPAGE> 1 인 경우 this_func_get_html_ = this_func_get_html_ & <a href = & topage_ & page -navilength & title = & int_shownumberlink_ & page> & top10_ & </a> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = & int_shownumberlink_ & page> & top10 _ & </font> & vbnewline 끝 If Page <> 1과 Page <> 0이면 this_func_get_html_ = this_func_get_html_ & <a href = & topage _ & (page-1) & title = previous page> & top1_ & </a> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = previous page> & top1 _ & </font> & vbnewline 끝 If i = 엔드 페이지에 대한 시작 페이지 i = 페이지 인 경우 this_func_get_html_ = this_func_get_html_ & <b> & i & </b> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <a href = & topage_ & i &> & i & </a> & vbnewline 끝 If i <> tpagecount이면 this_func_get_html_ = this_func_get_html_ & vbnewline 다음 페이지 <> page_rs.pagecount 및 page <> 0 인 경우 this_func_get_html_ = this_func_get_html_ & <a href = & topage _ & (페이지 1) & title = next page> & ton1_ & </a> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = next page> & ton1 _ & </font> & vbnewline 끝 If endpage <tpagecount라면 this_func_get_html_ = this_func_get_html_ & <a href = & topage_ & page navilength & title = & int_shownumberlink_ & page> & ton10_ & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = & int_shownumberlink_ & page> & ton10 _ & vbnewline 끝 If page_rs.pagecount <> page 인 경우 this_func_get_html_ = this_func_get_html_ & <a href = & topage_ & page_rs.pagecount & title = last page> & tol_ & </a> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & <font color = & nonlinkcolor_ & title = last page> & tol _ & </font> & vbnewline 끝 If showmorepagego_type_ = 1 인 경우 dim show_page_i show_page_i = 페이지 1 show_page_i> tpagecount 인 경우 show_page_i = 1 this_func_get_html_ = this_func_get_html_ & <입력 유형 = 텍스트 크기 = 4 maxlength = 10 name = func_input_page onmouseover = this.focus (); onfocus = this.value = '& show_page_i &'; onkeyup = value = value.replace (/[^1-9]/g, '') onbeforepaste = clipboarddata.setData ( 'text', clipboarddata.getData ( 'text'). replace (/[^1-9]/g, ''))> & vbnewline _. & <입력 유형 = 버튼 값 = go onmouseOver = func_input_page.focus (); onclick = javaScript : var js_jumpvalue; js_jumpvalue = document.all.l.func_input_page.value; if (js_jumpvalue == ''! isnan (js_jumpvalue)) location = '& topage_ &'js_jumpvalue; else location = '& topage_ & 1';> & vbnewline 또 다른 this_func_get_html_ = this_func_get_html_ & j i = 1에서 tpagecount의 경우 this_func_get_html_ = this_func_get_html_ & <옵션 값 = & topage_ & i if page = i this_func_get_html_ = this_func_get_html_ & selected style = 'color :#0000ff' this_func_get_html_ = this_func_get_html_ &> & cstr (i) & page </옵션> & vbnewline 다음 this_func_get_html_ = this_func_get_html_ & </select> & vbnewline 끝 If this_func_get_html_ = this_func_get_html_ & p_ & sp2 _ && nbsp; <b> & page_rs.pagesize & </b> 페이지 당 페이지 당 : <b> <span class = tx> & sp2_ & page & </spagecount & </b> page, <b> <b> page. id = 'RecordCount'> & sp2_ & page_rs.recordCount & </b> 레코드. 또 다른 '기록 없음 끝 If fpagecount = this_func_get_html_ 엔드 기능 %> |
공유 : ASP로 실제 IP 주소를 찾는 방법 우리 모두 알다시피, IP 주소를 얻는 방법은 다음과 같은 참조 된 내용입니다. <%= request.servervaribles (remote_addr)%>