测试Web应用程序是否存在跨站点脚本漏洞

来源:百度文库 编辑:神马文学网 时间:2024/04/29 20:08:12
今天因为要做接口的性能测试,所以录制了个web service的脚本。过程中有些教训,值得记录一下。

  录制完脚本,像往常一样,给脚本增加了手动关联的函数去获取接口的返回值,并没有用web service自带的去获取返回值。脚本如下:

   web_reg_save_param("returnCode",
        "LB=HTTP\/1.1",
        "RB=OK",
        "Ord=1",
        "NotFound=ERROR",
        LAST);

    web_service_call( "StepName=getDownloadKey_102",
        "SOAPMethod=MusicPaymentService.MusicPayment.getDownloadKey",
        "ResponseParam=response",
        "WSDL=http://192.168.104.51:28080/jboss-net/services/MusicPayment?wsdl",
        "UseWSDLCopy=1",
        "Snapshot=t1259034940.inf",
        BEGIN_ARGUMENTS,
        "xml:event=00000222222"
                "333333
{MSISDN}10.10.10."
                "10
"
                "0021010
"
                "123456789012345678
123456789012"
                "03
20"
                "{recieverNumber}"
                "
0000001024"
                "0020001"
                "
",
        END_ARGUMENTS,
        BEGIN_RESULT,
        END_RESULT,
        LAST);

    lr_log_message("returnCode is : %s",lr_eval_string ("{returnCode}"));

  回放的时候就出问题了,总是报“Warning: The string 'returnCode' with parameter delimiters is not a parameter.”的错误,日志输出也是“returnCode is :{returnCode}”。