B700V2Y登录EPG服务器过程

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

鉴权过程

机顶盒向认证服务器发起登录请求:

访问URL:http://58.223.251.139:8298/auth?UserID=0251234567890&Action=Login

GET /auth?UserID=0251234567890&Action=Login HTTP/1.1
Host: 58.223.251.139:8298
Accept: */*
Referer: file:///work/transition.htm
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=gb2312
Content-Length: 706
Date: Tue, 16 Aug 2011 23:52:19 GMT

<html><head><script language='javascript'>
function DoAuth() {
document.authform.Authenticator.value=Authentication.CTCGetAuthInfo('CVGFv5lKe37FDC2BHSFl5R6xb04slkCP');
document.authform.AccessMethod.value=Authentication.CTCGetConfig('AccessMethod');
document.authform.AccessUserName.value=Authentication.CTCGetConfig('AccessUserName');
document.authform.submit();}
</script>
</head>
<body bgcolor='#000000' onload=DoAuth()>
<form action='uploadAuthInfo' name='authform' method='post'>
<input type='hidden' name='UserID' value='0251234567890'>
<input type='hidden' name='Authenticator' value=>
<input type='hidden' name='AccessMethod' value=>
<input type='hidden' name='AccessUserName' value=>
</form>
</body>
</html>

机顶盒提交鉴权信息:

访问URL:http://58.223.251.139:8298/uploadAuthInfo

POST /uploadAuthInfo HTTP/1.1
Host: 58.223.251.139:8298
Accept: */*
Referer: http://58.223.251.139:8298/auth?UserID=0251234567890&Action=Login
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Charset: GB2312
Content-Length: 337

UserID=0251234567890&Authenticator=E1EA845634CAC92752E4D4138F753D9F8F7E0D67B8930EC5FBA0DB66E50F9299C595EE1BF5CB84EDCEB8AEBE5B2
C1C7A8D95696634736A50886E99E480FC590630A47652FCC52512455BC19E30F519E5B8E06EE62FD36F27EEB884E35AFAE633BDF0AB572EF4A490E3F3F3D14
CAEB075872EA4B2721D20C5731C34A1CCD4A7A1&AccessMethod=lan&AccessUserName=0251234567890

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: UserToken=03222792032425521443710617074212; Path=/
Content-Type: text/html;charset=gb2312
Content-Length: 744
Date: Tue, 16 Aug 2011 23:52:20 GMT

<html><head><script language='javascript'>
function AuthFinish(){
Authentication.CTCSetConfig ('UserToken','03222792032425521443710617074212');
Authentication.CTCSetConfig ('EPGDomain','http://58.223.143.14:8080/iptvepg/function/index.jsp');
Authentication.CTCSetConfig ('EPGDomainBackup','http://58.223.82.19:8080/iptvepg/function/index.jsp');
Authentication.CTCSetConfig ('NTPDomain','221.231.144.116');Authentication.CTCSetConfig ('UserGroupNMB','2a000120');
Authentication.CTCSetConfig ('TVMSDomain',);Authentication.CTCSetConfig ('TVMSDomainBackup',);
Authentication.CTCSetConfig ('PlatFlag','2');Authentication.CTCStartUpdate();
document.location= 'getChannelList';}
</script></head>
<body bgcolor='#000000' onload= AuthFinish() >
</body></html>

机顶盒查询频道列表:

GET /getChannelList HTTP/1.1
Host: 58.223.251.139:8298
Accept: */*
Referer: http://58.223.251.139:8298/uploadAuthInfo
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: UserToken=03222792032425521443710617074212
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=gb2312
Content-Length: 231
Date: Tue, 16 Aug 2011 23:52:20 GMT

<html><head><script language='javascript'>
function ConfigChannel(){
Authentication.CTCSetConfig ('ChannelCount','0');
document.location='getServiceList';}
</script>
</head>
<body bgcolor='#000000' onload= ConfigChannel() >
</body>
</html>

机顶盒查询服务列表:

GET /getServiceList HTTP/1.1
Host: 58.223.251.139:8298
Accept: */*
Referer: http://58.223.251.139:8298/getChannelList
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: UserToken=03222792032425521443710617074212
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=gb2312
Content-Length: 353
Date: Tue, 16 Aug 2011 23:52:20 GMT

<html><head>
<script language='javascript'>
function SetService(){
document.location='http://58.223.143.14:8080/iptvepg/function/index.jsp?UserGroupNMB=2a000120&EPGGroupNMB= 
&UserToken=03222792032425521443710617074212&UserID=0251234567890&STBID=00100299007012400000002B3C4D5E6F';
}</script>
</head>
<body bgcolor="#000000" onload= SetService() >
</body></html>

访问EPG服务器

机顶盒访问EPG服务器:

GET /iptvepg/function/index.jsp?UserGroupNMB=2a000120&EPGGroupNMB=%20&UserToken=03222792032425521443710617074212&UserID=0251234567890&STBID=00100299007012400000002B3C4D5E6F HTTP/1.1
Host: 58.223.143.14:8080
Accept: */*
Referer: http://58.223.251.139:8298/getServiceList
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=41FE51838A9E116839B068C7D965A155; Path=/iptvepg
Content-Type: text/html;charset=GBK
Content-Length: 606
Date: Tue, 16 Aug 2011 23:52:19 GMT

        <html>
        <head>
        <script language="javascript" type="">
        function gotoBalancedEPG()
        {
            top.document.location = 'http://58.223.54.89:8080/iptvepg/function/index.jsp?haslogin=1&stb_id=00100299007012400000002B3C4D5E6F&UserIP=114.218.113.123&UserID=0251234567890&UserToken=03222792032425521443710617074212&STBID=00100299007012400000002B3C4D5E6F&LastTermno=306&emg=0';
        }
        </script>
        </head>
        <body bgcolor="#000000" onload="gotoBalancedEPG()">
        </body>
        </html>

为了负载均衡,服务器返回了另一台EPG服务器的链接。

机顶盒访问EPG服务器:

GET /iptvepg/function/index.jsp?haslogin=1&stb_id=00100299007012400000002B3C4D5E6F&UserIP=114.218.113.123&UserID=0251234567890&UserToken=03222792032425521443710617074212&STBID=00100299007012400000002B3C4D5E6F&LastTermno=306&emg=0 HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.143.14:8080/iptvepg/function/index.jsp?UserGroupNMB=2a000120&EPGGroupNMB= &UserToken=03222792032425521443710617074212&UserID=0251234567890&STBID=00100299007012400000002B3C4D5E6F
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B; Path=/iptvepg
Location: http://58.223.54.89:8080/iptvepg/function/funcportalauth.jsp?LastTermno=306
Content-Type: text/html;charset=GBK
Content-Length: 0
Date: Tue, 16 Aug 2011 23:52:19 GMT

机顶盒访问Portal认证链接:

GET /iptvepg/function/funcportalauth.jsp?LastTermno=306 HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.143.14:8080/iptvepg/function/index.jsp?UserGroupNMB=2a000120&EPGGroupNMB= &UserToken=03222792032425521443710617074212&UserID=0251234567890&STBID=00100299007012400000002B3C4D5E6F
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://58.223.54.89:8080/iptvepg/function/frame.jsp
Content-Type: text/html;charset=GBK
Content-Length: 0
Date: Tue, 16 Aug 2011 23:52:20 GMT

机顶盒访问EPG首页Frame:

GET /iptvepg/function/frame.jsp HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.143.14:8080/iptvepg/function/index.jsp?UserGroupNMB=2a000120&EPGGroupNMB= &UserToken=03222792032425521443710617074212&UserID=0251234567890&STBID=00100299007012400000002B3C4D5E6F
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Content-Length: 191
Date: Tue, 16 Aug 2011 23:52:20 GMT

<html>
<head>
<title>frame</title>
</head>
<body bgcolor="#000000">
<script type="" language="javascript">
window.location = "frameset_judger.jsp";
</script>
</body>
</html>

机顶盒访问EPG首页Frame判断页面:

GET /iptvepg/function/frameset_judger.jsp HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.54.89:8080/iptvepg/function/frame.jsp
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Content-Length: 769
Date: Tue, 16 Aug 2011 23:52:20 GMT

<html>
<head>
<title>
frameset_judger
</title>
</head>
<body bgcolor="#000000">
<form name="mainWinSrcForm" method="post" action="frameset_builder.jsp" target="_top">
<input type="hidden" name="MAIN_WIN_SRC" value="http://58.223.54.89:8080/iptvepg/frame57/channel_start.jsp?tempno=-1">
<input type="hidden" name="NEED_UPDATE_STB" value="1">
<input type="hidden" name="BUILD_ACTION" value="FRAMESET_BUILDER">
</form>
<script language="javascript" type="">

  if (typeof(top.browserType) == "undefined" || top.browserType == null){
 
mainWinSrcForm.submit();
  }
  else{

    top.jsSetControl("vas_frameset_create_flag","0");
    window.location = "http://58.223.54.89:8080/iptvepg/frame57/channel_start.jsp?tempno=-1";
  }
  </script>
</body>
</html>

机顶盒访问EPG框架生成器主页面:

POST /iptvepg/function/frameset_builder.jsp HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.54.89:8080/iptvepg/function/frameset_judger.jsp
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 147

MAIN_WIN_SRC=http%3A%2F%2F58.223.54.89%3A8080%2Fiptvepg%2Fframe57%2Fchannel_start.jsp%3Ftempno%3D-1&NEED_UPDATE_STB=1&BUILD_ACTION=FRAMESET_BUILDER

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Transfer-Encoding: chunked
Date: Tue, 16 Aug 2011 23:52:20 GMT

<script language="javascript" type="">
function updateDomain()
{
    Authentication.CTCSetConfig('UserToken', '03222792032425521443710617074212');
    Authentication.CTCSetConfig('TokenExpiredTime', '20110817235219');

    Authentication.CTCSetConfig('EPGDomain', 'http://58.223.54.89:8080/iptvepg/function/index.jsp');

    Authentication.CTCSetConfig('NTPDomain', '58.223.143.151');

    Authentication.CTCSetConfig('EPGGroupNMB', '214');
    Authentication.CTCSetConfig('UserGroupNMB', );
    //Authentication.CTCStartUpdate();

}
</script>

<html>
<head>
<title>frameset_builder</title>
<script language="javascript" type="">
</script>
</head>
<frameset rows="0,*,0,0,0,0">
  <frame name="refrWin" src="/iptvepg/empty.jsp" noresize scrolling="no" frameborder=0 style="visibility: hidden;">
  <frame name="mainWin" src="http://58.223.54.89:8080/iptvepg/frame57/channel_start.jsp?tempno=-1" noresize frameborder=0>
  <frame name="extrWin" src="/iptvepg/empty.jsp" noresize scrolling="no" frameborder=0 style="visibility: hidden;">
  <frame name="tvmsWin" src="/iptvepg/empty.jsp" noresize scrolling="no" frameborder=0 style="visibility: hidden;">
  <frame name="remindWin" src="/iptvepg/empty.jsp" noresize scrolling="no" frameborder=0 style="visibility: hidden;">
  <frame name="channelAuthWin" src="/iptvepg/empty.jsp" noresize scrolling="no" frameborder=0 style="visibility: hidden;">
  <noframes>Sorry,this documnet can be  viewed only with a frames-capable browser.</noframes>
</frameset>
</html>

访问框架空页面:

GET /iptvepg/empty.jsp HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.54.89:8080/iptvepg/function/frameset_builder.jsp
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Content-Length: 3
Date: Tue, 16 Aug 2011 23:52:22 GMT

机顶盒访问EPG框架里的主页面:

GET /iptvepg/frame57/channel_start.jsp?tempno=-1 HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.54.89:8080/iptvepg/function/frameset_builder.jsp
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Content-Length: 426
Date: Tue, 16 Aug 2011 23:52:22 GMT

<html>
<head>
<script  language="javascript" type="text/javascript">
        top.jsSetControl("isAuthUrl","http://58.223.54.89:8080/iptvepg/frame57/channel_order_message.jsp");
    </script>
<script language="javascript" type="">
    document.location = "http://58.223.54.89:8080/iptvepg/frame57/portal.jsp";
</script>
</head>
<body bgcolor="#000000">
</body>
</html>

机顶盒访问EPG门户页面:

GET /iptvepg/frame57/portal.jsp HTTP/1.1
Host: 58.223.54.89:8080
Accept: */*
Referer: http://58.223.54.89:8080/iptvepg/frame57/channel_start.jsp?tempno=-1
User-Agent: Mozilla/4.08 (compatible;EIS iPanel 2.0;Linux2.4.26/mips;win32; BCM7213)
Cookie: JSESSIONID=A8A9FFF35D8B792DEBD8B337C7DD1B1B
Accept-Encoding: identity
Connection: Keep-Alive
Proxy-Connection: Keep-Alive

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/html;charset=GBK
Transfer-Encoding: chunked
Date: Tue, 16 Aug 2011 23:52:22 GMT

<html>
<head>
<title>frame portal page</title>
<script language="javascript">
  document.onkeypress = top.doKeyPress;
  top.jsClearKeyFunction();
  var url = location.href;
  top.jsSetControl("lastUrl",url);
  top.jsSetControl("stopUrl",url);
  top.jsDoStopVideo();
</script>
<SCRIPT LANGUAGE="JavaScript" type="">
    iPanel.defaultalinkBgColor = "#FCFF05";//
    iPanel.defaultFocusColor = "#FCFF05";//
    iPanel.focusWidth = "4";//
</script>
<script  language="javascript" type="text/javascript">
    top.jsSetControl("isAuthUrl","/iptvepg/frame57/channel_order_message.jsp");
</script>    
</head>
<body background="images/bg_portalwithhd.gif" bgcolor="transparent"  style="background-Repeat:no-repeat" onUnload="top.doStop();">
  <script language="javascript">
  var FONTHEAD = "<font color='00FF00' size='8' ><h1>";
  var FONTTAIL = "</h1></font>";
  function showChannelNumber(channelNum)
  {
 //top.jsDebug("showChannelNumber ======= " + channelNum);
 if(channelNum !=null && channelNum != undefined)
 {
     top.mainWin.document.all.channelNumber.innerHTML = FONTHEAD + channelNum + FONTTAIL;
   }
  }

  function clearChannelNumber()
  {
  // top.jsDebug(" clearChannelNumber ");
   top.mainWin.document.all.channelNumber.innerHTML = "";
  }
</script> 
</body>
</html>