Projects STRLCPY btcrecover Commits 56a0dbf7
🤬
Revision indexing in progress... (symbol navigation in revisions will be accurate after indexed)
  • ■ ■ ■ ■ ■
    extract-scripts/download-blockchain-wallet.py
    skipped 61 lines
    62 62   req.add_data((body+"&" if body else "") + "api_code=" + API_CODE)
    63 63   if auth_token:
    64 64   req.add_header("authorization", "Bearer " + auth_token)
    65  - return urllib2.urlopen(req)
     65 + try:
     66 + return urllib2.urlopen(req, cadefault=True) # calls ssl.create_default_context() (despite what the docs say)
     67 + except TypeError:
     68 + return urllib2.urlopen(req) # Python < 2.7.9 doesn't support the cadefault argument
    66 69  #
    67 70  # Performs a do_request(), decoding the result as json
    68 71  def do_request_json(query, body = None):
    skipped 16 lines
    85 88   error_msg = json.loads(error_msg)["initial_error"]
    86 89   except: pass
    87 90   print(error_msg)
     91 + if error_msg.lower().startswith("unknown wallet identifier"):
     92 + sys.exit(1)
    88 93  
    89 94   # Wait for the user to complete the requested authorization
    90 95   time.sleep(5)
    skipped 35 lines
Please wait...
Page is in error, reload to recover