Closed unformatt closed 4 years ago
Hello,
Thanks for pointing that because I just realized that HTTP authentication is broken since awhile in phantomjs
.
Anyway, I fixed it by using the header
option support, and skipping the builtin basic authentication support of phantomjs:
$ python3 webscreenshot.py -vv -u john -b 'sp ace' 'http://kali.lol'
webscreenshot.py version 2.6
[DEBUG][General] Options: Namespace(URL='http://kali.lol', cookie=None, format='png', header=None, http_password='sp ace', http_username='john', input_file=None, log_level='DEBUG', multiprotocol=False, no_xserver=False, output_directory='/mnt/screenshots', port=None, proxy=None, proxy_auth=None, proxy_type=None, quality=75, renderer='phantomjs', renderer_binary=None, ssl=False, timeout=30, verbosity=2, window_size='1200,800', workers=4)
[INFO][General] 'http://kali.lol' has been formatted as 'http://kali.lol:80' with supplied overriding options
[+] 1 URLs to be screenshot
[DEBUG][http://kali.lol:80] Shell command to be executed
'phantomjs --ignore-ssl-errors=true --ssl-protocol=any --ssl-ciphers=ALL "/mnt/webscreenshot.js" url_capture=http://kali.lol:80 output_file="/mnt/screenshots/http_kali.lol_80.png" header="Authorization: Basic am9objpzcCBhY2U=" width=1200 height=800 format=png quality=75'
[DEBUG][http://kali.lol:80] Shell command PID 2452 ended normally
[INFO][http://kali.lol:80] Screenshot OK
[+] 1 actual URLs screenshot
[+] 0 error(s)
Need to write password in quotes here?