code-scan starred python-Wappalyzer
2020-12-19 00:58:31 Author: github.com(查看原文) 阅读量:172 收藏

python-Wappalyzer

https://travis-ci.org/chorsley/python-Wappalyzer.svg?branch=master https://coveralls.io/repos/github/chorsley/python-Wappalyzer/badge.svg?branch=master

Python implementation of the Wappalyzer web application detection utility.

Install

$ pip install python-Wappalyzer

Require Python3.6 or later.

Usage

The API exposes two objects: Wappalyzer.Wappalyzer and Wappalyzer.WebPage.

>>> from Wappalyzer import Wappalyzer, WebPage
# Download and use the latest technologies file from AliasIO/wappalyzer repository
>>> wappalyzer = Wappalyzer.latest(update=True)
>>> webpage = WebPage.new_from_url('http://example.com')
>>> wappalyzer.analyze(webpage)
{'Docker', 'Azure CDN', 'Amazon Web Services', 'Amazon ECS'}
>>> wappalyzer.analyze_with_categories(webpage)
{'Amazon ECS': {'categories': ['IaaS']},
 'Amazon Web Services': {'categories': ['PaaS']},
 'Azure CDN': {'categories': ['CDN']},
 'Docker': {'categories': ['Containers']}}
>>> webpage = WebPage.new_from_url('http://wordpress-example.com')
>>> wappalyzer.analyze_with_versions_and_categories(webpage)
{'Font Awesome': {'categories': ['Font scripts'], 'versions': ['5.4.2']},
 'Google Font API': {'categories': ['Font scripts'], 'versions': []},
 'MySQL': {'categories': ['Databases'], 'versions': []},
 'Nginx': {'categories': ['Web servers', 'Reverse proxies'], 'versions': []},
 'PHP': {'categories': ['Programming languages'], 'versions': ['5.6.40']},
 'WordPress': {'categories': ['CMS', 'Blogs'], 'versions': ['5.4.2']},
 'Yoast SEO': {'categories': ['SEO'], 'versions': ['14.6.1']}}

Read the API Reference for more documentation.

CLI

Additionnaly, there is now a CLI interface. It prints the analyzer results as JSON:

% python -m Wappalyzer -h

usage: __main__.py [-h] [--update] [--user-agent USERAGENT] [--timeout TIMEOUT] [--no-verify] url

python-Wappalyzer CLI

positional arguments:
url URL to analyze
optional arguments:
-h, --help show this help message and exit
--update Update the technologies file from the internet
--user-agent USERAGENT
 Request user agent
--timeout TIMEOUT
 Request timeout
--no-verify Skip SSL cert verify
Note:
Last version to support Python2 was 0.2.2.

文章来源: https://github.com/chorsley/python-Wappalyzer
如有侵权请联系:admin#unsafe.sh