Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- >>> from winrm.protocol import Protocol
- >>>
- >>> p = Protocol(
- ... endpoint='https://wallets.nsp1.cloud.yamoney.ru:5986/wsman',
- ... transport='basic',
- ... username=r'Administrator',
- ... password='Qwerty_1',
- ... server_cert_validation='ignore')
- >>> shell_id = p.open_shell()
- >>> command_id = p.run_command(shell_id, 'ipconfig', ['/all'])
- >>> std_out, std_err, status_code = p.get_command_output(shell_id, command_id)
- >>> p.cleanup_command(shell_id, command_id)
- >>> p.close_shell(shell_id)
- >>>
- >>> print std_out
- Windows IP Configuration
- Host Name . . . . . . . . . . . . : wallets
- Primary Dns Suffix . . . . . . . :
- Node Type . . . . . . . . . . . . : Hybrid
- IP Routing Enabled. . . . . . . . : No
- WINS Proxy Enabled. . . . . . . . : No
- DNS Suffix Search List. . . . . . : yamoneylocal
- Ethernet adapter Ethernet:
- Connection-specific DNS Suffix . : yamoneylocal
- Description . . . . . . . . . . . : Red Hat VirtIO Ethernet Adapter
- Physical Address. . . . . . . . . : FA-16-3E-7A-71-EB
- DHCP Enabled. . . . . . . . . . . : Yes
- Autoconfiguration Enabled . . . . : Yes
- IPv6 Address. . . . . . . . . . . : 2a02:5180:0:502c:2ca4:f4ff:af06:6919(Preferred)
- Link-local IPv6 Address . . . . . : fe80::2ca4:f4ff:af06:6919%12(Preferred)
- IPv4 Address. . . . . . . . . . . : 10.254.31.61(Preferred)
- Subnet Mask . . . . . . . . . . . : 255.255.255.0
- Lease Obtained. . . . . . . . . . : 9 䥢ࠫ� 2018 �. 15:56:23
- Lease Expires . . . . . . . . . . : 9 䥢ࠫ� 2018 �. 16:15:52
- Default Gateway . . . . . . . . . : fe80::f816:3eff:fef1:6a55%12
- 10.254.31.1
- DHCP Server . . . . . . . . . . . : 10.254.31.2
- DHCPv6 IAID . . . . . . . . . . . : 318379582
- DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-22-04-6C-C5-FA-16-3E-7A-71-EB
- DNS Servers . . . . . . . . . . . : 10.254.31.2
- NetBIOS over Tcpip. . . . . . . . : Enabled
- Tunnel adapter isatap.yamoneylocal:
- Media State . . . . . . . . . . . : Media disconnected
- Connection-specific DNS Suffix . : yamoneylocal
- Description . . . . . . . . . . . : Microsoft ISATAP Adapter #2
- Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
- DHCP Enabled. . . . . . . . . . . : No
- Autoconfiguration Enabled . . . . : Yes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement