| 133 | |
| 134 | |
| 135 | def check_hardware(): |
| 136 | print("----------Hardware Info----------") |
| 137 | print("machine :", platform.machine()) |
| 138 | print("processor :", platform.processor()) |
| 139 | if sys.platform.startswith("darwin"): |
| 140 | pipe = subprocess.Popen(("sysctl", "-a"), stdout=subprocess.PIPE) |
| 141 | output = pipe.communicate()[0] |
| 142 | for line in output.split(b"\n"): |
| 143 | if b"brand_string" in line or b"features" in line: |
| 144 | print(line.strip()) |
| 145 | elif sys.platform.startswith("linux"): |
| 146 | subprocess.call(["lscpu"]) |
| 147 | elif sys.platform.startswith("win32"): |
| 148 | subprocess.call(["wmic", "cpu", "get", "name"]) |
| 149 | |
| 150 | |
| 151 | def check_network(args): |