51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

手机号码,快捷登录

查看: 2671|回复: 0
打印 上一主题 下一主题

[原创] 如何在http response 的javascript 中做关联

[复制链接]
  • TA的每日心情
    无聊
    2015-8-13 05:45
  • 签到天数: 2 天

    连续签到: 2 天

    [LV.1]测试小兵

    跳转到指定楼层
    1#
    发表于 2009-6-11 16:21:07 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
    我现在要在http response的javascripts 中抓取下列函数中的"Gauss-a19d1a92-7a67-4c9f-90d7-a9d5e97459e9-2009-06-11_15%3a07%3a26.441"好象web_reg_save_para找不到,
    我是用web_reg_save_param("ltvalue", "LB=login2.asp?lt=", "RB=&service=", "Search=All",LAST);我理解web_reg_save_param好像只能在html response 中寻找字符串.

    function Rdirect()
                            {
                                var path    =   "http://www.sda.com/login2.asp?lt=Gauss-a19d1a92-7a67-4c9f-90d7-a9d5e97459e9-2009-06-11_15%3a07%3a26.441&service=http%3a%2f%2fwww.sdo.com%2fIndexIframeLogin.asp%3fcas%3d1";

    ****** Request Header For Transaction With Id 357 ******
    GET /images/greencard.gif HTTP/1.1
    Accept: */*
    Referer: http://www.sdo.com/
    Accept-Language: zh-cn
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)
    Host: www.sdo.com
    Connection: Keep-Alive
    Cookie: ASPSESSIONIDASRASDDT=ECKGLKPDPCFJPPHELFIAEOMK; refererURL=http%253A%2F%2Fwww%2Esdo%2Ecom%2FIndexIframeLogin%2Easp


    $$$$$$ Request Header For Transaction With Id 357 Ended $$$$$$

    ****** Response Header For Transaction With Id 357 ******
    HTTP/1.1 200 OK
    Server: sdo
    Date: Thu, 11 Jun 2009 07:07:26 GMT
    Content-Type: image/gif
    Connection: keep-alive
    Cache-Control: max-age=1296000
    Via: www3
    Content-Length: 328
    Last-Modified: Mon, 01 Dec 2008 14:21:38 GMT
    Accept-Ranges: bytes


    $$$$$$ Response Header For Transaction With Id 357 Ended $$$$$$

    ****** Response Body For Transaction With Id 357 ******
    GIF89a:\x00\x0C\x00\xB3\x0C\x00亢\x9F.\x7F9_\x7FD凡斳掌F|;黥\xF10~9 {\x00\x00\x00\xFF\xFF\xFF\x1C\x85<\xFF\xFF\xFF\x00\x00\x00\x00\x00\x00\x00\x00\x00!\xFF\x0BNETSCAPE2.0\x03\x01\x00\x00\x00!\xF9\x04\x05d\x00\x0C\x00,\x00\x00\x00\x00:\x00\x0C\x00\x00\x04\x80\x10擡8雖\x0BP \x18ha        VЗ`'W\x05嬷\xA6+闸祏籏L\xD64跩\x95!r|E\xD5,凨r\x10\x06俙懆&r,\xE00G\x8B)K\x17兟娞*吽\x1F\x87\x00\x02PK:\xDE3忤\x14\x01\x000\x05U眗Zu:[L亙.e凪KDqiG%\x07Nhx哬<\x14\x07&\x03#櫉\xA0\x18\x01\x03&\x11\x00!\xF9\x04\x05d\x00\x0C\x00,\x02\x00\x01\x00-\x00
    \x00\x00\x04MpIイ]\x14觸\xBB\xFF荻]釺Y湒\x8E\x1Az畷X猣澩*腩.缜繲\x0F'育j箵i&銘^\xD0\x10瓻\xFD        a糴慓榔朽誟\x04\xB9?\x11\x00;
    $$$$$$ Response Body For Transaction With Id 357 Ended $$$$$$

    ****** Start Log Message ******

    Start Frames Hierarchy Tree Dump
    /cas/login?service=http%3a%2f%2fibw.sdo.com%2fflash%2flogin%2fWidgetUserLoginPage.aspx
    Form: name=Form1 action=login.aspx?service=http%3a%2f%2fibw.sdo.com%2fflash%2flogin%2fWidgetUserLoginPage.aspx
    End Frames Hierarchy Tree Dump

    $$$$$$ End Log Message $$$$$$

    ****** Request Header For Transaction With Id 358 ******
    GET /cas/login?service=http://www.sdo.com/IndexIframeLogin.asp HTTP/1.1
    Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
    Referer: http://www.sdo.com/
    Accept-Language: zh-cn
    UA-CPU: x86
    Accept-Encoding: gzip, deflate
    User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)
    Cookie: refererURL=http%253A%2F%2Fwww%2Esdo%2Ecom%2FIndexIframeLogin%2Easp
    Connection: Keep-Alive
    Host: lt.cas.sdo.com:8171


    $$$$$$ Request Header For Transaction With Id 358 Ended $$$$$$

    ****** Response Header For Transaction With Id 358 ******
    HTTP/1.1 200 OK
    Date: Thu, 11 Jun 2009 07:07:26 GMT
    Server: Microsoft-IIS/6.0
    X-Powered-By: ASP.NET
    P3P: CP=CAO PSA OUR
    Cache-Control: no-cache
    Via: Gauss
    X-AspNet-Version: 2.0.50727
    Set-Cookie: CAS_LOGIN_STATE=0; domain=sdo.com; expires=Wed, 10-Jun-2009 07:07:26 GMT; path=/
    Set-Cookie: SDO_SDID=0; domain=sdo.com; expires=Wed, 10-Jun-2009 07:07:26 GMT; path=/
    Cache-Control: private
    Content-Type: text/html; charset=gb2312
    Content-Length: 1460


    $$$$$$ Response Header For Transaction With Id 358 Ended $$$$$$

    ****** Response Body For Transaction With Id 358 ******


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
            <HEAD>
                    <title>Login</title>
                    <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
                    <meta name="CODE_LANGUAGE" Content="C#">
                    <meta name="vs_defaultClientScript" content="JavaScript">
                    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
                   
                   
                   
                    <script language="javascript">
                            function Rdirect()
                            {
                                var path    =   "http://www.sdo.com/login2.asp?lt=Gauss-a19d1a92-7a67-4c9f-90d7-a9d5e97459e9-2009-06-11_15%3a07%3a26.441&service=http%3a%2f%2fwww.sdo.com%2fIndexIframeLogin.asp%3fcas%3d1";
                                if (0 < path.length)
                                    location.href = path;
                                else
                                    location.href = "http://www.sdo.com/login2.asp?lt=Gauss-74c4ebbd-75d3-4537-bfd5-e9fd9fd7f92c-2009-06-11_15:07:26.441&error=8|ЧUrl";
                                    
                                    //location.replace("http://www.sdo.com/login2.asp?lt=Gauss-a19d1a92-7a67-4c9f-90d7-a9d5e97459e9-2009-06-11_15%3a07%3a26.441&service=http%3a%2f%2fwww.sdo.com%2fIndexIframeLogin.asp%3fcas%3d1");
                            }
                    </script>
                   
            </HEAD>
            <body MS_POSITIONING="GridLayout" onload="Rdirect()";>
                    <form name="Form1" method="post" action="login.aspx?service=http%3a%2f%2fwww.sdo.com%2fIndexIframeLogin.asp" id="Form1">
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTk3MjI4NTA5MmRkjp/FGCefEtp5ngvCD+XSmGBxJOI=" />

                           
                           
                    </form>
            </body>
    </HTML>

    [ 本帖最后由 huangsheng2 于 2009-6-11 16:22 编辑 ]
    分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
    收藏收藏
    回复

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-11-28 08:05 , Processed in 0.065984 second(s), 28 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表