情况是这样的,我想用curl登陆腾讯拍拍,刚开始是提示验证码错误,现在验证码人手工输入,这个问题已经解决..
但是提交时又返回下面的信息:
HTTP/1.1 200 OK
Server: Tencent Login Server/2.0.0
Connection: Close
Content-Type: text/html<html> <head><meta http-equiv="Content-Language" content="zh-cn"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>登录失败</title> </head><script language="Javascript">alert("您输入的密码有误,请重试。");history.go(-1);</script></html>
用 httpwatch 跟踪后又发现,密码竟然是 js 加密后再传过去的,按理应该是POST方法,但是 httpwatch  显示的却是 get,很怪异, 现在的问题就是 找不到 它是 在哪进行加密后 再提交的,所以现在想求是否有这样的工具,不用加断点,触发事件时的可自动break,可能某个 firefox的插件可以实现这样的功能,可是没找到,或者不会用....求大侠指导下

解决方案 »

  1.   

    以前用过 js md5 加密,不过不太理想如果是在静态页面就加密了,就要搞到它的加密方法
      

  2.   

    不知道你是想怎样断点,你在提交事件里面查看一下,触发了什么函数,然后在这个函数里设置个断点不就可以了。
    firefox有个firebug,十分的好用。楼主可以参考一下。
      

  3.   


    function ajax_Submit() {
        if (!isLoadVC) {
            g_uin = 0
        }
        var D = true;
        var E = document.forms[0];
        var B = "";
        for (var A = 0; A < E.length; A++) {
            if (E[A].name == "fp" || E[A].type == "submit") {
                continue
            }
            if (E[A].name == "ptredirect") {
                g_ptredirect = E[A].value
            }
            if (E[A].name == "low_login_enable" && (!E[A].checked)) {
                D = false;
                continue
            }
            if (E[A].name == "low_login_hour" && (!D)) {
                continue
            }
            if (E[A].name == "webqq_type" && (!E[A].checked)) {
                continue
            }
            B += E[A].name;
            B += "=";
            if (t_appid == g_appid && E[A].name == "u" && E[A].value.indexOf("@") < 0 && isNaN(E[A].value)) {
                B += "@" + E[A].value + "&";
                continue
            }
            if (E[A].name == "p") {
                var F = "";
                F += E.verifycode.value;
                F = F.toUpperCase();
                B += md5(md5_3(E.p.value) + F)
            } else {
                if (E[A].name == "u1" || E[A].name == "ep") {
                    B += encodeURIComponent(E[A].value)
                } else {
                    B += E[A].value
                }
            }
            B += "&"
        }
        B += "fp=loginerroralert";
        var C = document.createElement("script");
        C.src = E.action + "?" + B;
        document.body.appendChild(C);
        return
    }
    以上是 已找到拍拍的 加密代码, 直接调用它的函数,传一个加密后的密码值,就成功登陆拍拍了
    呵呵,但是我提的问题还是没找到答案,firebug,不会profile代码,所以,长长一行,还是没用
      

  4.   

    只是将必要的表单元素加工成了url串,不是很复杂
    请你帖出他的登录表单
      

  5.   


    <form style="margin: 0px;" target="_self" onreset="return onFormReset(loginform)" onsubmit="if(!isAbleSubmit){return false;};return ptui_onLoginEx(loginform, 'paipai.com')" method="post" action="http://ptlogin2.paipai.com/login" name="loginform" autocomplete="off" id="loginform">
      <ul id="g_list">
        <li id="g_u"><span><u id="label_uin">QQ帐号:</u></span>
        <input type="text" onblur="try{ptui_onUserBlue('u', '#CCCCCC');}catch(e){}check();" onfocus="try{ptui_onUserFocus('u', '#000000')}catch(e){}" tabindex="1" style="ime-mode: disabled; color: rgb(0, 0, 0);" value="" name="u" id="u" class="inputstyle">  
    <label><a id="label_newreg" tabindex="7" href="http://id.qq.com?from=pt" target="_blank">注册新帐号</a></label></li> 
        <li id="g_p"><span><u id="label_pwd">QQ密码:</u></span>
          <input type="password" onfocus="check();" tabindex="2" maxlength="16" value="" name="p" id="p" class="inputstyle">       
          <label><a id="label_forget_pwd" onclick="onClickForgetPwd()" href="http://ptlogin2.qq.com/ptui_forgetpwd" tabindex="8" target="_blank">忘了密码?</a></label></li> 
        <li style="" id="verifyinput"><span for="code"><u id="label_vcode">验证码:</u></span>
        <input type="text" tabindex="3" maxlength="4" value="" id="verifycode" class="inputstyle" style="ime-mode: disabled;" name="verifycode"></li>
        <li style="" id="verifytip"><span>&nbsp;</span>
    <u id="label_vcode_tip">输入下图中的字符,不区分大小写</u></li>
        <li style="" id="verifyshow"><span for="pic">&nbsp;</span>        
    <img src="http://ptlogin2.paipai.com/getimage?aid=17000101&amp;r=0.031628039940362895" name="imgVerify" width="130" height="53" id="imgVerify">
         <label><a tabindex="6" id="changeimg_link" href="javascript:ptui_changeImg('paipai.com', 17000101, true);">看不清,换一张</a></label>
        </li> 
     
      </ul> 
      <div class="login_button">
     <input type="submit" id="login_button" class="btn" value="登 录" tabindex="5"></div>
    <div id="label_unable_tips" class="lineright"></div>
    <input type="hidden" value="17000101" name="aid">
    <input type="hidden" value="http://member.paipai.com/cgi-bin/ptlogin?loginfrom=18" name="u1">
    <input type="hidden" value="loginerroralert" name="fp">
    <input type="hidden" value="1" name="h">
    <input type="hidden" value="0" name="ptredirect">
    <input type="hidden" value="2052" name="ptlang"><input type="hidden" value="1" name="from_ui">
    <input type="hidden" value="" name="dumy">
    </form>