-
Notifications
You must be signed in to change notification settings - Fork 9
/
WindowsInfo.py
35 lines (28 loc) · 1.04 KB
/
WindowsInfo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
from lib.windows import SystemInfo,NetworkInfo,SoftwareInfo,StorageInfo
from lib.windows import HardwareInfo,FileInfo,DeviceInfo,MiscInfo,ServiceInfo
import os
import json
import pickle
def Display(d, indent=0):
return json.dumps(d,sort_keys=True, indent=4)
def SavePickle(data):
with open('result.pickle','wb') as file:
pickle.dump(data,file)
def CallData():
Container={'system':SystemInfo.SystemInfo().GetSystemInfo(),
'hardware':HardwareInfo.HardwareInfo().getHardwareinfo(),
'network':NetworkInfo.NetworkInfo().networkinfo(),
'software':SoftwareInfo.SoftwareInfo().getSoftwareList(),
'device':DeviceInfo.DeviceInfo().GetDeviceInfo(),
'storage':StorageInfo.StorageInfo().getStorageinfo(),
'service':ServiceInfo.ServiceInfo().getServiceInfo()
}
#Pretty Print Result
cdata=Display(Container)
SavePickle(Container)
try:
CallData()
except Exception as ex:
print(ex)
else:
print("Now Run \npython MainUi.py")