class Wappalyzer: (source)
Python Wappalyzer driver.
Consider the following exemples.
Here is how you can use the latest technologies file from AliasIO/wappalyzer repository.
from Wappalyzer import Wappalyzer wappalyzer=Wappalyzer.latest(update=True) # Create webpage webpage=WebPage.new_from_url('http://example.com') # analyze results = wappalyzer.analyze_with_categories(webpage)
Here is how you can custom request and headers arguments:
import requests from Wappalyzer import Wappalyzer, WebPage wappalyzer = Wappalyzer.latest() webpage = WebPage.new_from_url('http://exemple.com', headers={'User-Agent': 'Custom user agent'}) wappalyzer.analyze_with_categories(webpage)
Method | __init__ |
Manually initialize a new Wappalyzer instance. |
Instance Variable | categories |
Undocumented |
Instance Variable | technologies |
Undocumented |
Class Method | latest |
Construct a Wappalyzer instance. |
Method | get_categories |
Returns a list of the categories for an technology name. |
Method | get_versions |
Retuns a list of the discovered versions for an app name. |
Method | get_confidence |
Returns the total confidence for an app name. |
Method | analyze |
Return a set of technology that can be detected on the web page. |
Method | analyze_with_versions |
Return a dict of applications and versions that can be detected on the web page. |
Method | analyze_with_categories |
Return a dict of technologies and categories that can be detected on the web page. |
Method | analyze_with_versions_and_categories |
Return a dict of applications and versions and categories that can be detected on the web page. |
Instance Variable | _confidence_regexp |
Undocumented |
Static Method | _find_files |
No summary |
Method | _prepare_technology |
Normalize technology data, preparing it for the detection phase. |
Method | _prepare_pattern |
Strip out key:value pairs from the pattern and compile the regular expression. |
Method | _has_technology |
Determine whether the web page matches the technology signature. |
Method | _set_detected_app |
Store detected app. |
Method | _set_app_version |
Resolve version number (find the longest version number that is supposed to contains all shorter detected version numbers). |
Method | _get_implied_technologies |
Get the set of technologies implied by detected_technologies . |
Method | _sort_app_versions |
Undocumented |
Method | _cmp_to_key |
Convert a cmp= function into a key= function |
Construct a Wappalyzer instance.
Use update=True to download the very latest file from internet. Do not update if the file has already been updated in the last 24 hours. New in version 0.4.0
Use technologies_file=/some/path/technologies.json to load a custom technologies file.
If no arguments is passed, load the default data/technologies.json file inside the package ressource.
Parameters | technologies_file | File path (type: str ) |
update | Download and use the latest technologies.json file
from AliasIO/wappalyzer repository. (type: bool ) | |
Returns | Undocumented (type: Wappalyzer ) |
env_location
: list of environment variable to use as a base path. Exemple: ['HOME', 'XDG_CONFIG_HOME', 'APPDATA', 'PWD']
- potential_files
: list of filenames. Exemple: ['.myapp/conf.ini',]
- default_content
: Write default content if the file does not exist
- create
: Create the file in the first existing env_location with default content if the file does not existParameters | env_location | Undocumented (type: List[str] ) |
potential_files | Undocumented (type: List[str] ) | |
default_content | Undocumented (type: str ) | |
create | Undocumented (type: bool ) | |
Returns | Undocumented (type: List[str] ) |
Parameters | technology | Undocumented (type: Dict[str, Any] ) |
Resolve version number (find the longest version number that is supposed to contains all shorter detected version numbers).
TODO: think if it's the right wat to handled version detection.
Parameters | app | Undocumented (type: Dict[str, Any] ) |
Return a dict of technologies and categories that can be detected on the web page.
>>> wappalyzer.analyze_with_categories(webpage) {'Amazon ECS': {'categories': ['IaaS']}, 'Amazon Web Services': {'categories': ['PaaS']}, 'Azure CDN': {'categories': ['CDN']}, 'Docker': {'categories': ['Containers']}}
Parameters | webpage | The Webpage to analyze (type: WebPage ) |
Returns | Undocumented (type: Dict[str, Dict[str, Any]] ) |
Return a dict of applications and versions and categories that can be detected on the web page.
>>> 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']}}
Parameters | webpage | The Webpage to analyze (type: WebPage ) |
Returns | Undocumented (type: Dict[str, Dict[str, Any]] ) |