ITV体验软件

来自IPTV爱好者
跳转至: 导航搜索

简介

iTV体验软件是苏州电信开发的,在PC机上体验iTV的软件。该软件的下载页面为:http://www.szitv.net/itv/xiazai.html

该软件使用专门的演示帐号,EPG模板与普通的帐号有差别。

软件分析

  • 配置文件config.ini中的几个关键项目:

1、webAuth=http://58.223.251.139:8298/auth

江苏电信iTV鉴权服务器的鉴权URL。

2、webIndex=http://58.223.251.175:8080/iptvepg/function/index.jsp

这是EPG服务器的入口,由鉴权服务器返回,软件写该配置项。

3、webMain=http://58.223.107.134:8080/iptvepg/frame86/portal.jsp

这是EPG服务器的首页,由EPG服务器返回,软件写入该配置项。

4、PCO=gwpIVj26QoxgpfurhHvhkVsqa7yOK1u8unirUjuLzSbTRgz25QXRyw==

明文为:589F35F8-BFEBFBFF00020655-0478F2A9

5、WSDL=JpI1jxRX7EU1iMemUK2kd71xkURxQffkNOM+2FKvXUnP35FAG4xWDCnTHaQIfk8D

明文为:http://www.szitv.net/itv20Free/iTV_Account.asmx

这是查询iTV演示帐号的webservice的URL。在查询帐号前,软件会把当前机器的操作系统类型、软件版本号、网卡MAC地址、IP地址等信息加密后发送到webservice。例如:||Windows XP|2.0.0.1016|1A:2B:3C:4D:5E:6F|192.168.8.100,192.168.29.1,192.168.70.1|2||登录|

6、DYCSY=06KxpqyIJC8eoVVqXu7xzKvkF5SOaRK5

明文为:0001-1-1 0:00:00

  • 软件模仿的机顶盒STBID参数为:381001000000004000001A2B3C4D5E6F,MAC地址:1A:2B:3C:4D:5E:6F,IP地址:192.168.1.12
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="GetA2">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pAccount" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetA2Response">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetA2Result" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Record2">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pAccount" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Record2Response">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="Record2Result" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetA2SoapIn">
    <wsdl:part name="parameters" element="tns:GetA2" />
  </wsdl:message>
  <wsdl:message name="GetA2SoapOut">
    <wsdl:part name="parameters" element="tns:GetA2Response" />
  </wsdl:message>
  <wsdl:message name="Record2SoapIn">
    <wsdl:part name="parameters" element="tns:Record2" />
  </wsdl:message>
  <wsdl:message name="Record2SoapOut">
    <wsdl:part name="parameters" element="tns:Record2Response" />
  </wsdl:message>
  <wsdl:portType name="iTV_AccountSoap">
    <wsdl:operation name="GetA2">
      <wsdl:input message="tns:GetA2SoapIn" />
      <wsdl:output message="tns:GetA2SoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <wsdl:input message="tns:Record2SoapIn" />
      <wsdl:output message="tns:Record2SoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="iTV_AccountSoap" type="tns:iTV_AccountSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetA2">
      <soap:operation soapAction="http://tempuri.org/GetA2" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <soap:operation soapAction="http://tempuri.org/Record2" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="iTV_AccountSoap12" type="tns:iTV_AccountSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetA2">
      <soap12:operation soapAction="http://tempuri.org/GetA2" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <soap12:operation soapAction="http://tempuri.org/Record2" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="iTV_Account">
    <wsdl:port name="iTV_AccountSoap" binding="tns:iTV_AccountSoap">
      <soap:address location="http://www.szitv.net/itv20Free/iTV_Account.asmx" />
    </wsdl:port>
    <wsdl:port name="iTV_AccountSoap12" binding="tns:iTV_AccountSoap12">
      <soap12:address location="http://www.szitv.net/itv20Free/iTV_Account.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>
  • WebService接口调用方式:(pAccount内容是将这样的信息加密“||Windows XP|2.0.0.1016|1A:2B:3C:4D:5E:6F|192.168.8.100,192.168.29.1,192.168.70.1|2||登录|”)
POST /itv20Free/iTV_Account.asmx HTTP/1.1
Host: www.szitv.net
Content-Type: text/xml; charset=utf-8
Content-Length: ***
SOAPAction: "http://tempuri.org/GetA2"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <GetA2 xmlns="http://tempuri.org/">
      <pAccount>****************************************************************************</pAccount>
    </GetA2>
  </soap:Body>
</soap:Envelope>
  • WebService接口调用返回结果:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body><GetA2Response xmlns="http://tempuri.org/">
<GetA2Result>JNN0gZ0NvgzKCQB5nbv05nrmWRuik0+KoFf+NutPoUs=</GetA2Result>
</GetA2Response>
</soap:Body>
</soap:Envelope>

软件功能修改

  • 修改获取帐号的WebService的URL。由于软件的配置文件中的URL参数是加密的,假定自己的WebService是通过PHP来实现的,URL是:http://localhost/itv20Free/iTV_Account.php 使用下面的Java代码把URL经DES-CBC加密,得到的加密字符串“fsOIJNUvmR4vjWOTodAhjvn0+UsSBMgpWP4pohdAK8a+vdbrk4w4bqKz9C++P4qV”,替换config.ini中的“WSDL=”后面的内容。
  • 构造自己的iTV帐号加密字符串。假定自己的iTV帐号是:051288888888,密码是:87654321,则把上面Java代码中的DecryptStr = 后的字符串内容改为:

"0|051288888888|87654321"; 运行后的结果为:y+ldxlWN4h4QU0eKcEMbp4mqj1heTSkP 这串加密字符将通过WebService返回给软件,也就是出现在返回的XML中:<GetA2Result>y+ldxlWN4h4QU0eKcEMbp4mqj1heTSkP</GetA2Result>

  • 构造WebService。简单的方法是在本机安装Apache和PHP,在htdocs目录下建一个子目录“/itv20Free”,在该目录下新建文件“iTV_Account.php”,内容如下:
<?php
	if ($_SERVER["QUERY_STRING"] == "WSDL")
	{
		header("Content-Type: text/xml");
		echo '<?xml version="1.0" encoding="utf-8"?>';
?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="GetA2">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pAccount" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="GetA2Response">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetA2Result" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Record2">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="pAccount" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Record2Response">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="Record2Result" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="GetA2SoapIn">
    <wsdl:part name="parameters" element="tns:GetA2" />
  </wsdl:message>
  <wsdl:message name="GetA2SoapOut">
    <wsdl:part name="parameters" element="tns:GetA2Response" />
  </wsdl:message>
  <wsdl:message name="Record2SoapIn">
    <wsdl:part name="parameters" element="tns:Record2" />
  </wsdl:message>
  <wsdl:message name="Record2SoapOut">
    <wsdl:part name="parameters" element="tns:Record2Response" />
  </wsdl:message>
  <wsdl:portType name="iTV_AccountSoap">
    <wsdl:operation name="GetA2">
      <wsdl:input message="tns:GetA2SoapIn" />
      <wsdl:output message="tns:GetA2SoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <wsdl:input message="tns:Record2SoapIn" />
      <wsdl:output message="tns:Record2SoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="iTV_AccountSoap" type="tns:iTV_AccountSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetA2">
      <soap:operation soapAction="http://tempuri.org/GetA2" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <soap:operation soapAction="http://tempuri.org/Record2" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="iTV_AccountSoap12" type="tns:iTV_AccountSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="GetA2">
      <soap12:operation soapAction="http://tempuri.org/GetA2" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Record2">
      <soap12:operation soapAction="http://tempuri.org/Record2" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="iTV_Account">
    <wsdl:port name="iTV_AccountSoap" binding="tns:iTV_AccountSoap">
      <soap:address location="http://localhost/itv20Free/iTV_Account.php" />
    </wsdl:port>
    <wsdl:port name="iTV_AccountSoap12" binding="tns:iTV_AccountSoap12">
      <soap12:address location="http://localhost/itv20Free/iTV_Account.php" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

<?php
		exit;
	}
	header("Content-Type: text/xml");
	echo '<?xml version="1.0" encoding="utf-8"?>';
?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body><GetA2Response xmlns="http://tempuri.org/">
<GetA2Result>y+ldxlWN4h4QU0eKcEMbp4mqj1heTSkP</GetA2Result>
</GetA2Response>
</soap:Body>
</soap:Envelope>