2024年5月9日发(作者:)
1、报文抓取
A、tcpdum本机端口互发抓包
B、写包到tr069文件
tcpdump -i 2 -s0 tcp port 8080 -w
C、用wireshark 查看内容
D、tcpdump -D 可以查看网卡序号
2、连接
2.1 Cpe
A、Cpe connect request http header
POST /openacs/acs HTTP/1.1
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 2023
Connection: Keep-Alive
SOAPAction: ""
B、Connect request Soap 消息
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:encodingStyle="/soap/encoding/"> SOAP-ENC:arrayType="cwmp:EventStruct[1]"> xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cwmp:ParameterValueStruct[6]"> UDPConnReq:1, Time:1, EthernetLAN:1, USBLAN:1, WiFiLAN:1, ADSLWAN:1, IPPing:1)
2.2 Openacs--http header
HTTP/1.1 401 Unauthorized
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Set-Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E; Path=/
WWW-Authenticate: Digest
realm="OpenACS",qop="auth",nonce="709372ba4dfb05c20061bfc4bbfa0257"
Content-Type: text/html;charset=utf-8
Content-Length: 948
Date: Wed, 15 Aug 2012 05:43:47 GMT
3、认证
3.1cpe
3.1.1 http header
HTTP/1.1
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 2023
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000001, cnonce="502b3713ca536bdf380b",
response="78bfead30ffb7c3276e1dfa35e44f2dc", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
SOAPAction: ""
3.1.2 soap 消息
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:encodingStyle="/soap/encoding/"> SOAP-ENC:arrayType="cwmp:EventStruct[1]"> xsi:type="SOAP-ENC:Array" SOAP-ENC:arrayType="cwmp:ParameterValueStruct[6]"> UDPConnReq:1, Time:1, EthernetLAN:1, USBLAN:1, WiFiLAN:1, ADSLWAN:1, IPPing:1)
3.2 openacs
3.2.1 header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 589
Date: Wed, 15 Aug 2012 05:43:47 GMT
3.2.2 soap 消息
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:device_did_not_send_id
4、设置参数
4.1 cpe 发空request
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 0
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000002, cnonce="502b3713ca540367ae97",
response="3592a4159a912404b57a2b47a9029a40", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
4.2 openacs 响应
4.2.1http header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 886
Date: Wed, 15 Aug 2012 05:43:47 GMT
4.2.2Soap --SetParameterValues
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:ameterValues134501302 7511.1424597 Name>
4.3 cpe --SetParameterValuesresponse
4.3.1 http header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 657
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000003, cnonce="502b3713ca552eddf501",
response="ddf03724e0c1e47d183de178cf76393c", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
4.3.2 soap
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:ameterValues134501302 7511.1424597 SOAP-ENV:encodingStyle="/soap/encoding/">
5、获取参数
Openacs 在接到cpe 空请求或response时,判断是否有方法待执行
5.1Openacs-header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 746
Date: Wed, 15 Aug 2012 05:43:47 GMT
5.2 soap
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:ameterValues13450130 27560.6576755 string>
5.2 cpe --response
5.2.1 cpe header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 910
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000004, cnonce="502b3713ca56e1d09941",
response="e1e4785168ebf040ee41c7bf2df65b3a", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
5.2.2 cpe soap GetParameterValuesResponse
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:ameterValues13450130 27560.6576755 SOAP-ENV:encodingStyle="/soap/encoding/"> SOAP-ENC:arrayType="cwmp:ParameterValueStruct[1]"> Name>
6、Reboot
6.1 Openacs --reboot
6.1.1 header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 600
Date: Wed, 15 Aug 2012 05:43:47 GMT
6.1.2 soap
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:82.16300 368
6.2 cpe RebootResponse
6.2.1 cpe header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 604
Connection: Keep-Alive
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
6.2.2 cpe soap
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:82.16300 368 SOAP-ENV:encodingStyle="/soap/encoding/">
7、FactoryReset
7.1openacs
7.1.1header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 564
Date: Wed, 15 Aug 2012 05:43:47 GMT
7.1.2Soap
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:yReset64.3 1499063
7.2 cpe FactoryResetResponse
7.2.1 header
POST /openacs/acs HTTP/1.1
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 622
Connection: Keep-Alive
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
7.2.2 soap
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:yReset64.3 1499063 SOAP-ENV:encodingStyle="/soap/encoding/">
8、GetRPCMethods
8.1 openacs
8.1.1 header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 566
Date: Wed, 15 Aug 2012 05:43:47 GMT
8.1.2Soap --GetRPCMethods
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:Methods 03.20790165
8.2 cpe -GetRPCMethodsResponse
8.2.1 header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 1144
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000005, cnonce="502b3713ca5774d9c5aa",
response="e684db43f1c5f7362228e26082248623", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
8.2.2 Soap -GetRPCMethodsResponse
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:Methods 03.20790165 SOAP-ENV:encodingStyle="/soap/encoding/"> SOAP-ENC:arrayType="xsd:string[14]"> xsi:type="SOAP-ENC:Array"
9、GetParameterNames
9.1 openacs
9.1.1 header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 653
Date: Wed, 15 Aug 2012 05:43:47 GMT
9.1.2 soap
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:ameterNames13450130 27734.1556754
9.2 cpe ---GetParameterNamesResponse
9.2.1 header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 842
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000006, cnonce="502b3713ca58341bed80",
response="2f4de03514798d7983bbe95791dc5bae", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
9.2.2 Soap---GetParameterNamesResponse
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:ameterNames13450130 27734.1556754 SOAP-ENV:encodingStyle="/soap/encoding/"> SOAP-ENC:arrayType="cwmp:ParameterInfoStruct[1]">
10、Upload
10.1 openacs --upload
10.1.1Header
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4; (build: SVNTag=JBoss_4_2_3_GA
date=2)/JBossWeb-2.0
Content-Type: text/xml;charset=utf-8
Content-Length: 753
Date: Wed, 15 Aug 2012 05:43:47 GMT
10.1.2 soap
xmlns:SOAP-ENC="/soap/encoding/" xmlns:SOAP-ENV="/soap/envelope/" xmlns:cwmp="urn:dslforum-org:cwmp-1-0" xmlns:xsd="/2001/XMLSchema" xmlns:xsi="/2001/XMLSchema-instance"> SOAP-ENV:mustUnderstand="1">ID:57.53584 75
10.2 cpe --upload response 上传失败
10.2.1 header
Host: 192.168.1.115:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 778
Connection: Keep-Alive
Authorization: Digest realm="OpenACS", username="cpe",
nonce="709372ba4dfb05c20061bfc4bbfa0257", uri="/openacs/acs", qop="auth",
nc=00000007, cnonce="502b3716ca59e30c692a",
response="673cee748a53baefd34e50acbe6271c3", opaque="(null)"
Cookie: JSESSIONID=B7ED1CA86F84EB0B71F076607DE4ED6E
Cookie: CharCode=293a1567c77f25780de94981d4b8b907ba280ee2baa0c4
SOAPAction: ""
10.2.1 soap
xmlns:SOAP-ENV="/soap/envelope/" xmlns:SOAP-ENC="/soap/encoding/" xmlns:xsi="/2001/XMLSchema-instance" xmlns:xsd="/2001/XMLSchema" xmlns:cwmp="urn:dslforum-org:cwmp-1-0"> SOAP-ENV:mustUnderstand="1">ID:57.53584 75 SOAP-ENV:encodingStyle="/soap/encoding/">
发布评论