有位js高手说通过js客户端即可完全实现验证,我让他给了个sample,大家来尝试绕过阿!~~~

zairwolfc 2007-01-16 11:16:50
http://shop10.seedit.com/1.htm

他这个的代码你们可以看到,实现的就是给http://shop10.seedit.com/ajaxserver/test.php 提交数字。

至于目标php程序,为了方便大家绕过,也写出来源代码了:

<?php
$inpObj = json_decode( $HTTP_RAW_POST_DATA );
if($inpObj->data){
echo "{redata:".$inpObj->data."}";
}
?>

看大家的本事。
...全文
1940 37 打赏 收藏 转发到动态 举报
写回复
用AI写文章
37 条回复
切换为时间正序
请发表友善的回复…
发表回复
iasky 2007-02-27
  • 打赏
  • 举报
回复
您要查看的网页可能已被删除、名称已被更改,或者暂时不可用。

--------------------------------------------------------------------------------

请尝试以下操作:

如果您已经在地址栏中输入该网页的地址,请确认其拼写正确。

打开 shop10.seedit.com 主页,然后查找指向您感兴趣信息的链接。
单击后退按钮,尝试其他链接。
单击搜索,寻找 Internet 上的信息。



HTTP 400 - 错误请求
Internet Explorer
wxcyz 2007-02-27
  • 打赏
  • 举报
回复
JS肯定可以绕过去。
zairwolfc 2007-01-17
  • 打赏
  • 举报
回复
Mistruster(弱智d) ( ) 信誉:120 Blog 2007-01-17 09:37:29 得分: 0


兰兰:
你这“信誉”怎么越来越低了

JS 怎么可能看不到呢,只要有就能看到


---------------
哈哈,不好意思,我也不知道。可能在灌水的帖子被删的缘故吧。
Mistruster 2007-01-17
  • 打赏
  • 举报
回复
装个 HttpWatch 什么都看到了
http://www.mistruster.com/soft/view_soft.php?id=782
Mistruster 2007-01-17
  • 打赏
  • 举报
回复
http://shop10.seedit.com/ajaxserver/rjs.php

-----------------------------

{ subm:function(){ re = /\d/; if( re.test($("data").value)){ alert("璇疯緭鍏ラ潪鏁板瓧瀛椾覆"); return false; } if( !$("chkcode").value ){ alert("璇疯緭鍏ラ獙璇佺爜"); return false; } ajax.sendStr = '{"data":"'+$("data").value+'","ccode":"'+$("chkcode").value+'"}'; ajax.url = "ajaxserver/test1.php"; ajax.actFunc = reData; ajaxRequest(); }, reData : function(){ if(ajax.reObj["err"]){ alert("楠岃瘉鐮侀敊璇?); return } if(ajax.reObj["redata"]){ alert("鏈嶅姟鍣ㄥ凡缁忔敹鍒版偍鎻愪氦鐨勬暟鎹細"+ajax.reObj["redata"]) } }}
Mistruster 2007-01-17
  • 打赏
  • 举报
回复
http://shop10.seedit.com/js/ajax.js

-------------------------------


function ajax(){
this.reObj = null
this.request = false;
this.sendStr = " "
this.url = ""
this.actFunc = false
this.regFuncs = new Array;
this.noAct = true;
this.pollSto = false
}
ajax =new ajax;
if (window.XMLHttpRequest) { // Mozilla, Safari,...
ajax.request = new XMLHttpRequest();
if (ajax.request.overrideMimeType) {
ajax.request.overrideMimeType('text/plain');
}
} else if (window.ActiveXObject) { // IE
try {
ajax.request = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try { ajax.request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {}
}
}else{
alert("XMLHTTP鍒濆鍖栧け璐?);
}

function ajaxRequest() {
ajax.request.open('POST', ajax.url, true);
ajax.request.onreadystatechange = getRequest;
ajax.request.send(ajax.sendStr);
}

function getRequest(){
if (ajax.request.readyState == 4) {
if (ajax.request.status == 200) {
//alert(ajax.request.responseText)
if(ajax.request.responseText)
ajax.reObj = eval("("+ajax.request.responseText+")");
try{ if(ajax.regFuncs.length>0) ajax.regFuncs.shift() }catch(e){}
if( ajax.actFunc ) ajax.actFunc.call()
ajax.noAct = true;
}
}
}

function regFunc(func){
ajax.regFuncs.push(func)
if( !ajax.pollSto ) pollFunc()
}

function pollFunc(){
len = ajax.regFuncs.length
if(len<1){
clearTimeout(ajax.pollSto)
ajax.pollSto = false
return false
}else if(len>0 && ajax.noAct){
ajax.noAct = false;
ajax.regFuncs[0].call()
}
ajax.pollSto = setTimeout("pollFunc()",500)
}

function $(id){
return document.getElementById(id);
}
function $n(name){
return document.getElementsByName(name)[0];
}
function $t(tagName){
return document.getElementsByTagName(tagName);
}

function get_get(){
thisUrl = window.location.href;
isPHP = thisUrl.search(/\.php/ig);
if(isPHP>0){
querystr = thisUrl.split("?")
if(querystr[1]){
GETs = querystr[1].split("&")
GET =new Array()
for(i=0;i<GETs.length;i++){
tmp_arr = GETs[i].split("=")
key=tmp_arr[0]
GET[key] = tmp_arr[1]
}
}
}else{
GETs = thisUrl.split("-")
gLen = GETs.length
GETs[gLen-1] = GETs[gLen-1].replace(/^(.+)\.html?[^\.]*$/gi,"$1");
GET =new Array()
for(i=1;i<gLen;i++){
key = GETs[i].replace(/^([^\d]+)\d*$/g,"$1")
GET[key] = GETs[i].replace(/^[^\d]+(\d*)$/g,"$1")
}
}
}
get_get()

function isLogin(){
var Login = $("login");
var Loged = $("loged");
if(getCookie("seedeid")){
Loged.style.display="block"
Login.style.display="none"
$("loguser").innerHTML = decodeURI(getCookie("seeduser"))
}else{
Loged.style.display="none"
Login.style.display="block"
}

}

function CheckLogin(){
errAlt = {
0 : "",
1 : "楠岃瘉鐮侀敊璇紝鐧婚檰澶辫触",
2 : "璇ョ敤鎴峰凡鏆傛椂琚攣瀹?鏃犳硶鐧婚檰锛?,
3 : "瀵嗙爜閿欒锛岃閲嶆柊杈撳叆锛?,
4 : "鐢ㄦ埛鍚嶉敊璇垨鏃犳鐢ㄦ埛鍚嶏紒"
}
reStr = '{'
$("chkcode").value = $("chkcode").value.cn2num()
arr1 = [$("username"),$("password"),$("chkcode")]
arr2 = ["鐢ㄦ埛鍚?,"瀵嗙爜","楠岃瘉鐮?]
for(i in arr1){
if(arr1[i].value==""){
alert("璇疯緭鍏?+arr2[i]+"锛?); arr1[i].focus(); return false;
}
reStr += '"' + arr1[i].id + '":"' + arr1[i].value + '",'
}
ajax.sendStr = reStr.substr(0,reStr.length-1) + '}'

ajax.url = "ajaxserver/login.php";
ajax.actFunc = loginAct
ajaxRequest()
return false
}

function loginAct(){
if(ajax.reObj["islogin"]==1){
Seeduid = ajax.reObj["Seeduid"]
isLogin()
}
eCode = ajax.reObj["errCode"]
if(eCode>0) alert( errAlt[eCode])
return false
}

function logout(){
Seeduid = 0
setCookie("seeduser","","seedit.com")
setCookie("seeduid","","seedit.com")
setCookie("seedeid","","seedit.com")
setCookie("seedgid","","seedit.com");
setCookie("siller","","seedit.com");
isLogin();
}

function chgChkcode(){
var d = new Date();
var t = d.getTime();
var ccimg = $("chkCodeimg")
ccimg.src = "includes/chk_num.php?t="+t
try{
ccimg1 = $("chkCodeimg1")
ccimg1.src = "includes/chk_num.php?t="+t
ccimg.src = ccimg1.src
}catch(e){}
}

function getCookie(cname){
try{
var re = eval("/"+cname+"=([^;]+)/ig")
return re.exec(document.cookie)[1]
}catch(e){ return false }
}

function setCookie(name,value,domain){
domainStr = (domain) ? "; domain=" + domain : ""
var d =new Date
d.setDate( d.getDate() + 7 )
document.cookie = name + "=" + value + "; expires=" + d.toGMTString() + "; path=/" + domainStr
}


String.prototype.cn2num=function(){
var str = this.toString()
var slen = str.length
var cns = { "锛?:0, "锛?:1, "锛?:2, "锛?:3, "锛?:4, "锛?:5, "锛?:6, "锛?:7, "锛?:8, "锛?:9 }
var re =new RegExp
re.compile("([锛愶紤锛掞紦锛旓紩锛栵紬锛橈紮])")
for( i=0; i<=slen; i++ ){
var chr = str.charAt(i);
if(chr.match(re))
str = str.replace(chr,cns[chr]);
}
return str;
}

function setSch(){
oInput=$("kwd");
ooInput = $('ser_b');
oInput.value = Default_text = "<-- 鍦ㄦ閿叆鎮ㄨ鎼滅储鐨勫晢鍝佸悕绉版垨鑰匢D";
oInput.className = "onblur"
oInput.onfocus = schFocus
oInput.onblur = schBlur
ooInput.onmouseover = oInput.onmouseover = function(){ this.style.borderColor = "9ECC00" }
ooInput.onmouseout = oInput.onmouseout = function(){ this.style.borderColor = "ACD1D1" }
}


function doSearch() {
if ( oInput.value == Default_text) return false;
}

function schFocus() {
oInput.className = "onfocus"
var val = oInput.value;
if (val == Default_text) oInput.value = ''; //remove the default text if it is present
}

function schBlur() {
var val = oInput.value;
if ( !val ) oInput.value = Default_text;
oInput.className = ( oInput.value == Default_text ) ? "onblur" : "onfocus"
}

function Myriji(){
location = "http://riji.seedit.com/blog-id"+Seeduid+".html"
}

Mistruster 2007-01-17
  • 打赏
  • 举报
回复
兰兰:
你这“信誉”怎么越来越低了

JS 怎么可能看不到呢,只要有就能看到
caotian2000 2007-01-17
  • 打赏
  • 举报
回复
这句经典,60年代的时候还可以,叫那些黑客别绕过.哈哈
Gdj 2007-01-17
  • 打赏
  • 举报
回复
js认证,是君子专用的。主要靠自觉。要是用户有想绕过的想法,那js就不可能认证了。早几十年的中国还有可能普及的……
xmzhh2009 2007-01-16
  • 打赏
  • 举报
回复
只是JS脚本验证?服务器端就不验证了?如果只用JS验证,100%不可靠!等K吧……
Apq001 2007-01-16
  • 打赏
  • 举报
回复
还JS高手,JS能做什么,JS做不了什么,他究竟懂不懂?
tony-杨 2007-01-16
  • 打赏
  • 举报
回复
……
没用过JSON也没看过

不知道模拟提交后服务器端怎么实现
gu1dai 2007-01-16
  • 打赏
  • 举报
回复
<?php
//require_once("iecho.php");

$host = "localhost"; $file = "/test/t2.php";
$host = "shop10.seedit.com"; $file = "/ajaxserver/test.php";
$fp = fsockopen( $host , 80, $errno, $errstr, 1);

if (!$fp) {
echo "$errstr ($errno)<br />\n";
} else {
$out = "POST $file HTTP/1.1\r\n".
"Host: $host\r\n".
"Content-Length: 13\r\n".
"Connection: Close\r\n".
"Cache-Control: no-cache\r\n\r\n".
"{\"data\":\"fs\"}";
fwrite($fp, $out);
while (!feof($fp))
{
echo fgets($fp, 128);
}
fclose($fp);
}

?>
gu1dai 2007-01-16
  • 打赏
  • 举报
回复
js验证是绝对不安全的,我不想再讨论这个问题了。
helloyou0 2007-01-16
  • 打赏
  • 举报
回复
现在碰到障碍的是ajax不能跨域提交

网上找到这句目前不能在ie和firefox里运行成功
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");

----------------

而且这个并不能说明js验证是安全的。
在网络上完全可能中途截取报文并转发,如果中途篡改报文内容,js验证无论如何是防止不了的,
需要找网络高手来绕~~


z109876543210 2007-01-16
  • 打赏
  • 举报
回复
如果只单纯JS,禁用了JS, 表单也会提交啊
phpchris 2007-01-16
  • 打赏
  • 举报
回复
路过! showing!
hymxtang 2007-01-16
  • 打赏
  • 举报
回复
学习~~
YT7260 2007-01-16
  • 打赏
  • 举报
回复
ajax提交到服务端验证了,这已经不是纯客户端验证了
zairwolfc 2007-01-16
  • 打赏
  • 举报
回复
php改成这样了:

<?php
$inpObj = json_decode( $HTTP_RAW_POST_DATA );
if($inpObj->data){
echo "{redata:'".$inpObj->data."'}";
}
?>
加载更多回复(17)

21,887

社区成员

发帖
与我相关
我的任务
社区描述
从PHP安装配置,PHP入门,PHP基础到PHP应用
社区管理员
  • 基础编程社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧