Nov 20, 2020 14:45
import re,os
with open('C:\\ProgramData\\VMware\\vmnetdhcp.conf') as f:
data = f.read()
data = re.sub('192\.168\.43\.','192.168.44.',data)
with open('C:\\ProgramData\\VMware\\vmnetdhcp.conf','w') as f:
f.write(data)
os.system('netsh interface ipv4 set address name="VMware Network Adapter VMnet1" static 192.168.44.1 255.255.255.0')
питон