{ "info": { "author": "Thomas D.", "author_email": "tdebize@mail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Information Technology", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Security" ], "description": "webscreenshot\n=============\n\nDescription\n-----------\nA simple script to screenshot a list of websites, based on the [`url-to-image`](https://github.com/kimmobrunfeldt/url-to-image/) PhantomJS script.\n\nFeatures\n--------\n* Integrating url-to-image *'lazy-rendering'* for AJAX resources\n* Fully functional on Windows and Linux systems\n* Cookie and custom HTTP header definition support for the PhantomJS renderer\n* Multiprocessing and killing of unresponding processes after a user-definable timeout\n* Accepting several formats as input target\n* Customizing screenshot size (width, height), format and quality\n* Mapping useful options of PhantomJS such as ignoring ssl error, proxy definition and proxy authentication, HTTP Basic Authentication\n* Supports multiple renderers: \n * **PhantomJS**, which is legacy and [abandoned](https://groups.google.com/forum/#!topic/phantomjs/9aI5d-LDuNE) but the one still producing the best results\n * **Chrome and Chromium**, which will replace PhantomJS but currently have some limitations: screenshoting an HTTPS website not having a valid certificate, for instance a self-signed one, will produce an empty screenshot. \n The reason is that the [`--ignore-certificate-errors`](https://groups.google.com/a/chromium.org/forum/#!topic/headless-dev/eiudRsYdc3A) option doesn't work and will never work anymore: the solution is to use a [proper webdriver](https://bugs.chromium.org/p/chromium/issues/detail?id=697721), but to date `webscreenshot` doesn't aim to support this _rather complex_ method requiring some third-party tools.\n * **Firefox** can also be used as a renderer but has some serious limitations (_so don't use it for the moment_):\n * Impossibility to perform multiple screenshots at the time: no multi-instance of the firefox process\n * No incognito mode, using webscreenshot will pollute your browsing history\n\nUsage\n-----\nPut your targets in a text file and pass it with the `-i` option, or as a positional argument if you have just a single URL. \nScreenshots will be available, by default, in your current ```./screenshots/``` directory. \nAccepted input formats are the following:\n```\nhttp(s)://domain_or_ip:port(/ressource)\ndomain_or_ip:port(/ressource)\ndomain_or_ip(/ressource)\n```\n\n### Options\n```\nwebscreenshot.py version 2.5\n\nusage: webscreenshot.py [-h] [-i INPUT_FILE] [-o OUTPUT_DIRECTORY]\n [-w WORKERS] [-v]\n [-r {phantomjs,chrome,chromium,firefox}]\n [--renderer-binary RENDERER_BINARY] [--no-xserver]\n [--window-size WINDOW_SIZE]\n [-f {pdf,png,jpg,jpeg,bmp,ppm}] [-q [0-100]] [-p PORT]\n [-s] [-m] [-c COOKIE] [-a HEADER] [-u HTTP_USERNAME]\n [-b HTTP_PASSWORD] [-P PROXY] [-A PROXY_AUTH]\n [-T PROXY_TYPE] [-t TIMEOUT]\n [URL]\n\noptional arguments:\n -h, --help show this help message and exit\n\nMain parameters:\n URL Single URL target given as a positional argument\n -i INPUT_FILE, --input-file INPUT_FILE\n text file containing the target list. Ex:\n list.txt\n -o OUTPUT_DIRECTORY, --output-directory OUTPUT_DIRECTORY\n (optional): screenshots output\n directory (default './screenshots/')\n -w WORKERS, --workers WORKERS\n (optional): number of parallel execution\n workers (default 4)\n -v, --verbosity (optional): verbosity level, repeat it to\n increase the level { -v INFO, -vv DEBUG } (default\n verbosity ERROR)\n\nScreenshot parameters:\n -r {phantomjs,chrome,chromium,firefox}, --renderer {phantomjs,chrome,chromium,firefox}\n (optional): renderer to use among\n 'phantomjs' (legacy but best results), 'chrome',\n 'chromium', 'firefox' (version > 57) (default\n 'phantomjs')\n --renderer-binary RENDERER_BINARY\n (optional): path to the renderer\n executable if it cannot be found in $PATH\n --no-xserver (optional): if you are running without\n an X server, will use xvfb-run to execute the renderer\n --window-size WINDOW_SIZE\n (optional): width and height of the\n screen capture (default '1200,800')\n -f {pdf,png,jpg,jpeg,bmp,ppm}, --format {pdf,png,jpg,jpeg,bmp,ppm}\n (optional, phantomjs only): specify an output\n image file format, \"pdf\", \"png\", \"jpg\", \"jpeg\", \"bmp\"\n or \"ppm\" (default 'png')\n -q [0-100], --quality [0-100]\n (optional, phantomjs only): specify the\n output image quality, an integer between 0 and 100\n (default 75)\n\nInput processing parameters:\n -p PORT, --port PORT (optional): use the specified port for each\n target in the input list. Ex: -p 80\n -s, --ssl (optional): enforce ssl for every connection\n -m, --multiprotocol (optional): perform screenshots over\n HTTP and HTTPS for each target\n\nHTTP parameters:\n -c COOKIE, --cookie COOKIE\n (optional): cookie string to add. Ex:\n -c \"JSESSIONID=1234; YOLO=SWAG\"\n -a HEADER, --header HEADER\n
(optional): custom or additional header.\n Repeat this option for every header. Ex: -a \"Host:\n localhost\" -a \"Foo: bar\"\n -u HTTP_USERNAME, --http-username HTTP_USERNAME\n (optional): specify a username for\n HTTP Basic Authentication.\n -b HTTP_PASSWORD, --http-password HTTP_PASSWORD\n (optional): specify a password for\n HTTP Basic Authentication.\n\nConnection parameters:\n -P PROXY, --proxy PROXY\n (optional): specify a proxy. Ex: -P\n http://proxy.company.com:8080\n -A PROXY_AUTH, --proxy-auth PROXY_AUTH\n (optional): provides authentication\n information for the proxy. Ex: -A user:password\n -T PROXY_TYPE, --proxy-type PROXY_TYPE\n (optional): specifies the proxy type,\n \"http\" (default), \"none\" (disable completely), or\n \"socks5\". Ex: -T socks\n -t TIMEOUT, --timeout TIMEOUT\n (optional): renderer execution timeout in\n seconds (default 30 sec)\n```\n\n### Examples\n```\nlist.txt\n--------\nhttp://google.fr\nhttps://216.58.213.131\n216.58.213.131\nhttps://duckduckgo.com/robots.txt\n\n\nDefault execution with a list\n-----------------------------\n$ python webscreenshot.py version 2.3\n\n[+] 4 URLs to be screenshot\n[+] 4 actual URLs screenshot\n[+] 0 error(s)\n\n\nDefault execution with a single URL\n-----------------------------------\n$ python webscreenshot.py -v google.fr\nwebscreenshot.py version 2.3\n\n[INFO][General] 'google.fr' has been formatted as 'http://google.fr:80' with supplied overriding options\n[+] 1 URLs to be screenshot\n[INFO][http://google.fr:80] Screenshot OK\n\n[+] 1 actual URLs screenshot\n[+] 0 error(s)\n\n\nIncreasing verbosity level execution\n-----------------------------------\n$ python webscreenshot.py -i list.txt -v\nwebscreenshot.py version 2.3\n\n[INFO][General] 'http://google.fr' has been formatted as 'http://google.fr:80' with supplied overriding options\n[INFO][General] 'https://216.58.213.131' has been formatted as 'https://216.58.213.131:443' with supplied overriding options\n[INFO][General] '216.58.213.131' has been formatted as 'http://216.58.213.131:80' with supplied overriding options\n[INFO][General] 'https://duckduckgo.com/robots.txt' has been formatted as 'https://duckduckgo.com:443/robots.txt' with supplied overriding options\n[+] 4 URLs to be screenshot\n[INFO][https://duckduckgo.com:443/robots.txt] Screenshot OK\n\n[INFO][http://216.58.213.131:80] Screenshot OK\n\n[INFO][https://216.58.213.131:443] Screenshot OK\n\n[INFO][http://google.fr:80] Screenshot OK\n\n[+] 4 actual URLs screenshot\n[+] 0 error(s)\n\n\nResults\n-------\n$ ls -l screenshots/\ntotal 187\n-rwxrwxrwx 1 root root 53805 May 19 16:04 http_216.58.213.131_80.png\n-rwxrwxrwx 1 root root 53805 May 19 16:05 http_google.fr_80.png\n-rwxrwxrwx 1 root root 53805 May 19 16:04 https_216.58.213.131_443.png\n-rwxrwxrwx 1 root root 27864 May 19 16:04 https_duckduckgo.com_443_robots.txt.png\n```\n \n\n### Supported options by renderers\nOptions not listed here below are supported by every current renderer \n\n| **Option category** | **Option** | **PhantomJS renderer** | **Chrome / Chromium renderer** | **Firefox renderer** |\n|:---------------------:|------------------------------------------------------------------------------|:----------------------:|:------------------------------:|:--------------------:|\n| **Screenshot parameters** | | | | |\n| | format (`-f`) | **Yes** | No | No |\n| | quality (`-q`) | **Yes** | No | No \n| | | | | |\n| **HTTP parameters** | | | | |\n| | cookie (`-c`) | **Yes** | No | No |\n| | header (`-a`) | **Yes** | No | No |\n| | http_username (`-u`) | **Yes** | No | No |\n| | http_password (`-b`) | **Yes** | No | No |\n| | | | | |\n| **Connection parameters** | | | | |\n| | proxy (`-P`) | **Yes** | **Yes** | No |\n| | proxy_auth (`-A`) | **Yes** | No | No |\n| | proxy_type (`-T`) | **Yes** | No | No |\n| | | | | |\n| | Ability to screenshot a HTTPS website with a non-publicly-signed certificate | **Yes** | No | No |\n \n \nRequirements\n------------\n* A Python interpreter with version 2.7 or 3.X\n* The webscreenshot python script: \n * The **easiest way** to setup it: `pip install webscreenshot` and then directly use `$ webscreenshot` \n * Or git clone that repository and `pip install -r requirements.txt` and then `python webscreenshot.py`\n* The PhantomJS tool with at least version 2: follow the [installation guide](https://github.com/maaaaz/webscreenshot/wiki/Phantomjs-installation) and check the [FAQ](https://github.com/maaaaz/webscreenshot/wiki/FAQ) if necessary\n* Chrome, Chromium or Firefox > 57 if you want to use one of these renderers\n* `xvfb` if you want to run `webscreenshot` in an headless OS: use the `--no-xserver` webscreenshot option to ease everything\n\nChangelog\n---------\n* version 2.5 - 09/22/2019: Image quality and format options added, PhantomJS useragent updated, modern TLD support\n* version 2.4 - 05/30/2019: Few fixes for Windows support\n* version 2.3 - 05/19/2019: Python 3 compatibility, Firefox renderer added, no-xserver option added\n* version 2.2 - 08/13/2018: Chrome and Chromium renderers support and single URL support\n* version 2.1 - 01/14/2018: Multiprotocol option addition and PyPI packaging\n* version 2.0 - 03/08/2017: Adding proxy-type option\n* version 1.9 - 01/10/2017: Using ALL SSL/TLS ciphers\n* version 1.8 - 07/05/2015: Option groups definition\n* version 1.7 - 06/28/2015: HTTP basic authentication support + loglevel option changed to verbosity\n* version 1.6 - 04/23/2015: Transparent background fix\n* version 1.5 - 01/11/2015: Cookie and custom HTTP header support\n* version 1.4 - 10/12/2014: url-to-image PhantomJS script integration + few bugs corrected\n* version 1.3 - 08/05/2014: Windows support + few bugs corrected\n* version 1.2 - 04/27/2014: Few bugs corrected\n* version 1.1 - 04/21/2014: Changed the script to use PhantomJS instead of the buggy wkhtml binary \n* version 1.0 - 01/12/2014: Initial commit\n\nCopyright and license\n---------------------\nwebscreenshot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\n\nwebscreenshot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. \n\nSee the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with webscreenshot. \nIf not, see http://www.gnu.org/licenses/.\n\nContact\n-------\n* Thomas Debize < tdebize at mail d0t com >", "description_content_type": "text/markdown; charset=UTF-8;", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/maaaaz/webscreenshot", "keywords": "webscreenshot web screenshot phantomjs chrome chromium firefox lazy rendering", "license": "LGPL", "maintainer": "", "maintainer_email": "", "name": "webscreenshot", "package_url": "https://pypi.org/project/webscreenshot/", "platform": "", "project_url": "https://pypi.org/project/webscreenshot/", "project_urls": { "Homepage": "https://github.com/maaaaz/webscreenshot" }, "release_url": "https://pypi.org/project/webscreenshot/2.5/", "requires_dist": null, "requires_python": ">=2.7", "summary": "A simple script to screenshot a list of websites", "version": "2.5" }, "last_serial": 5869216, "releases": { "2.1": [ { "comment_text": "", "digests": { "md5": "9efbc0c76dca31c3a325a18becf5ca53", "sha256": "3d5be0c5b3123c5cacd1ffa2f5a2488a84291e7f0ad2373d4337058410522d12" }, "downloads": -1, "filename": "webscreenshot-2.1.tar.gz", "has_sig": false, "md5_digest": "9efbc0c76dca31c3a325a18becf5ca53", "packagetype": "sdist", "python_version": "source", "requires_python": "<3", "size": 14812, "upload_time": "2018-01-14T13:32:12", "url": "https://files.pythonhosted.org/packages/c6/16/27590da3c0e679d42222a9be450a8503e4e35f75856397b03b54f81894d6/webscreenshot-2.1.tar.gz" } ], "2.2.1": [ { "comment_text": "", "digests": { "md5": "a0166019fc3b87885d7703f1ff66a49c", "sha256": "301a21c17a12c213ca5acfb4da7b14cd2954f79b061ae8855648e5d0f669f579" }, "downloads": -1, "filename": "webscreenshot-2.2.1.tar.gz", "has_sig": false, "md5_digest": "a0166019fc3b87885d7703f1ff66a49c", "packagetype": "sdist", "python_version": "source", "requires_python": "<3", "size": 16752, "upload_time": "2018-08-13T16:50:20", "url": "https://files.pythonhosted.org/packages/80/b3/7c626c375c3e1e00633857edaade1456fa5fce7fb43729201f335ca04499/webscreenshot-2.2.1.tar.gz" } ], "2.3": [ { "comment_text": "", "digests": { "md5": "35be1afd0d6b881fc516c8120fb0c074", "sha256": "5a4cbc255de4111d04bfacfd68cf95676323cb392727ce2591642c63569e2710" }, "downloads": -1, "filename": "webscreenshot-2.3.tar.gz", "has_sig": false, "md5_digest": "35be1afd0d6b881fc516c8120fb0c074", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 18389, "upload_time": "2019-05-19T14:33:12", "url": "https://files.pythonhosted.org/packages/6a/db/64214c95bd25091329b202790bb1ba70ccb0277f80e9904cb78bb455b2a1/webscreenshot-2.3.tar.gz" } ], "2.4": [ { "comment_text": "", "digests": { "md5": "959b0e1b045a8d474cc1e20865c4a6c9", "sha256": "e77890157daaee0ecd7fc4bbac6c340015ca874baac7ab5b36d2d258f9667a78" }, "downloads": -1, "filename": "webscreenshot-2.4.tar.gz", "has_sig": false, "md5_digest": "959b0e1b045a8d474cc1e20865c4a6c9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 18496, "upload_time": "2019-05-30T16:16:33", "url": "https://files.pythonhosted.org/packages/86/e6/798fc366309010e432526bb3689fa2cab98ea50cbe6ea2444a6eb5d22cd5/webscreenshot-2.4.tar.gz" } ], "2.5": [ { "comment_text": "", "digests": { "md5": "c2478c2c291b520bf467b98bb6612e74", "sha256": "76156c6985583275b79f211b504330317cd70548238d94e7226582f3932b6e88" }, "downloads": -1, "filename": "webscreenshot-2.5.tar.gz", "has_sig": false, "md5_digest": "c2478c2c291b520bf467b98bb6612e74", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 19968, "upload_time": "2019-09-22T14:08:04", "url": "https://files.pythonhosted.org/packages/90/b1/e06c979d23b8ac5ee992778d58918fd118479477ccd24f6987fa2c5e04fa/webscreenshot-2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c2478c2c291b520bf467b98bb6612e74", "sha256": "76156c6985583275b79f211b504330317cd70548238d94e7226582f3932b6e88" }, "downloads": -1, "filename": "webscreenshot-2.5.tar.gz", "has_sig": false, "md5_digest": "c2478c2c291b520bf467b98bb6612e74", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7", "size": 19968, "upload_time": "2019-09-22T14:08:04", "url": "https://files.pythonhosted.org/packages/90/b1/e06c979d23b8ac5ee992778d58918fd118479477ccd24f6987fa2c5e04fa/webscreenshot-2.5.tar.gz" } ] }