hackappcom / iloot

OpenSource tool for iCloud backup extraction
https://hackapp.com/
637 stars 201 forks source link

BadStatusLine issue with greenlet ??? #40

Open darrynza opened 9 years ago

darrynza commented 9 years ago

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run result = self._run(_self.args, *_self.kwargs) File "iloot.py", line 301, in download_chunks container.host_info.uri, "", headers) File "iloot.py", line 95, in probobuf_request response = conn.getresponse() File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 409, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 373, in _read_status raise BadStatusLine(line) BadStatusLine: '' <Greenlet at 0xb56467acL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c59aac>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with BadStatusLine

Traceback (most recent call last): File "iloot.py", line 627, in download_backup(args.apple_id, args.password, args.output, args.item_types, args.snapshot, args.combined, args.itunes_style, args.domain, args.threads) File "iloot.py", line 588, in download_backup client.download(UDID, types) File "iloot.py", line 465, in download self.authorize_get(authTokens, snapshot) File "iloot.py", line 256, in authorize_get for res in pool.imap_unordered(self.download_chunks, containers): File "/usr/local/lib/python2.7/dist-packages/gevent/pool.py", line 220, in next raise value.exc httplib.BadStatusLine: ''

Thanks :)

hackappcom commented 9 years ago

Hi, seems to be iCloud server rejects so many threads, try to play with DEFAULT THREADS global variable.

darrynza commented 9 years ago

Hi, So I'm down to 5 threads at the moment , testing it but it dies at random places. i got 330MB of a 1GB backup on 50 threads, then 160MB/1GB on 10/20 threads.. you sure this is the reason?

this error is what I am getting now, seems more verbose than the previous one and seems to point to SSL issues?

File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run result = self._run(_self.args, *_self.kwargs) File "./iloot.py", line 302, in download_chunks container.host_info.uri, "", headers) File "./iloot.py", line 95, in probobuf_request request = conn.request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 791, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1176, in connect self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file) File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 399, in wrap_socket ciphers=ciphers) File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 93, in init self.do_handshake() File "/usr/local/lib/python2.7/dist-packages/gevent/_ssl2.py", line 310, in do_handshake return self._sslobj.do_handshake() SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol <Greenlet at 0xb4348b6cL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c1cc4c>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with SSLError

Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 340, in run result = self._run(_self.args, *_self.kwargs) File "./iloot.py", line 302, in download_chunks container.host_info.uri, "", headers) File "./iloot.py", line 96, in probobuf_request response = conn.getresponse() File "/usr/lib/python2.7/httplib.py", line 1045, in getresponse response.begin() File "/usr/lib/python2.7/httplib.py", line 409, in begin version, status, reason = self._read_status() File "/usr/lib/python2.7/httplib.py", line 373, in _read_status raise BadStatusLine(line) BadStatusLine: '' <Greenlet at 0xb434b20cL: <bound method MobileBackupClient.download_chunks of <main.MobileBackupClient object at 0xb6c1cc4c>>([<chunkserver_pb2.FileChecksumStorageHostChunkList)> failed with BadStatusLine

Traceback (most recent call last): File "./iloot.py", line 628, in download_backup(args.apple_id, args.password, args.output, args.item_types, args.snapshot, args.combined, args.itunes_style, args.domain, args.threads) File "./iloot.py", line 589, in download_backup client.download(UDID, types) File "./iloot.py", line 466, in download self.authorize_get(authTokens, snapshot) File "./iloot.py", line 257, in authorize_get for res in pool.imap_unordered(self.download_chunks, containers): File "/usr/local/lib/python2.7/dist-packages/gevent/pool.py", line 220, in next raise value.exc ssl.SSLError: [Errno 8] _ssl.c:510: EOF occurred in violation of protocol

hackappcom commented 9 years ago

Damn, I've seen this few times too. Empty reply (EOF) could be antibot protection, or just icloud bugs. All I can recommend now is to launch iloot once again. I have plans to write retry-on-exception code, but right now I can't say when.

darrynza commented 9 years ago

Cool ,

thanks alot for the awesome app and the work you put into. It is much appreciated :)... And keep up the good work, I think we can close this thread.

keep well and all the best On 17 Apr 2015 12:08, "HackApp GIT" notifications@github.com wrote:

Damn, I've seen this few times too. Empty reply (EOF) could be antibot protection, or just icloud bugs. All I can recommend now is to launch iloot once again. I have plans to write retry-on-exception code, but right now I can't say when.

— Reply to this email directly or view it on GitHub https://github.com/hackappcom/iloot/issues/40#issuecomment-93958071.

DaSnafoo commented 9 years ago

Were you ever able to find a solution for this? I'm having the same exact issue.

lancer2002 commented 7 years ago

I met this problem too.