|
|
发表于 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 open9 d' E9 F2 h3 E
trying user:"telecomadmin" pass:"nE7jA%5m"
1 M3 ?. ~! f: O% qreset facTelnetSteps:
- }/ H# o# v: C6 O6 uTraceback (most recent call last):7 k9 h) [ g% R1 L& |! a" C2 N
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen! I, Y0 Y: ?8 u$ _
httplib_response = self._make_request(
; r; s* d8 u4 m( N1 k File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
4 z: N, ]9 s, p6 u( y6 Q six.raise_from(e, None)$ w! S0 A& d- ]0 W7 @
File "<string>", line 3, in raise_from7 Z6 Q( D0 G P! |7 c5 s
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
# U: _0 n" ^( D+ y( a* _/ v httplib_response = conn.getresponse()9 R+ U" U4 T* T i6 M0 |+ @
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse7 W9 d) Q, f6 o. x. {, e
response.begin()
5 N; U" V+ R; j' _# I4 Z! F9 j File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin: i% c2 T$ {0 w% Y
version, status, reason = self._read_status()* ]- A* s/ h3 ?/ p8 l# [' V
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status
0 g+ m0 z# s% F) A; P raise RemoteDisconnected("Remote end closed connection without"
* d9 `6 d" s8 a6 H! Y) T1 rhttp.client.RemoteDisconnected: Remote end closed connection without response7 b4 }7 Y+ a a% t1 ?& \) v' N$ y( ?- w
' r. r2 [* {' q& _6 U
During handling of the above exception, another exception occurred:2 c" e, J2 _7 m% \! D& [5 Y: `
, G4 r% L6 O2 ]. h9 DTraceback (most recent call last):
9 D2 J$ ?# c m5 { File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 489, in send+ ?/ k" ^2 N ]( h; _0 ]
resp = conn.urlopen(
$ `3 o: x \4 P! X: l7 F/ G p File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
% W+ o" j ~: Y3 N retries = retries.increment(4 g4 N/ t. b& Q) _/ }+ E4 ~
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 550, in increment, h3 F- }) w, I) I
raise six.reraise(type(error), error, _stacktrace)! L$ l+ |+ P# v% ~' s$ }& z
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
/ b1 f& x4 d M \ k! \$ r raise value.with_traceback(tb)
! J& V4 ]+ I! X' C/ V File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen$ q2 U5 Q8 V" k! `+ }; k) l, |
httplib_response = self._make_request(
: Y) c5 P# ~# l6 Q3 T8 Q+ K1 r& a File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request9 W- a5 g l' r: U2 E$ n
six.raise_from(e, None)
5 x6 F. g1 Z8 @0 c; l File "<string>", line 3, in raise_from
; e% s* s8 s8 T4 F File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
* T5 p4 t4 E# W; P5 Z( c httplib_response = conn.getresponse()
; J8 W4 D; a$ D/ \/ C5 l( Z, j File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse2 E, G/ v+ Z4 O1 Y- h. v0 m
response.begin()
' d. G% G+ N5 i1 d- p4 S File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
& ?$ k# _3 [0 e4 l6 y. s+ [ version, status, reason = self._read_status()* U' x6 a5 O1 \
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status5 s# `" j! T4 h& W4 P+ @0 Z
raise RemoteDisconnected("Remote end closed connection without"
x% w- P% R1 M H3 k: G/ D# Zurllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
. C) x; M7 I& ?; F b/ F% q% E7 Q T" {) |! `) M
During handling of the above exception, another exception occurred:1 U- K, l# ]# i
* K8 r$ J1 [2 k& W! O
Traceback (most recent call last):' y3 ]6 N; U5 q2 R0 t
File "zte_factroymode.py", line 314, in <module>
. l! m, o) E4 r$ g- |! s main()! N' m# O1 ?+ I
File "zte_factroymode.py", line 310, in main
: c: E, J% `; J" _& P dealTelnet(args.ip, args.port, args.user, args.pw, args.action)$ r) s; I( R% T! @# @: [- C$ u
File "zte_factroymode.py", line 268, in dealTelnet
+ `3 s! m K& R3 y; }) y telnet = dealFacAuth(WebFacTelnet, ip, port, users, pws)$ O* \: d+ h) [! n' Y- o9 }6 g. }; D
File "zte_factroymode.py", line 220, in dealFacAuth
: p* W: x, S# t/ b( c* Q: y' E if webfac.reset():
5 H4 H+ u+ N. x File "zte_factroymode.py", line 59, in reset2 \4 _. l: P( o" `* f% f& d! K
resp = self.S.post(f"http://{self.ip}:{self.port}/webFac", data='SendSq.gch')
) T& m/ C% w0 }, r$ E File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 635, in post, e2 \ V) m/ f
return self.request("POST", url, data=data, json=json, **kwargs)
2 o) G: N3 p9 V0 x- T File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 587, in request
- m+ K, }# x9 b* ?9 d. E resp = self.send(prep, **send_kwargs)% s: v) _" _+ x7 [+ S' j% m
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 701, in send
( p8 N Q6 L7 j% b* z: n# m& l r = adapter.send(request, **kwargs)
+ ~; G2 g- b0 Y4 b' b9 W File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 547, in send+ M# }+ i8 I2 h" T; F
raise ConnectionError(err, request=request)
, R9 [8 m% o& K7 T6 K! S3 \ U) Prequests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
|