Yodlee:无法在getMFAResponseForSite(Captcha类型)中将图像代码转换为验证码 - C#

时间:2014-07-02 13:45:09

标签: captcha yodlee

通过“addSiteAccounts1”API添加MFA启用(验证码类型MFA)网站帐户后,我得到了图像代码的响应,我们要将其转换为验证码图像。我已检查过许多脚本进行转换,但没有结果。是否有任何简单的步骤来获取图像(在C#中)。 以下是MFA回复,

{
   "isMessageAvailable":true,
   "fieldInfo":{
      "responseFieldType":"text",
      "imageFieldType":"image",
      "image":[
         66,
         77,
         58,
         116,
         0,
         0,
         0,
         0,
         0,
         0,
         54,
         0,
         0,
         0,
         40,
         0,
         0,
         0,
         -91,
         0,
         0,
         0,
         45,
         0,
         0,
         0,
         1,
         0,
         32,
         0,
         0,
         0,
         0,
         0,
         4,
         116,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -5,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -9,
         -9,
         0,
         -1,
         -5,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -5,
         -1,
         0,
         -17,
         -17,
         -17,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -13,
         -9,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -9,
         -9,
         -9,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -17,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0,
         -1,
         -1,
         -1,
         0
      ],
      "minimumLength":-1,
      "maximumLength":-1,
      "displayString":"Please enter the text shown in the image"
   },
   "timeOutTime":99900,
   "itemId":10014925,
   "retry":false
}

提前致谢..

1 个答案:

答案 0 :(得分:0)

这里你得到的是字节数组中的图像,它作为响应中的字符串数组出现。 您需要将此字节数组转换为图像。几行代码可以帮助您。

public Image byteArrayToImage(byte[] byteArrayIn)
{
     MemoryStream ms = new MemoryStream(byteArrayIn);
     Image returnImage = Image.FromStream(ms);
     return returnImage;
}

此外,here是可以帮助您的链接。