Skip to content

Commit

Permalink
windows下插入U盘,访问U盘时会出现错误
Browse files Browse the repository at this point in the history
  • Loading branch information
cksgf committed Feb 17, 2019
1 parent df8e09c commit 620377f
Show file tree
Hide file tree
Showing 20 changed files with 15 additions and 7 deletions.
Binary file added __pycache__/index.cpython-37.pyc
Binary file not shown.
Binary file added config/__pycache__/config.cpython-37.pyc
Binary file not shown.
Binary file added lib/__pycache__/extract.cpython-37.pyc
Binary file not shown.
Binary file added lib/__pycache__/task.cpython-37.pyc
Binary file not shown.
Binary file added lib/__pycache__/writeRes.cpython-37.pyc
Binary file not shown.
10 changes: 7 additions & 3 deletions route/PenetrationSend.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ def PenetrationSendFunc():
diskTotal = 0
diskUsed = 0
for i in io:
o = psutil.disk_usage(i.mountpoint)
diskTotal += o.total
diskUsed += o.used
#windows下插入U盘,访问U盘时会出现"设备未就绪"
try:
o = psutil.disk_usage(i.mountpoint)
diskTotal += o.total
diskUsed += o.used
except:
pass
response = make_response(json.dumps({
'cpu':psutil.cpu_percent(0.5),
'memory':round(m.used/m.total, 3),
Expand Down
Binary file added route/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/controlPanel.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/controlWin.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/echarts.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/file.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/linkButton.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/login.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/plugins.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/process.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/setTask.cpython-37.pyc
Binary file not shown.
Binary file added route/__pycache__/webssh.cpython-37.pyc
Binary file not shown.
12 changes: 8 additions & 4 deletions route/echarts.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ def GetPie():
diskUsed = 0 #已用
diskFree = 0 #剩余
for i in io:
o = psutil.disk_usage(i.mountpoint)
diskTotal += int(o.total/(1024.0*1024.0*1024.0))
diskUsed += int(o.used/(1024.0*1024.0*1024.0))
diskFree += int(o.free/(1024.0*1024.0*1024.0))
try:
#若windows下插入U盘,访问U盘磁盘时,会出现"设备未就绪的错误"
o = psutil.disk_usage(i.mountpoint)
diskTotal += int(o.total/(1024.0*1024.0*1024.0))
diskUsed += int(o.used/(1024.0*1024.0*1024.0))
diskFree += int(o.free/(1024.0*1024.0*1024.0))
except:
pass
resJson = []
resJson.append({
'ttl':'CPU状态',
Expand Down
Binary file added sqlitedb/__pycache__/sqlitedb.cpython-37.pyc
Binary file not shown.
Binary file added sqlitedb/mange.db
Binary file not shown.

0 comments on commit 620377f

Please sign in to comment.