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

dependency_installer breaks on invalid GPG signature #267

Open
bensh opened this issue Nov 7, 2018 · 0 comments
Open

dependency_installer breaks on invalid GPG signature #267

bensh opened this issue Nov 7, 2018 · 0 comments

Comments

@bensh
Copy link

bensh commented Nov 7, 2018

Issue

device/dependaency_installer tries to load CORE_UTILS via apt_get but crashes on the GPG error for the biteyourapple repo

Expected behaviour

Actual behaviour

[needle][dependency_installer] > run
[] Checking connection with device...
[+] Already connected to: 192.168.1.174
[
] Checking prerequisites...
[V] [INSTALL] Installing COREUTILS via apt-get.
[V] [INSTALL] Installing COREUTILS via apt-get.
[!] W: GPG error: http://repo.biteyourapple.net ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E078E9650599F353

[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...
[?] Resetting connection to device...
[V] [AGENT] Connecting to agent (192.168.1.174:4444)...
[+] [AGENT] Successfully connected to agent (192.168.1.174:4444)...

Steps to reproduce

  1. use device/dependancy_installer
  2. set all true
  3. run

needle error logs

[needle] > use device/dependency_installer
[needle][dependency_installer] > run
[] Checking connection with device...
[+] Already connected to: 192.168.1.174
[
] Checking prerequisites...
[V] [INSTALL] Installing COREUTILS via apt-get.
[V] [INSTALL] Installing COREUTILS via apt-get.
[!] W: GPG error: http://repo.biteyourapple.net ./ Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY E078E9650599F353

[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...
[?] Resetting connection to device...
[V] [AGENT] Connecting to agent (192.168.1.174:4444)...
[+] [AGENT] Successfully connected to agent (192.168.1.174:4444)...
***** hangs and does nothing *****

[needle][dependency_installer] > back
[needle] > set debug true
DEBUG => true
[needle] > set verbose true
VERBOSE => true
[needle] >
[needle] > use device/dependency_installer
[needle][dependency_installer] > run
[*] Checking connection with device...
[+] Already connected to: 192.168.1.174
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[!] 'NoneType' object has no attribute 'open_session'
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...
[?] Resetting connection to device...
[V] [AGENT] Connecting to agent (192.168.1.174:4444)...
[+] [AGENT] Successfully connected to agent (192.168.1.174:4444)...
[D] [AGENT] Executing command: os_version
***** hangs and does nothing *****

[needle][dependency_installer] > back
[needle] >
[needle] > use device/dependency_installer
[needle][dependency_installer] > set all true
ALL => true
[needle][dependency_installer] > run
[*] Checking connection with device...
[+] Already connected to: 192.168.1.174
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi
[!] 'NoneType' object has no attribute 'open_session'
[V] [SSH] Disconnecting...
[V] [AGENT] Disconnecting from agent...
[?] Resetting connection to device...
[V] [AGENT] Connecting to agent (192.168.1.174:4444)...
[+] [AGENT] Successfully connected to agent (192.168.1.174:4444)...
[D] [AGENT] Executing command: os_version
***** hangs and does nothing *****

[needle][dependency_installer] >
[needle][dependency_installer] > back
[needle] > set agent_port 4445
AGENT_PORT => 4445
[needle] >
[needle] > use device/dependency_installer
[needle][dependency_installer] > run
[*] Checking connection with device...
[+] Already connected to: 192.168.1.174
[D] Creating temp folder: /var/root/needle/
[D] [REMOTE CMD] Remote Command: if [ -d /var/root/needle/ ]; then echo "yes"; else echo "no" ; fi

Traceback (most recent call last):
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/framework/module.py", line 111, in do_run
pre = self.module_pre()
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/modules/device/dependency_installer.py", line 35, in module_pre
return BaseModule.module_pre(self, bypass_app=True)
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/framework/module.py", line 139, in module_pre
self.device.setup()
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/device/device.py", line 235, in setup
self.remote_op.dir_create(self.TEMP_FOLDER)
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/device/remote_operations.py", line 63, in dir_create
if not self.dir_exist(path):
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/device/remote_operations.py", line 56, in dir_exist
out = self.command_blocking(cmd, internal=True)
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/device/remote_operations.py", line 94, in command_blocking
out, err = self._device._exec_command_ssh(cmd, internal)
File "/Users/ben/Documents/ios/iosation/tools/needle/needle/core/utils/utils.py", line 211, in wrapper
raise Exception("An error occurred and it was not possible to restore it ({} attempts failed)".format(self.tries))
Exception: An error occurred and it was not possible to restore it (3 attempts failed)

[!] Exception: An error occurred and it was not possible to restore it (3 attempts failed)
[needle][dependency_installer] >

Environment

Needle Version

  • Framework (on your machine): 1.3.2
  • Agent (on your device): 1.0.5

Workstation Operating System

High Sierra 10.13.6

Python Version

2.7.15

Python Packages (pip freeze)

asn1crypto==0.23.0
backports-abc==0.5
bcrypt==3.1.4
beautifulsoup4==4.6.3
biplist==1.0.3
bs4==0.0.1
certifi==2017.11.5
cffi==1.11.5
chardet==3.0.4
colorama==0.3.9
configparser==3.5.0
cryptography==2.1.3
Django==1.11.7
enum34==1.1.6
frida==12.0.8
frida-tools==1.1.0
idna==2.6
ipaddress==1.0.22
lxml==4.1.1
packaging==18.0
paramiko==2.4.2
pdfkit==0.6.1
pexpect==4.6.0
prompt-toolkit==1.0.15
protobuf==3.5.1
ptyprocess==0.6.0
pyasn1==0.4.4
pycparser==2.19
Pygments==2.2.0
PyNaCl==1.3.0
pyOpenSSL==17.3.0
pyparsing==2.2.2
pytz==2017.3
pyxdg==0.25
requests==2.18.4
rsa==3.4.2
singledispatch==3.4.0.3
six==1.11.0
sshtunnel==0.1.4
style==1.1.0
tornado==4.5.2
update==0.0.1
urllib3==1.22
wcwidth==0.1.7
wxPython==3.0.2.0
wxPython-common==3.0.2.0
zim==0.65

Device iOS Version

10.0.2

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

1 participant