Advertisement
Guest User

Untitled

a guest
Feb 9th, 2018
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.30 KB | None | 0 0
  1. >>> from winrm.protocol import Protocol
  2. >>>
  3. >>> p = Protocol(
  4. ...     endpoint='https://wallets.nsp1.cloud.yamoney.ru:5986/wsman',
  5. ...     transport='basic',
  6. ...     username=r'Administrator',
  7. ...     password='Qwerty_1',
  8. ...     server_cert_validation='ignore')
  9. >>> shell_id = p.open_shell()
  10. >>> command_id = p.run_command(shell_id, 'ipconfig', ['/all'])
  11. >>> std_out, std_err, status_code = p.get_command_output(shell_id, command_id)
  12. >>> p.cleanup_command(shell_id, command_id)
  13. >>> p.close_shell(shell_id)
  14. >>>
  15. >>> print std_out
  16.  
  17. Windows IP Configuration
  18.  
  19.    Host Name . . . . . . . . . . . . : wallets
  20.    Primary Dns Suffix  . . . . . . . :
  21.    Node Type . . . . . . . . . . . . : Hybrid
  22.    IP Routing Enabled. . . . . . . . : No
  23.    WINS Proxy Enabled. . . . . . . . : No
  24.    DNS Suffix Search List. . . . . . : yamoneylocal
  25.  
  26. Ethernet adapter Ethernet:
  27.  
  28.    Connection-specific DNS Suffix  . : yamoneylocal
  29.    Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter
  30.    Physical Address. . . . . . . . . : FA-16-3E-7A-71-EB
  31.    DHCP Enabled. . . . . . . . . . . : Yes
  32.    Autoconfiguration Enabled . . . . : Yes
  33.    IPv6 Address. . . . . . . . . . . : 2a02:5180:0:502c:2ca4:f4ff:af06:6919(Preferred)
  34.    Link-local IPv6 Address . . . . . : fe80::2ca4:f4ff:af06:6919%12(Preferred)
  35.    IPv4 Address. . . . . . . . . . . : 10.254.31.61(Preferred)
  36.    Subnet Mask . . . . . . . . . . . : 255.255.255.0
  37.    Lease Obtained. . . . . . . . . . : 9 䥢ࠫ� 2018 �. 15:56:23
  38.    Lease Expires . . . . . . . . . . : 9 䥢ࠫ� 2018 �. 16:15:52
  39.    Default Gateway . . . . . . . . . : fe80::f816:3eff:fef1:6a55%12
  40.                                        10.254.31.1
  41.    DHCP Server . . . . . . . . . . . : 10.254.31.2
  42.    DHCPv6 IAID . . . . . . . . . . . : 318379582
  43.    DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-04-6C-C5-FA-16-3E-7A-71-EB
  44.    DNS Servers . . . . . . . . . . . : 10.254.31.2
  45.    NetBIOS over Tcpip. . . . . . . . : Enabled
  46.  
  47. Tunnel adapter isatap.yamoneylocal:
  48.  
  49.    Media State . . . . . . . . . . . : Media disconnected
  50.    Connection-specific DNS Suffix  . : yamoneylocal
  51.    Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
  52.    Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
  53.    DHCP Enabled. . . . . . . . . . . : No
  54.    Autoconfiguration Enabled . . . . : Yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement