1
Fork 0
mirror of https://github.com/Steffo99/estus.git synced 2024-11-25 00:54:18 +00:00

Fix subnet mask display code

This commit is contained in:
Steffo 2017-09-18 16:43:30 +02:00
parent d0f8c08363
commit cb111e09f7

View file

@ -197,7 +197,7 @@ def login(username, password):
def subnet_to_string(integer):
"""Converte una subnet mask in numero in una stringa"""
still_int = (0xFFFFFFFF << (32 - integer)) & 0xFFFFFFFF
return f"{still_int >> 24}.{(still_int >> 16) & 0xFF}.{(still_int >> 8)}.{still_int & 0xFF}"
return f"{still_int >> 24}.{(still_int >> 16) & 0xFF}.{(still_int >> 8 & 0xFF)}.{still_int & 0xFF}"
# Sito