Last analyzed 3be6ee4 5 months ago
Default analysis branch is
Currently analyzing run
Consider removing the commented out code block PY-W0069
Anti-pattern
5 months ago6 months old
Consider removing the commented out code block
22            country = country_info.names.get("en", "N/A")
23            country_code = country_info.iso_code
24            city = reader.city(ip).city.names.get("en", "Unknown City")
25            # print(country, country_code, city)26
27    except AddressNotFoundError as e:
28        print(e)
Consider removing the commented out code block
33    try:
34        with geoip2.database.Reader("resources/databases/GeoLite2-ASN.mmdb") as reader:
35
36            # print(response := reader.asn(ip))37            organization = reader.asn(ip).autonomous_system_organization
38            # print(organization)
39
Consider removing the commented out code block
 7
 8
 9def get_post_data() -> dict:
10    # print(request.content_type)11    data: dict = {}
12    if request.content_type.startswith("application/json"):
13        _data = request.get_data()
Consider removing the commented out code block
13        _data = request.get_data()
14        return json.loads(_data.decode("utf-8"))
15    if request.content_type.startswith("application/x-www-form-urlencoded"):
16        # print(urllib.parse.parse_qs(request.get_data().decode("utf-8")))17        return parse_qs_plus(urllib.parse.parse_qs(request.get_data().decode("utf-8")))
18    for key, value in request.form.items():
19        if key.endswith("[]"):
Consider removing the commented out code block
127                logger.exception("")
128                return False
129
130    # @staticmethod131    # def __linux_check_shadowsocks() -> bool:
132    #     sslibev = False
133    #     simpleobfs = False