What is the key feature used for Fortigate version detection, and how is it extracted from the page source?

Each Fortigate version returns a unique 32-bit hexadecimal string in the page source code. This string can be extracted using regex matching in Python. However, note that the response may be gzip-encoded, so you need to decode it using gzip to get the original text before extraction. The full implementation is available in the [open-source code](https://github.com/3gstudent/Homework-of-Python/blob/master/Fortigate_GetVersion.py). Similar fingerprint-based version detection is used for other systems, as described in [Minio version detection](/news/penetration-basics-minio-version-detection).