prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Scapy overides platform
  Scapy exports the platform name, and could override the platform module. This is likely the issue: https://github.com/secdev/scapy/blob/b0506a1e22321eba41d5c21d26bba418de04bc8f/scapy/consts.py#L10
  
  Here are the example:
  
  ```shell
  python issue.py 
  <class 'str'>
  <class 'module'>
  ```
  
  ```python
  import platform
  from scapy.all import *
  print(type(platform))
  
  import platform
  print(type(platform))
  ```
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `scapy/consts.py`
  Content:
  ```
  1 # SPDX-License-Identifier: GPL-2.0-only
  2 # This file is part of Scapy
  3 # See https://scapy.net/ for more information
  4 # Copyright (C) Philippe Biondi <phil@secdev.org>
  5 
  6 """
  7 This file contains constants
  8 """
  9 
  10 from sys import byteorder, platform, maxsize
  11 import platform as platform_lib
  12 
  13 LINUX = platform.startswith("linux")
  14 OPENBSD = platform.startswith("openbsd")
  15 FREEBSD = "freebsd" in platform
  16 NETBSD = platform.startswith("netbsd")
  17 DARWIN = platform.startswith("darwin")
  18 SOLARIS = platform.startswith("sunos")
  19 WINDOWS = platform.startswith("win32")
  20 WINDOWS_XP = platform_lib.release() == "XP"
  21 BSD = DARWIN or FREEBSD or OPENBSD or NETBSD
  22 # See https://docs.python.org/3/library/platform.html#cross-platform
  23 IS_64BITS = maxsize > 2**32
  24 BIG_ENDIAN = byteorder == 'big'
  25 # LOOPBACK_NAME moved to conf.loopback_name
  26
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/scapy/consts.py b/scapy/consts.py
  --- a/scapy/consts.py
  +++ b/scapy/consts.py
  @@ -10,6 +10,20 @@
   from sys import byteorder, platform, maxsize
   import platform as platform_lib
   
  +__all__ = [
  +    "LINUX",
  +    "OPENBSD",
  +    "FREEBSD",
  +    "NETBSD",
  +    "DARWIN",
  +    "SOLARIS",
  +    "WINDOWS",
  +    "WINDOWS_XP",
  +    "BSD",
  +    "IS_64BITS",
  +    "BIG_ENDIAN",
  +]
  +
   LINUX = platform.startswith("linux")
   OPENBSD = platform.startswith("openbsd")
   FREEBSD = "freebsd" in platform
  
verification_info: {"golden_diff": "diff --git a/scapy/consts.py b/scapy/consts.py\n--- a/scapy/consts.py\n+++ b/scapy/consts.py\n@@ -10,6 +10,20 @@\n from sys import byteorder, platform, maxsize\n import platform as platform_lib\n \n+__all__ = [\n+    \"LINUX\",\n+    \"OPENBSD\",\n+    \"FREEBSD\",\n+    \"NETBSD\",\n+    \"DARWIN\",\n+    \"SOLARIS\",\n+    \"WINDOWS\",\n+    \"WINDOWS_XP\",\n+    \"BSD\",\n+    \"IS_64BITS\",\n+    \"BIG_ENDIAN\",\n+]\n+\n LINUX = platform.startswith(\"linux\")\n OPENBSD = platform.startswith(\"openbsd\")\n FREEBSD = \"freebsd\" in platform\n", "issue": "Scapy overides platform\nScapy exports the platform name, and could override the platform module. This is likely the issue: https://github.com/secdev/scapy/blob/b0506a1e22321eba41d5c21d26bba418de04bc8f/scapy/consts.py#L10\r\n\r\nHere are the example:\r\n\r\n```shell\r\npython issue.py \r\n<class 'str'>\r\n<class 'module'>\r\n```\r\n\r\n```python\r\nimport platform\r\nfrom scapy.all import *\r\nprint(type(platform))\r\n\r\nimport platform\r\nprint(type(platform))\r\n```\n", "before_files": [{"content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nThis file contains constants\n\"\"\"\n\nfrom sys import byteorder, platform, maxsize\nimport platform as platform_lib\n\nLINUX = platform.startswith(\"linux\")\nOPENBSD = platform.startswith(\"openbsd\")\nFREEBSD = \"freebsd\" in platform\nNETBSD = platform.startswith(\"netbsd\")\nDARWIN = platform.startswith(\"darwin\")\nSOLARIS = platform.startswith(\"sunos\")\nWINDOWS = platform.startswith(\"win32\")\nWINDOWS_XP = platform_lib.release() == \"XP\"\nBSD = DARWIN or FREEBSD or OPENBSD or NETBSD\n# See https://docs.python.org/3/library/platform.html#cross-platform\nIS_64BITS = maxsize > 2**32\nBIG_ENDIAN = byteorder == 'big'\n# LOOPBACK_NAME moved to conf.loopback_name\n", "path": "scapy/consts.py"}], "after_files": [{"content": "# SPDX-License-Identifier: GPL-2.0-only\n# This file is part of Scapy\n# See https://scapy.net/ for more information\n# Copyright (C) Philippe Biondi <phil@secdev.org>\n\n\"\"\"\nThis file contains constants\n\"\"\"\n\nfrom sys import byteorder, platform, maxsize\nimport platform as platform_lib\n\n__all__ = [\n    \"LINUX\",\n    \"OPENBSD\",\n    \"FREEBSD\",\n    \"NETBSD\",\n    \"DARWIN\",\n    \"SOLARIS\",\n    \"WINDOWS\",\n    \"WINDOWS_XP\",\n    \"BSD\",\n    \"IS_64BITS\",\n    \"BIG_ENDIAN\",\n]\n\nLINUX = platform.startswith(\"linux\")\nOPENBSD = platform.startswith(\"openbsd\")\nFREEBSD = \"freebsd\" in platform\nNETBSD = platform.startswith(\"netbsd\")\nDARWIN = platform.startswith(\"darwin\")\nSOLARIS = platform.startswith(\"sunos\")\nWINDOWS = platform.startswith(\"win32\")\nWINDOWS_XP = platform_lib.release() == \"XP\"\nBSD = DARWIN or FREEBSD or OPENBSD or NETBSD\n# See https://docs.python.org/3/library/platform.html#cross-platform\nIS_64BITS = maxsize > 2**32\nBIG_ENDIAN = byteorder == 'big'\n# LOOPBACK_NAME moved to conf.loopback_name\n", "path": "scapy/consts.py"}]}