Per Ola Kristensson | Resolve IP addresses in AWStats

Impact / Press
Other Stuff


This is a small Python script that reads an AWStats URL (typically, the hosts URL) and outputs a new HTML file with IP addresses resolved via reverse lookup.

The script requires Python 3 or higher, Beautiful Soup and Requests. To use the script, fill out the variables url, user and pw:

The script outputs a file called awstats_resolved.html. It may take a while for the script to complete as an individual reverse lookup may hang for up to ten seconds.

Source code (change the extension from .txt to .py)


The code is open source and licensed under the MIT license. The license is included in the source code files above. Among other things, it allows commercial and non-commercial use of the code free of charge.