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

Error: p1 = Popen([adb, 'devices'], stdout=PIPE, stdin=PIPE, stderr=STDOUT) #50

Closed
ulises2k opened this issue Aug 31, 2016 · 4 comments
Closed

Comments

@ulises2k
Copy link

When I run

!/bin/bash

DirApp=$1
APK=$(echo $2 | sed 's/"//g')

cd $DirApp

rm -fr report/build/ logs/ exploit/
python ./qark.py --acceptterms ACCEPTTERMS --source 1 --pathtoapk "/tmp/$APK.apk" --exploit 1 --install 0 --debug 10 --reportdir "Report_$APK"

StackTrace:

Traceback (most recent call last):
File "./qark.py", line 1027, in
apkList = list_all_apk()
File "./qark.py", line 217, in list_all_apk
p1 = Popen([adb, 'devices'], stdout=PIPE, stdin=PIPE, stderr=STDOUT)
File "/usr/lib/python2.7/subprocess.py", line 711, in init
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error

@ulises2k
Copy link
Author

The problem is in line 1021

            install_option = common.args.install
            if install_option:
                install = "y"
            else:
                install_option = "n"
        if install=='y':
            apkList = list_all_apk()

The option --install 0 is equal a true that install = "y"

@ulises2k
Copy link
Author

Help:
python qark.py --help

-i INSTALL, --install INSTALL
1 to install exploit APK on the device, 0 to skip

@ulises2k
Copy link
Author

if you run
python ./qark.py --acceptterms ACCEPTTERMS --source 1 --pathtoapk "/tmp/$APK.apk" --exploit 1 --debug 10 --reportdir "Report_$APK"

Error:

ERROR - --install flag missing. Possible values 0/1

@nwalsh1995
Copy link
Contributor

Hi @ulises2k, I'm not quite sure of your exact problem but it might be solved with the most recent release as we are now providing sane defaults for command line arguments. Suggest to update your version and try again.

@neilatli neilatli closed this as completed Nov 1, 2017
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