|
|
发表于 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 open
, T. E9 p; C0 a% l; ] g( Atrying user:"telecomadmin" pass:"nE7jA%5m"
- K8 c [8 L4 o+ t% P Y& U, Hreset facTelnetSteps:
6 Y3 z# h; b8 ], `: `Traceback (most recent call last):
2 g& F* d/ z( x: | File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen0 | d$ o* ^9 s. C
httplib_response = self._make_request(
5 t5 U, Q) H: D" z% y; _: z% [ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request+ z# A5 Q f m5 ?5 L1 H; ^
six.raise_from(e, None)4 I0 Z1 L/ i' S- y) F8 e) R2 `
File "<string>", line 3, in raise_from" P1 S N! h$ Q1 |
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request) t* c0 Q7 T% N; g- O. O l
httplib_response = conn.getresponse()
0 E6 z( e$ s6 a, [! r1 D File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse/ f, q A+ b/ Y( @# s
response.begin()8 g. g f7 y9 J3 s9 ?, o
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin C3 ^1 G, s& f, _& X9 \+ n
version, status, reason = self._read_status()1 D0 G* }1 j* f; r3 }( l
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status# O) O* c( d/ a3 y" k, e
raise RemoteDisconnected("Remote end closed connection without"" ?6 F' A0 F6 T
http.client.RemoteDisconnected: Remote end closed connection without response7 N# s5 X! e2 y7 P4 C7 h: S1 O, y/ {) {
2 c& f1 U. q: @& k8 |7 M- X
During handling of the above exception, another exception occurred:4 N- F' }& z8 U7 i6 q, E2 V3 D
0 a% O6 g" n' f/ U$ D& V5 k2 L! yTraceback (most recent call last):3 s! c. \9 \) i" N
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 489, in send
% ~6 G4 m: p* f1 b: C6 `' ^; T+ G resp = conn.urlopen(
" B% I7 ^0 M. _2 @4 l File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen5 }% T, }/ ^7 t% B. F
retries = retries.increment(
) P& O, ]! W: i f8 a- z8 _ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 550, in increment# d! t" M: C! H1 N9 l
raise six.reraise(type(error), error, _stacktrace) \! H1 l; T' t) f6 [/ U
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
. `3 _8 e3 [: S5 z8 k- i1 I raise value.with_traceback(tb)8 c1 C6 |) V1 H. `
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
" g7 ?! C) D8 ?4 q8 y0 m8 G+ U httplib_response = self._make_request(, v7 f+ ^% e8 ]& r
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
) E* U1 T4 ~$ H( E$ E3 M4 m( F2 {( `5 v six.raise_from(e, None)
8 d" h; \# m& K File "<string>", line 3, in raise_from' }+ T8 G7 Q. G) V5 u3 n
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
9 |: g% [ @0 Z/ l6 _% q9 h* L: ` httplib_response = conn.getresponse()% U8 @, M) a; O& A, ~) z+ i
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse
$ m8 r6 ~: K9 \! p% }6 e response.begin()9 Q* v9 f# j8 b0 [$ n- N+ x
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
u% L% e( H4 F% Z: C9 W$ `; y version, status, reason = self._read_status()( _# |1 {- c0 w9 F* i: g
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status
# Z3 ?1 [" Q3 \ raise RemoteDisconnected("Remote end closed connection without"2 k% Z. e- `( O
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))# z1 a" V4 i! V3 Q# H
6 ]# T7 ]& s5 t+ V! g; g4 G
During handling of the above exception, another exception occurred:# Y0 \6 q" T% |2 t5 |; Z6 m% A
9 g) `! c2 F" Y9 Z
Traceback (most recent call last):& K" U4 J6 q4 Q0 E) V4 M( F
File "zte_factroymode.py", line 314, in <module>
9 A+ E0 p5 e+ O; \6 [2 F$ ? main()9 }! k8 P; k" z- K' ?. P [
File "zte_factroymode.py", line 310, in main9 T, `6 q: H/ E' l( l( S/ N7 i
dealTelnet(args.ip, args.port, args.user, args.pw, args.action) n/ _2 q: C4 e! j
File "zte_factroymode.py", line 268, in dealTelnet
' K+ y4 T+ s! p telnet = dealFacAuth(WebFacTelnet, ip, port, users, pws)0 r* {6 {6 Z, N. H
File "zte_factroymode.py", line 220, in dealFacAuth# h/ j! `! V& }# {. ^) E
if webfac.reset():. }5 \1 @8 p1 ^8 ?8 K7 |$ g+ C- T
File "zte_factroymode.py", line 59, in reset. x. u2 k# f2 S' @$ \/ K7 o) H% L
resp = self.S.post(f"http://{self.ip}:{self.port}/webFac", data='SendSq.gch'): Q' q0 P, L. j+ C @0 j
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 635, in post2 R: S8 [/ ~* E2 r" ^, e
return self.request("POST", url, data=data, json=json, **kwargs)
# [: l# N9 M2 g; t' z+ a( x File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 587, in request7 ?; z7 ]! s9 B1 {# C% w, d" j
resp = self.send(prep, **send_kwargs)2 J2 ^7 I3 y, F L) \: x
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 701, in send- Z/ w8 h% N. b' K0 t
r = adapter.send(request, **kwargs)
& s1 u1 _% m! R6 l File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 547, in send# f. i: }; v) [; V5 d% T2 _
raise ConnectionError(err, request=request)
0 Y/ K5 w7 s$ {- Hrequests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
|