AloneMonkey / frida-ios-dump

pull decrypted ipa from jailbreak device
MIT License
3.39k stars 621 forks source link

Getting "OSError: [Errno 9] Bad file descriptor" starting today #157

Open BitGrub opened 3 years ago

BitGrub commented 3 years ago

I dumped a few ipas last week and everything worked perfectly for the most part, however today, any app I try to dump results in this error

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 386, in _on_message
    callback(message, data)
  File "/Users/ghost/Downloads/frida-ios-dump/dump.py", line 120, in on_message
    scp.get(scp_from, scp_to)
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 241, in get
    self._recv_all()
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 392, in _recv_all
    command[code](msg[1:])
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 453, in _recv_file
    raise SCPException("Underlying channel was closed")
scp.SCPException: Underlying channel was closed
start dump /private/var/containers/Bundle/Application/2FCAA8CF-3F18-40A4-BFE0-E2A29FB687B0/YouTube.app/Frameworks/widevine_cdm_secured_ios.framework/widevine_cdm_secured_ios
                   Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 386, in _on_message
    callback(message, data)
  File "/Users/ghost/Downloads/frida-ios-dump/dump.py", line 119, in on_message
    with SCPClient(ssh.get_transport(), progress = progress, socket_timeout = 60) as scp:
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 127, in __init__
    self.peername = self.transport.getpeername()
  File "/usr/local/lib/python3.9/site-packages/paramiko/transport.py", line 1787, in getpeername
    return gp()
OSError: [Errno 9] Bad file descriptor
start dump /private/var/containers/Bundle/Application/2FCAA8CF-3F18-40A4-BFE0-E2A29FB687B0/YouTube.app/Frameworks/Module_Framework.framework/Module_Framework
                   Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 386, in _on_message
    callback(message, data)
  File "/Users/ghost/Downloads/frida-ios-dump/dump.py", line 119, in on_message
    with SCPClient(ssh.get_transport(), progress = progress, socket_timeout = 60) as scp:
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 127, in __init__
    self.peername = self.transport.getpeername()
  File "/usr/local/lib/python3.9/site-packages/paramiko/transport.py", line 1787, in getpeername
    return gp()
OSError: [Errno 9] Bad file descriptor
0.00B [00:01, ?B/s]
0.00B [00:00, ?B/s]
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/frida/core.py", line 386, in _on_message
    callback(message, data)
  File "/Users/ghost/Downloads/frida-ios-dump/dump.py", line 137, in on_message
    with SCPClient(ssh.get_transport(), progress = progress, socket_timeout = 60) as scp:
  File "/usr/local/lib/python3.9/site-packages/scp.py", line 127, in __init__
    self.peername = self.transport.getpeername()
  File "/usr/local/lib/python3.9/site-packages/paramiko/transport.py", line 1787, in getpeername
    return gp()
OSError: [Errno 9] Bad file descriptor
0.00B [00:00, ?B/s]Generating "YouTube.ipa"
'app' [00:00, ?B/s]

YouTube.fid:  11%|███████                                                           | 1.56M/14.6M [00:05<00:41, 326kB/s]
0.00B [00:00, ?B/s]
AlfHou commented 2 years ago

Hi! Did you read this part of the README

For SSH/SCP make sure you have your public key added to the target device's ~/.ssh/authorized_keys file.

I experienced the same problem as you, and this solved it.

Hoffconna commented 2 years ago

do ssh connect to your device first ,all users do connect.