|
|
发表于 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 open3 Q5 s8 o d9 w. n2 H- E
trying user:"telecomadmin" pass:"nE7jA%5m"( |2 G. k, [' a2 {; ?4 k% ^" v
reset facTelnetSteps:
! `, v0 t$ S7 E; K* t8 x, |Traceback (most recent call last):
?/ D& J. A6 ~# E7 t* B File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
/ A9 b$ F/ o; A2 k2 c httplib_response = self._make_request(3 F: W( w) N/ Z4 B6 y! `
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
+ X+ O$ q0 S% y" D% a+ Q, t* e six.raise_from(e, None), _' b4 }& i0 }5 m* k% y/ z' L
File "<string>", line 3, in raise_from7 \& Y+ C5 x1 s5 G/ d! T5 q
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request& T- ~. u% c0 S9 z2 h/ C3 W
httplib_response = conn.getresponse()4 e7 G3 x0 F0 f: C- Y6 X
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse
/ J- G' @$ a5 t6 m) J response.begin()
! u- C% `7 v: Q8 b F2 _: X File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin' c8 \9 {; ^5 l! b
version, status, reason = self._read_status()
" T, z5 q8 Q! f1 r7 c File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status, a1 A! {& Z# f ?4 Y1 R' k
raise RemoteDisconnected("Remote end closed connection without"' P/ z% I" F& @
http.client.RemoteDisconnected: Remote end closed connection without response; A* P/ K$ w+ n, `6 V' P/ f6 ~- T
$ Z6 S7 S9 I$ d* i( O1 H
During handling of the above exception, another exception occurred:
9 B, I; P& c J, W( w* i, v+ U3 |6 v/ `7 }* M: [7 Z# n& F
Traceback (most recent call last):
2 P! N( Q2 r* L- i7 v% ? File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 489, in send e: z" F5 v7 H- z! p
resp = conn.urlopen(. S2 q, b$ Y( p5 Z- o2 t
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen
3 r1 c, p7 L _. | retries = retries.increment(
8 e( ^- k. \) N; G* Y. I File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 550, in increment
3 B1 c/ N( w# U+ U8 \' X0 L raise six.reraise(type(error), error, _stacktrace)0 f* a: @- }6 f3 b! E8 f6 N5 q4 E3 {
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 769, in reraise. h. @) M* ]& h4 n
raise value.with_traceback(tb)
3 ~3 e3 `2 `$ E0 D File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen$ ?8 ~' R' \1 f" y
httplib_response = self._make_request(
3 {! n+ ~, T! p% K9 s) K) M File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
! [ m+ d% v' r$ z p! _: A+ v six.raise_from(e, None)+ a/ p" }/ J- V
File "<string>", line 3, in raise_from( p3 ~" p" C" z! z0 b6 |) ]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request# A- g8 R( k8 V6 S7 q$ [
httplib_response = conn.getresponse()7 `% P" {% h4 E! \- {) p- ]
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse
( @9 L$ U1 a! f' l5 h response.begin()
7 \( d$ ~, u- X& v5 n5 q N3 U File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
8 f# _; r2 }! L; D9 |- c" K* |9 ` version, status, reason = self._read_status()
( g8 G6 \; L8 `! K, l v' g! N' l4 w File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status
! D) r) L1 j" l# ~% p+ Q raise RemoteDisconnected("Remote end closed connection without"( @2 C! j$ j; F( E; Y# _1 |
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
6 ]3 Z. k2 A1 g; x$ u# x! @6 N
$ _/ _- ^' F$ {" b+ gDuring handling of the above exception, another exception occurred:7 j$ F- h5 O L; @& D! Q
F% U1 q2 J6 ETraceback (most recent call last):% v% I7 f4 ~9 _0 `) g' C3 O
File "zte_factroymode.py", line 314, in <module>
( j2 ?. }: U4 b% L" P main()
$ m. l7 Y. N. |: a* b File "zte_factroymode.py", line 310, in main! I7 \# j7 f0 i; f) E8 N
dealTelnet(args.ip, args.port, args.user, args.pw, args.action); U* w8 `. ]/ h( z: R! o6 A
File "zte_factroymode.py", line 268, in dealTelnet
3 g; H: n0 ]& q9 ? telnet = dealFacAuth(WebFacTelnet, ip, port, users, pws)- r' \- k" ~; H* H, v- c: J; B
File "zte_factroymode.py", line 220, in dealFacAuth: l! D9 ~' a$ S% L+ W6 Y
if webfac.reset():) ^) D8 Y; a( ^! y: L' T) Y
File "zte_factroymode.py", line 59, in reset8 [. ^9 f% H ^% z- M
resp = self.S.post(f"http://{self.ip}:{self.port}/webFac", data='SendSq.gch')
& d9 T1 ~$ k' E2 m3 W* w3 A+ b File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 635, in post
$ {6 v m: _8 `8 r0 }' ] return self.request("POST", url, data=data, json=json, **kwargs)
5 G! j: j7 s* N; x2 D ^ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 587, in request
4 ?+ f' a) r6 X& F) k resp = self.send(prep, **send_kwargs). L3 G+ b0 E/ {- z Z
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 701, in send
9 e; g* o, V1 F! Q r = adapter.send(request, **kwargs)
. P( I) R% H+ F' q* P File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 547, in send
7 `/ B3 r! @" _& g0 V raise ConnectionError(err, request=request), H% W, a3 ]2 K8 m, w. I5 \' o
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
|