How long have I been lonely or not?
I feel that the world is stealing and laughing.
So what do you write today? Just share a very old security tool - whatweb, I believe many friends should know, used to scan the web fingerprint. I will use it for you, because the project needs it, you can actually use it, because I have written a lot of plug-ins for scanning fingerprints. This is just a record selection. But since it is used, it is natural to call it. Ok, let me introduce how to install, and then how to use it. The focus of this article is on environment installation, and how to compare
elegant with whatweb in python code.
First delete the original ruby:
Don’t forget to take effect:
Install rvm first, this is ruby’s package manager:
Test whether the installation is successful:
Speaking of this is very simple, go directly to the project under the github clone:
There are already compiled executable files in the project, whatweb, only need to add an environment variable:
For detailed and detailed usage, please refer to [github] (https://github.com/urbanadventurer/WhatWeb). I will only introduce how to use whatweb in python.
Not much nonsense, directly on the code:
Description: Explain the code, mainly a regular expression, because running whatweb will print the results directly, of course, there are other commands that can output the results to text, etc., but if you want to automate the scan, you need to get the content of whatweb in real time. The way to generate the file is obviously not good, so I used the commands library, let python execute the system command and get the return result, then a few regular matches on the result.
The language of the end: another water, ah!