|
|
发表于 2023-2-2 17:43:40
|
显示全部楼层
D:\python\yang\zte_modem_tools-main>python zte_factroymode.py --user telecomadmin --pass nE7jA%5m -- 192.168.1.1 8080 telnet open1 ?0 t2 E3 _. c$ m' k; `% b
trying user:"telecomadmin" pass:"nE7jA%5m". \! ?# T- m, b% M$ c. I; `/ b
reset facTelnetSteps:! @8 i0 c5 k! J1 P2 |; O3 `1 ^* w
Traceback (most recent call last):
1 R; O g/ ^: M File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
6 J7 e4 i) ]" ~/ _: S$ w httplib_response = self._make_request(5 J8 a) S# X9 ]& j. ?- g) T, b
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request, M) O, N4 U. x
six.raise_from(e, None)3 D) f- h, `0 M
File "<string>", line 3, in raise_from
1 X7 g& _" Z7 X1 [3 F! i File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
) {3 y, ^6 k% o) Q9 M2 T, i httplib_response = conn.getresponse()
% |# U6 R% I' ?* F( n2 o Y7 F8 h File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse
; M- s- b* D5 ~6 X4 V s* }% Q response.begin()# ~7 H: z6 H7 v! b, z' P
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
9 r7 t7 L! g } Y# `% h version, status, reason = self._read_status()" I! B# O, s% j% i+ ?" ^
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status
# p& S' v1 V: L( K6 ~7 J raise RemoteDisconnected("Remote end closed connection without". _! A; n1 f, s( t% L, E8 G6 `- h
http.client.RemoteDisconnected: Remote end closed connection without response
- s8 K c# t+ j2 N+ I' a4 R) }/ T& _0 H+ g4 N* i
During handling of the above exception, another exception occurred:
+ u$ h0 Q$ p/ W# I' U, \! I/ e
" W( t7 y* v3 {% ?! G' OTraceback (most recent call last):/ J' }2 Y N" h d% v
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 489, in send
* e5 R$ U& p, A& @' D resp = conn.urlopen(3 J3 v% [! a# `7 P1 A3 S" G+ C
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
" k& i1 Y4 \5 C retries = retries.increment(/ E9 Z/ ^; H* F7 A# M. d3 \
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 550, in increment
- J4 q' ~* j M# d+ t raise six.reraise(type(error), error, _stacktrace)3 d* E7 M, ~! f- i7 z8 R9 v
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
+ D) ^' t4 j* y1 o# ?3 K* q raise value.with_traceback(tb)
1 T$ Z+ V$ y# M+ ~+ { File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
7 |& _$ f9 `2 {) A% Q httplib_response = self._make_request( a7 o# `9 b, a) Q
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
9 E; @0 K, X6 u. L& D six.raise_from(e, None)
# ]' ~8 m$ l+ J* G1 n8 y: n4 I File "<string>", line 3, in raise_from5 k/ F E) N: u7 c/ z! Q9 c
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
7 m' D& s( g) h6 T% e' B B" x4 \ httplib_response = conn.getresponse(); M1 {% U# d, A& W! y
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse6 s2 f- V7 O+ D9 \' a
response.begin()
& t( D1 O P- z6 e: G) T8 _ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
% F2 n" d" F7 U0 M; T* l: h7 H version, status, reason = self._read_status()
7 s1 R) ^( F/ ~0 P3 Z, M0 T File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status2 q7 n/ B; R. h
raise RemoteDisconnected("Remote end closed connection without"
) p6 N% K; P# m$ purllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))& |1 S, l+ J7 I n+ Q4 m: T8 D
i. [' Y- C, |& G& }/ E
During handling of the above exception, another exception occurred:
8 A- _9 o. B4 [( ?/ T% r J8 g! m2 l4 p* j& C8 J0 B2 o4 I8 `
Traceback (most recent call last):
$ a p+ F# Q d- ~- {8 ]1 | File "zte_factroymode.py", line 314, in <module>
+ B" c7 z) J5 B: e. `7 t- \ main()& L0 x& T7 |9 }. E
File "zte_factroymode.py", line 310, in main
7 |% s. k8 |. e* Q dealTelnet(args.ip, args.port, args.user, args.pw, args.action)% F8 }5 u. J3 r1 G
File "zte_factroymode.py", line 268, in dealTelnet
3 Z7 q- O8 R5 e, c1 a telnet = dealFacAuth(WebFacTelnet, ip, port, users, pws)
% Z0 y- x% s2 G# G# \+ @& o File "zte_factroymode.py", line 220, in dealFacAuth4 h. C% ~& R2 F( [& W
if webfac.reset():; ]; A* x: [/ J7 Y. o
File "zte_factroymode.py", line 59, in reset
4 |$ x& }7 u$ G" w$ L resp = self.S.post(f"http://{self.ip}:{self.port}/webFac", data='SendSq.gch')$ V2 f+ A2 l$ P
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 635, in post
, y% `8 G: N5 y; v5 J- ] return self.request("POST", url, data=data, json=json, **kwargs)
; }( \# s4 C$ n' A! \" |1 c File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 587, in request
; L n" p% j( A( Q/ [+ l- _ resp = self.send(prep, **send_kwargs)
2 y- D | S! k' k* n3 |6 \ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 701, in send% g6 u, \, |- d4 v' J
r = adapter.send(request, **kwargs)5 c$ w+ R3 x# C' d
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 547, in send) K: Z& I1 M8 h/ p3 v t+ O9 P
raise ConnectionError(err, request=request)' ^5 X& V* F% Z3 d+ Y- `
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
|