class documentation

class Wappalyzer: (source)

View In Hierarchy

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
def __init__(self, categories, technologies): (source)

Manually initialize a new Wappalyzer instance.

You might want to use the factory method: latest

ParameterscategoriesMap of category ids to names, as in technologies.json. (type: Dict[str, Any])
technologiesMap of technology names to technology dicts, as in technologies.json. (type: Dict[str, Any])
categories = (source)

Undocumented

technologies = (source)

Undocumented

_confidence_regexp = (source)

Undocumented

@classmethod
def latest(cls, technologies_file=None, update=False): (source)

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.

Parameterstechnologies_fileFile path (type: str)
updateDownload and use the latest technologies.json file from AliasIO/wappalyzer repository. (type: bool)
ReturnsUndocumented (type: Wappalyzer)
@staticmethod
def _find_files(env_location, potential_files, default_content='', create=False): (source)
Find existent files based on folders name and file names. Arguments: - 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 exist
Parametersenv_locationUndocumented (type: List[str])
potential_filesUndocumented (type: List[str])
default_contentUndocumented (type: str)
createUndocumented (type: bool)
ReturnsUndocumented (type: List[str])
def _prepare_technology(self, technology): (source)
Normalize technology data, preparing it for the detection phase.
ParameterstechnologyUndocumented (type: Dict[str, Any])
def _prepare_pattern(self, pattern): (source)
Strip out key:value pairs from the pattern and compile the regular expression.
ParameterspatternUndocumented (type: Union[str, List[str]])
ReturnsUndocumented (type: List[Dict[str, Any]])
def _has_technology(self, technology, webpage): (source)
Determine whether the web page matches the technology signature.
ParameterstechnologyUndocumented (type: Dict[str, Any])
webpageUndocumented (type: WebPage)
ReturnsUndocumented (type: bool)
def _set_detected_app(self, app, app_type, pattern, value, key=''): (source)
Store detected app.
ParametersappUndocumented (type: Dict[str, Any])
app_typeUndocumented (type: str)
patternUndocumented (type: Dict[str, Any])
valueUndocumented (type: str)
keyUndocumented
def _set_app_version(self, app): (source)

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.

ParametersappUndocumented (type: Dict[str, Any])
def _get_implied_technologies(self, detected_technologies): (source)
Get the set of technologies implied by detected_technologies.
Parametersdetected_technologiesUndocumented (type: Iterable[str])
ReturnsUndocumented (type: Iterable[str])
def get_categories(self, tech_name): (source)
Returns a list of the categories for an technology name.
Parameterstech_nameTech name (type: str)
ReturnsUndocumented (type: List[str])
def get_versions(self, app_name): (source)
Retuns a list of the discovered versions for an app name.
Parametersapp_nameApp name (type: str)
ReturnsUndocumented (type: List[str])
def get_confidence(self, app_name): (source)
Returns the total confidence for an app name.
Parametersapp_nameApp name (type: str)
ReturnsUndocumented (type: Optional[int])
def analyze(self, webpage): (source)
Return a set of technology that can be detected on the web page.
ParameterswebpageThe Webpage to analyze (type: WebPage)
ReturnsUndocumented (type: Set[str])
def analyze_with_versions(self, webpage): (source)
Return a dict of applications and versions that can be detected on the web page.
ParameterswebpageThe Webpage to analyze (type: WebPage)
ReturnsUndocumented (type: Dict[str, Dict[str, Any]])
def analyze_with_categories(self, webpage): (source)

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']}}
ParameterswebpageThe Webpage to analyze (type: WebPage)
ReturnsUndocumented (type: Dict[str, Dict[str, Any]])
def analyze_with_versions_and_categories(self, webpage): (source)

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']}}
ParameterswebpageThe Webpage to analyze (type: WebPage)
ReturnsUndocumented (type: Dict[str, Dict[str, Any]])
def _sort_app_versions(self, version_a, version_b): (source)

Undocumented

Parametersversion_aUndocumented (type: str)
version_bUndocumented (type: str)
ReturnsUndocumented (type: int)
def _cmp_to_key(self, mycmp): (source)
Convert a cmp= function into a key= function
ParametersmycmpUndocumented (type: Callable[..., Any])
API Documentation for python-Wappalyzer, generated by pydoctor 21.2.2 at 2021-06-15 15:04:17.