|
发表于 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 open8 H; Q: n& j5 b2 g
trying user:"telecomadmin" pass:"nE7jA%5m"; H: U2 ?5 A: A) r4 z& @
reset facTelnetSteps:
! l: F4 `* w2 l7 ETraceback (most recent call last):
; M- z# B4 U" ~; g File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
6 K; F( |' g, q) K httplib_response = self._make_request(# p* e9 U$ l. v* w- {
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request
' ~+ l" t5 e; N9 x$ { six.raise_from(e, None)
0 W; A5 v" w! P File "<string>", line 3, in raise_from
d' K V4 t5 D File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request
$ [& l5 x+ u9 X/ B2 q httplib_response = conn.getresponse()
% u- J7 h+ g6 T+ m: r! ?2 D6 ]( j5 k. Y File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse# {. G5 R9 }0 i2 ~9 w* l
response.begin()& E2 W c& C! s$ j" R" G
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin6 N" f3 T, \$ o! G
version, status, reason = self._read_status()! T* a6 v8 \ P# Z1 N
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status4 {0 P9 L9 c; _) U
raise RemoteDisconnected("Remote end closed connection without") Z- ~2 E e5 ? @& `$ J
http.client.RemoteDisconnected: Remote end closed connection without response
) b" L. m, D4 h+ l/ L5 [+ Q
- R8 a" B. g$ X1 W( IDuring handling of the above exception, another exception occurred:
4 [0 ]3 I( ]( d4 i. B' ]. t
~ _5 e; k: f) k0 t( hTraceback (most recent call last):7 A* L1 T/ D5 w) H$ L( \- S
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 489, in send, ~+ k r- J% i0 I( ~/ v; w
resp = conn.urlopen(! S, F) x' x' |, m
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 787, in urlopen7 U. v0 i6 z& e4 ^" T# b0 E1 }4 j
retries = retries.increment(
# }1 A {- h! L1 }- y% {4 _ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\util\retry.py", line 550, in increment
6 o# Z. R! A2 n* T2 X raise six.reraise(type(error), error, _stacktrace)' @& D4 H6 Y# K8 S
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\packages\six.py", line 769, in reraise
|7 S$ c. p+ y' A- D raise value.with_traceback(tb) v: x2 x9 \: `8 H; T+ U5 f
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 703, in urlopen
7 c" j4 q+ F O- E6 s httplib_response = self._make_request(" v- x9 g' r) |, W
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 449, in _make_request6 t" m9 s) P; D2 j6 G# [% c- W. ? |5 x
six.raise_from(e, None)
( H+ G4 a$ L- v+ v% h: R File "<string>", line 3, in raise_from( X' i" L+ z( w+ j7 ?* J& X9 S
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\urllib3\connectionpool.py", line 444, in _make_request7 ]) _! {' f' h: v5 u4 B! n
httplib_response = conn.getresponse()& m8 `& |1 ?+ h! }% k" K9 Y" _
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 1347, in getresponse$ n" _$ E k8 T6 J' h/ M9 i6 C
response.begin()& I2 P! n) r9 z! L
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 307, in begin
' O* x# Z5 k7 ?+ l* X version, status, reason = self._read_status()
* O) @ G# `" W0 p! \ File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\http\client.py", line 276, in _read_status
5 B* h" a" [) Y5 _" h6 g0 x( M; | raise RemoteDisconnected("Remote end closed connection without"
: }% i+ _4 ] _' J- ]/ Lurllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
: S- p+ R U3 s9 N
4 A: [7 [* ^ q s" d3 UDuring handling of the above exception, another exception occurred:
/ H/ c2 \$ w7 a6 J8 F/ t. b+ @0 ~% V
' U7 r# P& n. k* KTraceback (most recent call last):
% {; h9 ~- Y. e7 J+ L6 O File "zte_factroymode.py", line 314, in <module>$ k0 l) t; s/ Y' J
main()
- |1 I3 l) X$ J File "zte_factroymode.py", line 310, in main9 ~, P9 Z [- `4 l2 R0 m) l
dealTelnet(args.ip, args.port, args.user, args.pw, args.action)
6 K5 ~, ?% G8 k5 u% g V3 c File "zte_factroymode.py", line 268, in dealTelnet+ ?3 q& |9 G3 F3 ~) k) |
telnet = dealFacAuth(WebFacTelnet, ip, port, users, pws)
, j/ x3 A( H$ Q) h% }/ D File "zte_factroymode.py", line 220, in dealFacAuth
4 r6 h$ {. S8 V: l1 p S. P6 Q if webfac.reset():
' D( t+ l2 m( C) ?& I File "zte_factroymode.py", line 59, in reset! l1 ]9 I4 s" [
resp = self.S.post(f"http://{self.ip}:{self.port}/webFac", data='SendSq.gch'); K" ^6 S6 r7 r/ K9 o% a
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 635, in post. g8 A/ o5 l& C1 V8 V- [
return self.request("POST", url, data=data, json=json, **kwargs) N; ?* v8 v' E; x6 k& F1 q& h3 }8 p
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 587, in request
7 \/ E7 b2 Y6 X3 ^7 `# p8 k resp = self.send(prep, **send_kwargs)) R/ }3 X; O% N1 k/ f5 f
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\sessions.py", line 701, in send6 N/ s0 y5 X/ ^
r = adapter.send(request, **kwargs)
) O/ l# `. c$ c* N File "C:\Users\Administrator\AppData\Local\Programs\Python\Python38\lib\site-packages\requests\adapters.py", line 547, in send
" m& J' w, E; ^7 E& R raise ConnectionError(err, request=request)
* Z) c9 x3 j# e* R- srequests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) |
|