Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BitGrub opened this issue Jul 1, 2021 · 2 comments
Open

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

BitGrub opened this issue Jul 1, 2021 · 2 comments

Comments

@BitGrub
Copy link

BitGrub commented Jul 1, 2021

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
Copy link

AlfHou commented Jan 18, 2022

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants