🤖 Master IPAddress library in Python

Поделиться
HTML-код
  • Опубликовано: 21 окт 2024

Комментарии • 6

  • @nottybro
    @nottybro Год назад

    thanu

  • @md.ruhenhossainbhuiyan7808
    @md.ruhenhossainbhuiyan7808 3 года назад

    Hello sir. Can you tell me how to get port address?

    • @korntech1445
      @korntech1445  3 года назад

      Hello Ruhen, What do you mean exactly? From which object do you want to extract port address? You mean port like in https 443?

    • @md.ruhenhossainbhuiyan7808
      @md.ruhenhossainbhuiyan7808 3 года назад

      @@korntech1445 Hello sir. Thank you for you reply. Yes sir. I meant port lik in https 443 or 8080. I want to get the port address my computer is using. I am able to find the username of my pc with the following codes.
      import getpass
      username = getpass.getuser()
      print(username)

    • @korntech1445
      @korntech1445  3 года назад

      @@md.ruhenhossainbhuiyan7808 I don't think there is a module for that (I'm not aware of it) but you could run an OS command (like netstat) using subprocess module. Check out this link: stackoverflow.com/questions/6338492/python-pipelining-subprocess-in-windows
      Hope this helps.

  • @ruchilasawant9068
    @ruchilasawant9068 3 года назад +2

    Thanks very helpful