maaaaz / webscreenshot

A simple script to screenshot a list of websites
GNU Lesser General Public License v3.0
654 stars 162 forks source link

Shell command PID xxxx returned abnormal error code '-6'. #5

Closed BitSledge closed 8 years ago

BitSledge commented 8 years ago

Hello, having some issues getting this to run. Just for a test here is what is happening:

list.txt google.com twitter.com

command being issued: python webscreenshot.py -i testlist.txt -vv

Output:

python webscreenshot.py -i testlist.txt -vv

webscreenshot.py version 1.8

[DEBUG][General] Options: {'log_level': 'DEBUG', 'http_username': None, 'input_file': 'testlist.txt', 'workers': 2, 'output_directory': None, 'header': None, 'verbosit y': 2, 'cookie': None, 'proxy': None, 'timeout': 30, 'proxy_auth': None, 'http_password': None, 'ssl': False, 'port': None}

[INFO][General] 'google.com' has been formatted as 'http://google.com:80' with supplied overriding options
[+] 1 URLs to be screenshot
[DEBUG][http://google.com:80] Shell command to be executed
'phantomjs --ignore-ssl-errors true --ssl-protocol any "/home/osintscreenshot/webscreenshot/original/webscreenshot.js" url_capture="http://google.com:80" output_file=" /home/osintscreenshot/webscreenshot/original/screenshots/http_google.com_80.png"'

[ERROR][http://google.com:80] Shell command PID 29124 returned an abnormal error code: '-6'
[ERROR][http://google.com:80] Screenshot somehow failed

[+] 0 actual URLs screenshot
[+] 1 error(s)
http://google.com:80

Any ideas?

maaaaz commented 8 years ago

Hello,

I don't have any idea, this might be a network issue:

$ phantomjs --debug=true --ignore-ssl-errors true --ssl-protocol any "/home/osintscreenshot/webscreenshot/original/webscreenshot.js" url_capture="http://google.com:80" output_file="
/home/osintscreenshot/webscreenshot/original/screenshots/http_google.com_80.png"

Thanks.

BitSledge commented 8 years ago

Thanks for the response,

Here is the output:

root@Dark-Web-OSINT:/home/osintscreenshot/webscreenshot# phantomjs --debug=true -s --debug=true "/home/osintscreenshot/webscreenshot/original/webscreenshot.js" url_capture="http://google. com:80" output_file=/home/osintscreenshot/webscreenshot/original/screenshots/http_google.com_80.png

QXcbConnection: Could not connect to display
PhantomJS has crashed. Please read the bug reporting guide at
http://phantomjs.org/bug-reporting.html and file a bug report.
Aborted (core dumped)

Does this mean it needs an X server or x11 forwarded? (Currently running on Ubuntu server 16.04)

maaaaz commented 8 years ago

Indeed it seems to be a trouble related to phantomjs: which version du you use ? Try with different versions:

If it still does not work, try to look for your error on issues of the phantomjs github repo.

Cheers.

RobinVogel commented 4 years ago

I might be here a bit late, but I was running into the same problem. It does need an X server, and it worked without one by setting the variable DISPLAY with export DISPLAY=":0".

maaaaz commented 4 years ago

@RobinVogel

Indeed, and from few versions there's a specific option to solve this: https://github.com/maaaaz/webscreenshot/wiki/FAQ#headless-os