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

OSX - File not found #54

Closed
MindNinja opened this issue Mar 27, 2018 · 11 comments
Closed

OSX - File not found #54

MindNinja opened this issue Mar 27, 2018 · 11 comments
Assignees
Labels
bug Something isn't working Mac OS X Issue specific on Mac OS X

Comments

@MindNinja
Copy link

MindNinja commented Mar 27, 2018

On Macs, your download (V.6) is not working. Below is the error. I believe you have hard coded some paths into the app. My mac is on Python 2.7.10

[INFO] serving report server at port: 8080
[INFO] serving dragdrop server at port: 8000
0:38: execution error: File some object wasn’t found. (-43)
^CTraceback (most recent call last):
  File "/Users/travis/build/vincentcox/StaCoAn/src/stacoan.py", line 264, in <module>
  File "/Users/travis/build/vincentcox/StaCoAn/src/stacoan.py", line 151, in program
  File "/Users/travis/build/vincentcox/StaCoAn/src/stacoan.py", line 117, in server
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 1056, in join
  File "/usr/local/Cellar/python/3.6.4_3/Frameworks/Python.framework/Versions/3.6/lib/python3.6/threading.py", line 1072, in _wait_for_tstate_lock
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/travis/build/vincentcox/StaCoAn/src/stacoan.py", line 264, in <module>
KeyboardInterrupt
[9549] Failed to execute script stacoan
L-75
@sa7mon
Copy link

sa7mon commented Mar 28, 2018

I get the same 0:38: execution error: File some object wasn’t found. (-43) error.

Running the application in both Python 2.7 and 3.6 gives the same result. Running MacOS 10.13.3

@vincentcox vincentcox self-assigned this Mar 28, 2018
@vincentcox vincentcox added bug Something isn't working Mac OS X Issue specific on Mac OS X labels Mar 28, 2018
@vincentcox
Copy link
Owner

Thanks for reporting this guys! Are you guys running the release? Or are you running it by downloading the source and executing it via python?

@vincentcox
Copy link
Owner

Keep in mind that this project is only tested on python3. Make sure to invoke python3 stacoan.py -d test-apk.apk instead of python stacoan.py -d test-apk.apk.

@sa7mon
Copy link

sa7mon commented Mar 28, 2018

The error seems to happen on both the 0.6 release, and the master branch as of writing (last commit: 49ac37a)

Environment:
OSX 10.13.3
Python: 3.6.4

Stacktrace:

(venv) (venv)sphynx:/Volumes/DATA/Projects/StaCoAn/src $ python3 ./stacoan.py
[INFO] serving report server at port: 8080
[INFO] serving dragdrop server at port: 8000
0:38: execution error: File some object wasn’t found. (-43)
69:77: execution error: Can’t get application "chrome". (-1728)
[INFO] GET / HTTP/1.1 200 -
[INFO] TrueFile '/Volumes/DATA/Projects/StaCoAn/src/com.spotify.apk' upload success!by: ('127.0.0.1', 56254)
[INFO] POST / HTTP/1.1 200 -
[INFO] serving report server at port: 8080
Process Process-1:
Traceback (most recent call last):
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "./stacoan.py", line 151, in program
    server(args, server_enabled, DRAG_DROP_SERVER_PORT)
  File "./stacoan.py", line 92, in server
    reportserver = ServerWrapper.create_reportserver()
  File "/Volumes/DATA/Projects/StaCoAn/src/helpers/server.py", line 31, in create_reportserver
    return socketserver.TCPServer(("", ServerWrapper.REPORT_SERVER_PORT), RequestHandlerClass=ServerWrapper.reportserver)
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 453, in __init__
    self.server_bind()
  File "/usr/local/Cellar/python3/3.6.4_2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/socketserver.py", line 467, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 48] Address already in use

The error about Chrome is probably unrelated and due to the fact that I run Firefox.

@vincentcox
Copy link
Owner

I think I have an idea why this is. The program uses a frequently used port (8080) which in your case is used. Because the program cannot opens this port, the rest of the program doesn't get certain information, causing some objects to not be found by StaCoAn.
I will fix this by changing the port number to something less frequent.

About the chrome thing, it's also a bug (wrong assumption of me that everybody has chrome), thanks for reporting.

Summary: To fix

  • Change default ports to less frequent ones
  • Find a way to open the default browser of the user.

@sa7mon
Copy link

sa7mon commented Mar 28, 2018

Awesome, thanks for the prompt responses. Might I suggest that in addition to using a less-common port you add an argument or config somewhere where the user can specify the port to use?

Also, the Chrome error message is less critical than it seems. The page does open in Firefox after it gives the Chrome error, but the address is file://127.0.0.1:8080 which doesn't work until I change it to http://localhost:8080 so it's not trying to serve from the filesystem as opposed to the webserver.

@vincentcox
Copy link
Owner

Ah that's a good thing you mention that. I added that also on the roadmap (use file:// when server is disabled and https:// when server is enabled).

vincentcox added a commit that referenced this issue Apr 1, 2018
vincentcox added a commit that referenced this issue Apr 1, 2018
@vincentcox
Copy link
Owner

Can you guys try with the latest update in the development branch?

git clone -b develop https://github.com/vincentcox/stacoan

If both the chrome and the 'File some object wasn’t found'-error is fixed I will push this to master and make a new executable.

@sa7mon
Copy link

sa7mon commented Apr 1, 2018

Running with Python 3.6.5 yields the following:

screen shot 2018-04-01 at 09 25 13

@vincentcox vincentcox mentioned this issue Apr 2, 2018
vincentcox added a commit that referenced this issue Apr 2, 2018
* Mac issue: #54

* Server fix

* Bug fixes

* update readme
@vincentcox
Copy link
Owner

I could reproduce it and I have created a fix in the dev branch. The issue seems fixed for me but I want to confirm this with you guys. Happy easter by the way!

vincentcox added a commit that referenced this issue Apr 2, 2018
* Update readme file

- Table of contents
- Releases documentation

* improved regexes (#52)

* Update readme file (#51)

- Table of contents
- Releases documentation

* Update db_search_words.txt

* Update src_search_words.txt

* Update exclusion_list.txt

* Update src_search_words.txt

* Update db_search_words.txt

* Owasp integration

* Various fixes and improvements
- Update wordlists
- Converted searchwords code into object oriented code
- Comments are now placed in the report

* Change port to less common ports

Fix for #54

* Fix browser issue + cleaner logging

#54

* Added Contributor + screenshot readme

- Added Ayowel to top contributor's
- Added section "How does the tool works?"

* Download demo report immediately when clicking on the link (#57)

* Update readme file (#51)

- Table of contents
- Releases documentation

* Download demo report immediately when clicking on the link

* Fix mac (#60)

Mac issue: #54

* Server fix
@vincentcox
Copy link
Owner

Feel free to re-open this issue if you still get the error with this new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Mac OS X Issue specific on Mac OS X
Projects
None yet
Development

No branches or pull requests

3 participants